diff options
| author | typebrook <typebrook@gmail.com> | 2018-10-19 13:30:34 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2018-10-19 13:30:34 +0800 |
| commit | 2c811d51f4fa1e42880778e6bf8aee02fe711d44 (patch) | |
| tree | 914eaaf674cec77b1c7971d32fd487117f66e004 | |
| parent | e75c22df0e3dee113bdf810635a607f8db179287 (diff) | |
| parent | c8b6a02f8a9e4cf8cae6065f161a2ef262790984 (diff) | |
Merge branch 'master' of github.com:typebrook/settings
| -rw-r--r-- | .vimrc | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -10,6 +10,22 @@ nmap <c-c> :q<cr> | |||
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 12 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 13 | " => Open URL under cursor | ||
| 14 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
| 15 | " Solution is here: https://stackoverflow.com/questions/9458294/ | ||
| 16 | function! HandleURL() | ||
| 17 | let s:uri = matchstr(getline("."), '[a-z]*:\/\/[^ >,;]*') | ||
| 18 | echo s:uri | ||
| 19 | if s:uri != "" | ||
| 20 | silent exec "!xdg-open ".s:uri."" | ||
| 21 | else | ||
| 22 | echo "No URI found in line." | ||
| 23 | endif | ||
| 24 | endfunction | ||
| 25 | nmap gx :call HandleURL()<cr> | ||
| 26 | |||
| 27 | |||
| 28 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
| 13 | " => Make Alt key works on Gnome terminal | 29 | " => Make Alt key works on Gnome terminal |
| 14 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 30 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 15 | " Solution is here: https://stackoverflow.com/questions/6778961 | 31 | " Solution is here: https://stackoverflow.com/questions/6778961 |