Sunday, January 30, 2011

Re: Delete, add 16, and insert

On 01/30/11 12:46, Adam wrote:
> :g/^\d/norm 16(press control-a) I tried just going :norm 16^A but that also
> doesn't work (they both just increment the number by 1). I know that
> pressing 16^a in normal mode works correctly so that isn't the problem.

If you only pressed ^A then it wasn't part of the command, but
rather an instruction to vim to auto-complete with all matching
patterns:

:help c_CTRL-A

What you want is to enter the ^A literally which can be done by
prefixing it with control+V:

:g/^\d/norm 16^V^A

which will appear as

:g/^\d/norm 16^A

as detailed at

:help c_CTRL-V

Hope that makes sense,

-tim

--
You received this message from the "vim_use" 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

No comments:

Post a Comment