2008/10/10 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Does vi has some quick way to generate lets say 1-100
> in 100 lines
I'm sure others will reply with functions etc to do this, but I tend to go for:
* Create a new file
* Enter '1' on the first line
* 'yy' (copy first line)
* '99p' (paste 99 times)
* Ctrl-V (visual block mode)
* G$ (select everything)
* :I (visual increment using Dr Chip's visincr.vim plugin [1])
Alternatively, just use perl:
perl -e 'for($i=1;$i<=100;$i++) { print $i . "\n"; }' > filename.txt
[1] http://www.vim.org/scripts/script.php?script_id=670
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---