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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -