Monday, January 23, 2012

Re: Prefix lines with a counter

Tim Chase wrote:
> On 01/21/12 10:49, Chris Lott wrote:
>> Start with a list of items delineated by line breaks:
>>
>> foo
>> bar
>> baz
>>
>> And turn it into a markdown numbered list:
>>
>> 1. foo
>> 2. bar
>> 3. baz
>>
>> I know that I *could* use 1. for every item, since that's easy enough
>> to do and Markdown knows what to do when rendering, but that's not so
>> good for human readers of plain text.
>>
>> Is there a way I can have vim prefix the lines with an ascending
>> counter like the above?
>
> Dr. Chip's VisIncr.vim script may be what you want:
>
> http://www.vim.org/scripts/script.php?script_id=670
This plugin has the advantage that, in addition to decimal-integer
incremented lists, it also handles dates, daynames, roman numerals, and
octal/hexadecimal numbering.

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: