aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/gx_remap.vim
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2021-05-02 17:53:21 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 17:04:04 +0100
commit3603938832a40cbf587966a480421dfd819ecbba (patch)
treee71d710674b56e56612ee9d455dd8de1e24eb693 /plugin/gx_remap.vim
parent027f03aae02427dcbc6903531ce7428875c56f66 (diff)
downloadvim-suse-changes-3603938832a40cbf587966a480421dfd819ecbba.tar.gz
fix(plugin): move gx_remap functionality into separate file.
Diffstat (limited to 'plugin/gx_remap.vim')
-rw-r--r--plugin/gx_remap.vim19
1 files changed, 19 insertions, 0 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>