Using Ctrl-A in Vim command line to increment a number -
in normal mode (in vim) if cursor on number, hitting ctrl-a increments number 1. want same thing, command line. specifically, want go lines first character number, , increment it, i.e., want run following command:
:g/searchstring/ ctrl-a   i tried store ctrl-a in macro (say a), , using :g/searchstring/ @a, error:
e492: not editor command ^a
any suggestions?
you have use normal execute normal mode commands in command mode:
:g/searchstring/ normal ^a   note have press ctrl-vctrl-a ^a character.
Comments
Post a Comment