increment.vim : quickly create incremented lists
| script karma
Downloaded by 2273
Comments, bugs, improvements
script versions (upload new version)
|Sometimes you want to search for a string in the text
and add an auto incremented number to each occurence of the string.
Let's say, you want to make a numbered list.
You write something like:
qwerty: The first line
qwerty: the second one
qwerty: and so on ...
Then you type a command
followed by a replace command
The first 'qwerty' is replaced by number 1,
the second by number 2, and so on... .
Sometimes you might want to generate numbers with a leadimg zeroes.
You simply initialize global variable I to value like
then you make the replacement
You have to initialize a global variable I
before the first use of INC() function,
othervise the numbering will continue where it stopped
during the last replace.
Text Pad has a very similar metacharacter for replacement - \i.
|Put increment.vim into a plugin directory.
Use in replacement strings
Click on the package to download.
ip used for rating: 220.127.116.11