Vim Tips Wiki

Quoted Printable to Plain

Revision as of 10:55, September 23, 2009 by JohnBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
1,619pages on
this wiki
Tip 1012 Printable Monobook Previous Next

created 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>


Around Wikia's network

Random Wiki