Hi Christian, 2015/6/8(Mon) 18:02:06 UTC+9 Christian Brabandt: > Bram, > > here is a patch, that implements Ctrl-A/Ctrl-X in visual mode. This > allows for easy incrementing of numbers, when e.g. the leading '-' is not > supposed to be considered as a negative sign. For example you have a list of > files: > > foobar-1 > foobar-2 > > and want to increment the 1, and press Ctrl-A on the number, it will be set to > foobar0. This is probably not what is wanted, so you can use visual mode to > select the number and press Ctrl-A on it, so that it will be incremented. > > While I was at it, I thought it was a nice idea, to make incrementing several > numbers (a block of numbers was selected) easier to have each single value > incremented by an additional number. This allows for something like this. > > > 1 > 2 > 3 > > Visually select the lines, press Ctrl-A and Vim will increment this line to: > > 2 > 3 > 4 > > This might be useful, if one puts several times the same line and then want to > increment each number so it is one more than the one above it. Now you could > simply visually select the number and press Ctrl-A. Before, one needs to > manually increment each number several times. > > The attached patch includes documentation and a test, for this feature.
Cool works!! Perhaps you have forget the diff of test_increment.in. -- Best regards, Hirohito Higashi (a.k.a h_east) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
