Guest User

Untitled

a guest
Jun 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. function! HandleURI()
  2. let s:uri = matchstr(getline("."), '[a-z]*:\/\/[^ >,;:]*')
  3. echo s:uri
  4. if s:uri != ""
  5. exec "!open \"" . s:uri . "\""
  6. else
  7. echo "No URI found in line."
  8. endif
  9. endfunction
  10. map <Leader>w :call HandleURI()<CR>
Add Comment
Please, Sign In to add comment