575 wrote:
> hi.
>
> I have a defination in a program: integer value[0] ,
> now I wanna get more lines as number order like this:
>
> integer value[0];
> integer value[1];
> ...
> ...
> integer value[31];
> ....
> even more...
>
> I don't wanna copy then modify .it's too tired. how can make it easy~!
I'd use the visincr plugin:
place cursor atop
integer value[0];
then Y31p -- now I've got 32 copies of that line. I'd then use
visual-block mode
to select the column of 0s (ctrl-v and move cursor). Then
:I
and that would create an incremented list. You can get the visincr
plugin from:
http://mysite.verizon.net/astronaut/vim/index.html#VISINCR
(cutting edge)
http://vim.sourceforge.net/scripts/script.php?script_id=670 (stable)
Quick overview:
:I [#] left justified incremented list
:II [# [zfill]] right justified incremented list
:IO [#] left justified octal incremented list
:IIO [# [zfill]] right justified octal incremented list
:IX [#] left justified hex. incremented lsit
:IIX [# [zfill]] right justified hex. incremented lsit
:IYMD [# [zfill]] year/month/day incremented list
:IMDY [# [zfill]] month/day/year incremented list
:IDMY [# [zfill]] day/month/year incremented list
:IA [#] alphameric incremented list
:ID [#] dayname incremented list
:IM [#] monthname incremented list
Regards,
Chip Campbell
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---