How to open an uri in vim
Perhaps, like me, you save uris in text file, to open them later, and, like me, copy and paste the uri from the text file to the browser bores you. As a lazy developper, here is a vim command to open, in the browser, this uris:
:exec "!xdg-open ".getline('.')<CR>
To avoid to input the command, you can map it:
For Windows:
map <leader>o <Esc>:exec "!start explorer ".getline('.')<CR><CR>
For Mac Os X:
map <leader>o <Esc>:exec "!open ".getline('.')<CR><CR>
For Linux:
map <leader>o <Esc>:exec "!xdg-open ".getline('.')<CR><CR>
Written by Sébastien Quioc
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#