Created
May 19, 2017 16:35
-
-
Save atripes/15372281209daf5678cded1d410e6c16 to your computer and use it in GitHub Desktop.
URL encode/decode vim selection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" URL encode/decode selection | |
vnoremap <leader>en :!python -c 'import sys,urllib;print urllib.quote(sys.stdin.read().strip())'<cr> | |
vnoremap <leader>de :!python -c 'import sys,urllib;print urllib.unquote(sys.stdin.read().strip())'<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! What do you use instead now?
The solution I use now is:
Interesting use case you got there of internet searching something from a buffer. That is pretty neat.
I just wanted to be able to write text fragment links which need to be url-encoded.