aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/spec.vim
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2019-03-18 23:48:15 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-03-28 16:53:33 +0100
commit77948ded5e3e9b99cc9b3a8aea2a53775de8e5bb (patch)
treea0abea5defd3e7252c30fd3c2f5d1b2bad371125 /plugin/spec.vim
parent195e84294c53c46845b656e8ec12347393415d27 (diff)
downloadvim-suse-changes-77948ded5e3e9b99cc9b3a8aea2a53775de8e5bb.tar.gz
fix(abbrevURL): make ReplaceURLs() function working finally.
Diffstat (limited to 'plugin/spec.vim')
-rw-r--r--plugin/spec.vim10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugin/spec.vim b/plugin/spec.vim
index b31c814..c466597 100644
--- a/plugin/spec.vim
+++ b/plugin/spec.vim
@@ -1,4 +1,12 @@
-noremap gG :s!https://github.com/\(.*\)/\(issues\\|pull\)/\(\d\+\)!gh#\1#\3!<CR><CR>
+function! ReplaceURLs()
+ s!https://github.com/\(.*\)/\(issues\|pull\)/\(\d\+\)!gh#\1#\3!e
+ s!https://build.suse.com/request/show/\(\d*\)!bds#\1!e
+ s!https://build.opensuse.org/request/show/\(\d*\)!bdo#\1!e
+ s!https://bugzilla.opensuse.org/\(show_bug.cgi?id=\)\?\(\d*\)!boo#\2!e
+ s!https://bugzilla.suse.com/\(show_bug.cgi?id=\)\?\(\d*\)!bsc#\2!e
+endfunction
+
+noremap gG :call ReplaceURLs()<CR>
" for netrw
let g:netrw_browsex_viewer='setsid osurl'