Jeff Roberts
RHCE #804006066322833
Vim-Fu is now iPhone and Android friendly

Check out the Vim-Fu Store!

Vim-Fu

for loops in vim

I was writing a script and needed to generate a block of sequentially numbered host names and learned that VIM could do this for me.

for i in range(1,40) | put =’host’.i.’.domain.org’ | endfor

if you need ip’s:

for i in range(1,10) | put = ’192.168.0.’.i | endfor

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>