Vim Tips Wiki
Register
Advertisement
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.

Comments[]

Advertisement