parekh wrote:
> Hi,
>
> I have something like this -
> reg a0 = abc[0]
> reg a0 = abc[0]
> reg a0 = abc[0]
> reg a0 = abc[0]
>
> I am trying to create something like this -
> reg a0 = abc[0]
> reg a1 = abc[1]
> reg a2 = abc[2]
> reg a3 = abc[3]
>
> Any recommendations on how I can do this at a command line?
>   
You could use visincr.vim:

    http://mysite.verizon.net/astronaut/vim/index.html#VISINCR   
(cutting edge)
    http://vim.sourceforge.net/scripts/script.php?script_id=670  (stable)

With it, just use visual-block (put cursor on 0, ctrl-v, move down, 
:I).  Visincr
can do a lot more incrementing stuff: octal, hex, dates, alphameric, etc.

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

Reply via email to