From 3603938832a40cbf587966a480421dfd819ecbba Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Sun, 2 May 2021 17:53:21 +0200 Subject: fix(plugin): move gx_remap functionality into separate file. --- plugin/gx_remap.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugin/gx_remap.vim (limited to 'plugin/gx_remap.vim') diff --git a/plugin/gx_remap.vim b/plugin/gx_remap.vim new file mode 100644 index 0000000..8d097f1 --- /dev/null +++ b/plugin/gx_remap.vim @@ -0,0 +1,19 @@ +" Doesn't work because of gh#vim/vim#4738 +" let g:netrw_browsex_viewer='setsid osurl' +let g:netrw_nogx=1 + +" This is just temporary workaround until the above issue is truly +" resolved. +" https://github.com/vim/vim/issues/4738#issuecomment-830820565 +" https://bugzilla.suse.com/show_bug.cgi?id=1173583 +" (https://bugzilla.suse.com/show_bug.cgi?id=1173583) +" gh#vim/vim#4738 +function! OpenURLUnderCursor() + let s:uri = expand('') + echom "s:uri = " . s:uri + if s:uri != '' + silent exec "!osurl '".s:uri."'" + :redraw! + endif +endfunction +nnoremap gx :call OpenURLUnderCursor() -- cgit