mirror of
https://github.com/lloeki/vimfiles.git
synced 2025-12-06 05:24:39 +01:00
Fix netrw gx
This commit is contained in:
parent
3cda41136c
commit
237f571f46
1 changed files with 13 additions and 0 deletions
13
vimrc
13
vimrc
|
|
@ -164,6 +164,19 @@ function! ResCur()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
"fix netrw gx brokenness: https://github.com/vim/vim/issues/4738
|
||||||
|
if has('macunix')
|
||||||
|
function! OpenURLUnderCursor()
|
||||||
|
let s:uri = matchstr(getline('.'), '[a-z]*:\/\/[^ >,;()]*')
|
||||||
|
let s:uri = shellescape(s:uri, 1)
|
||||||
|
if s:uri != ''
|
||||||
|
silent exec "!open '".s:uri."'"
|
||||||
|
:redraw!
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
nnoremap gx :call OpenURLUnderCursor()<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
" Unfold at cursor position
|
" Unfold at cursor position
|
||||||
if has("folding")
|
if has("folding")
|
||||||
function! UnfoldCur()
|
function! UnfoldCur()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue