aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/gx_remap.vim19
-rw-r--r--plugin/spec.vim18
2 files changed, 19 insertions, 18 deletions
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('<cfile>')
+ echom "s:uri = " . s:uri
+ if s:uri != ''
+ silent exec "!osurl '".s:uri."'"
+ :redraw!
+ endif
+endfunction
+nnoremap gx :call OpenURLUnderCursor()<CR>
diff --git a/plugin/spec.vim b/plugin/spec.vim
index 67b63a6..2c7f667 100644
--- a/plugin/spec.vim
+++ b/plugin/spec.vim
@@ -1,19 +1 @@
noremap gG :,!abbrevURL<CR>
-
-" Doesn't work because of gh#vim/vim#4738
-let g:netrw_browsex_viewer='setsid osurl'
-
-" " This is just temporary workaround until the above issue is truly
-" " resolved.
-" function! OpenURLUnderCursor()
-" let s:uri = expand('<cword>')
-" echom "s:uri = " . s:uri
-" " let s:uri = matchstr(getline('.'), '[a-z]*(:\/\/\|#)[^ >,;()]*')
-" " let s:uri = shellescape(s:uri, 1)
-" " echom "s:uri = " . s:uri
-" if s:uri != ''
-" silent exec "!osurl '".s:uri."'"
-" :redraw!
-" endif
-" endfunction
-" nnoremap gx :call OpenURLUnderCursor()<CR>