Vim Tips Wiki

Uuencode and uudecode text in Vim

Redirected from VimTip749

1,623pages on
this wiki
Add New Page
Add New Page Talk0
Tip 749 Printable Monobook Previous Next

created June 17, 2004 · complexity basic · author Pan S · version 6.0

When you want to attach something in your email, uuencode is extremely useful.

This is a mapping to uuencode and uudecode in BASE64.

nnoremap <silent> <Leader>ue :%!uuencode -m /dev/stdout<CR>
nnoremap <silent> <Leader>ud :%!uudecode -o /dev/stdout<CR>
vnoremap <silent> <Leader>ue !uuencode -m /dev/stdout<CR>
vnoremap <silent> <Leader>ud !uudecode -o /dev/stdout<CR>

Assumption: you have uuencode installed in your PATH. (For cygwin it is included in the sharutils package; for Unix it should be similar.)

Similar mapping can be used to any type of filter, such as the C indenter and C preprocessor.


Also on Fandom

Random Wiki