Wikia

Vim Tips Wiki

Quoted Printable to Plain

Talk0
1,610pages on
this wiki
Revision as of 03:52, April 27, 2008 by JohnBot (Talk | contribs)

Tip 1012 Printable Monobook Previous Next

created October 6, 2005 · complexity intermediate · author Bertram Scharpf · version 6.0


Sometimes I pipe an email into Vim and then I cannot read it because it is encoded in quoted printable. Mentioning this in my vimrc helps:

nnoremap <Leader>Q :%s/=\(\x\x\<BAR>\n\)/\=submatch(1)=='\n'?'':nr2char('0x'.submatch(1))/ge<CR>
vnoremap <Leader>Q :s/=\(\x\x\<BAR>\n\)/\=submatch(1)=='\n'?'':nr2char('0x'.submatch(1))/ge<CR>

Comments

Around Wikia's network

Random Wiki