"Charles E Campbell Jr" wrote,

jose isaias cabrera wrote:

<snip>
and I would like to replace the number between the parens () to a sequential number starting from 0. ie,

<snip>

Hello!

The visincr plugin addresses just this issue with ease:

 * place cursor on the 0 at the top
 * use ctrl-v (visual block) and move to highlight the column
 * press:  :I

Visincr can handle various forms of enumeration, too.

You can get visincr from:
   http://mysite.verizon.net/astronaut/vim/index.html#VISINCR
or from
   http://vim.sourceforge.net/scripts/script.php?script_id=670

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

if this works, this is easier than the previous formula. I'll give it a try.

gracias.

josé

Reply via email to