On 08/04/2010 11:22 AM, Jim Green wrote:
Hi,

I have as section

sectionA
service=1
network=1.1.1.1

and I want to add sections to make it like

sectionA
service=1
network=1.1.1.1

sectionB
service=2
network=1.1.1.2

sectionC
service=3
network=1.1.1.3
...
until
sectionZ
service=26
network=1.1.1.26

Could anyone point me how to do this in vim? I thought of using shell
scripts to do it but might be an overkill,
Thanks!
Jim


You can make a recording that copies, pastes and then uses ctrl-A command to increment. Untested:

qqy}}P3j$<c-a>{q

And then @q to repeat once, 2...@q to repeat 26 times. -ak

   -ak

--
 Python plugins for vim: outliner, todo list, project manager, calendar,
 expenses tracker, sortable table, and more | http://lightbird.net/pysuite/

--
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

Reply via email to