aboutsummaryrefslogblamecommitdiffstats
path: root/plugin/spec.vim
blob: 911ee6893a8628370ad60335ab33f23c116697fd (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                                    
                                                                    


                                                                              
                                                             

                                                             

                                                                          
                                                           
                                                    
                                                                 


                                  



                                         
function! ReplaceURLs()
    s!https://github.com/\(.*\)/\(issues\|pull\)/\(\d\+\)!gh#\1#\3!e
    s!https://gitlab.com/\(.*\)/\(issues\|pull\)/\(\d\+\)!gl#\1#\3!e
    s!https://\(sourceforge\|sf\).net/support/tracker.php?aid=\(\d\+\)!sh#\2!e
    s!https://\(sourceforge\|sf\).net/p/\(.*\)/bugs/\(\d\+\)/!shb#\2#\3!e
    s!https://\(sourceforge\|sf\).net/p/\(.*\)/patches/\(\d\+\)/!shp#\2#\3!e
    s!https://bitbucket.org/\(.*\)/issues/\(\d\+\)!bt#\1#\2!e
    s!https://build.suse.de/request/show/\(\d*\)!ssr#\1!e
    s!https://build.opensuse.org/request/show/\(\d*\)!sr#\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
    s!https://jira.suse.\(com\|de\)/browse/\(\d*\)!jsc#\2!e
    s!https://bugs.python.org/issue\(\d\+\)!bpo#\1!e
    s!https://bugs.launchpad.net/\([^/]\+\)/+bug/\(\d\+\)!lp#\2!e
endfunction

noremap gG :call ReplaceURLs()<CR>

" for netrw
let g:netrw_browsex_viewer='setsid osurl'