Sometimes copying code from webpage to vim can be painful. You might end up loosing all the newlines. So I prefer to copy (from webpages) using html source. If you use html source, you will have to replace >, < .. and lot more to <,> and stuff.
The following will do it automatically for you.
:%!perl -pne 'use HTML::Entities; $_=decode_entities($_)'
Thanks to godlygeek from #vim .
Thursday, May 15, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
use emacs+tramp oldie! you would just be able to work on any machine with your local emacs.
Post a Comment