I’m trying to execute base64 --decode
on a piece of text selected in Visual mode, but it is the entire line that seems to be passed to the base64
comma
Base64 encode/decode visual-selected region in buffer and clipboard, put this in ~/.vimrc, and use F2 to encode selection, and F3 to decode selection
" 1. base64-encode(visual-selection) -> F2 -> encoded base64-string
:vnoremap c=system("base64 -w 0", @")
" 2. base64-decode(visual-selection) -> F3 -> decoded string
:vnoremap c=system("base64 -d", @")