Vi markdown trick

0 views
Skip to first unread message

Sarah George

unread,
Apr 2, 2005, 8:13:52 AM4/2/05
to 43Fo...@googlegroups.com
I don't know if others are using "vi" as well but I recently added a
command to vim to run Markdown on chosen bits of text for me.

I edited ~/.vimrc and added this line:

:com -range=% -nargs=* FilterText <line1>,<line2>!SmartyPants.pl | Markdown.pl

It filters the chosen text through both SmartyPants and Markdown and
all I have to do is ":F" (after a visual select) or for the whole
document ":1,$F", etc (like any other "vi" command).

Hope this is useful to some and not "in the way" for others :)

-- Sarah
Reply all
Reply to author
Forward
0 new messages