macOS ◆ xterm-256color ◆ bash 860 views

In .vimrc

“ copy number to below, increment. lh at end fixes spurious cursor down motion let @i = “\”zyej?[^0-9]\<CR>lde\”zP\<C-a>?[^0-9]\<CR>l:noh\<CR>lh” set nrformats=hex “ who uses octal?? 07 should increment to 08

To use, put cursor on the top number in a column, “@i” to increment one number below or “11@i” for a 12 row column of numbers. To get fancy this would be a function that disables search highlighting to prevent the yellow flash with each increment, but this is more than sufficient for me and I don’t know how to write vimscript.