Commit 3c9cd7ce authored by Marco Kellershoff's avatar Marco Kellershoff 🤸

Initial import

parent c8d3f502
# OpenURL.nvim
A Vim/Neovim plugin to open URLs in your default browser.
function! OpenURL#open(url)
if has('win16') || has('win32') || has('win64')
exe '!start cmd /cstart /b '.a:url.''
elseif has('mac') || has('macunix') || has('gui_macvim')
exe 'silent !open "'.a:url.'"'
else
exe 'silent !xdg-open "'.a:url.'"'
endif
redraw!
endfunction
function! OpenURL#openWith(app, file)
if has('win16') || has('win32') || has('win64')
exe '!start '.a:app.' '.a:url.''
elseif has('mac') || has('macunix') || has('gui_macvim')
exec 'silent !open -a "'.a:app.'"' a:file
else
exe 'silent !'.a:app.' "'.a:url.'"'
endif
endfunction
function! OpenURL#getSelection()
return getline('.')[col("'<")-1:col("'>")-1]
endfunction
if exists('g:loaded_OpenURL')
finish
endif
let g:loaded_OpenURL = 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment