mirror of
https://github.com/amix/vimrc
synced 2025-08-03 11:45:00 +08:00
Updated plugins
This commit is contained in:
@ -296,6 +296,8 @@ endfunction
|
||||
|
||||
" Section: Fugitive :GBrowse support
|
||||
|
||||
" https://github.com/github/markup
|
||||
let s:markup_exts = ['markdown', 'mdown', 'mkdn', 'md', 'textile', 'rdoc', 'org', 'creole', 'mediawiki', 'wiki', 'rst', 'asciidoc', 'adoc', 'asc', 'pod']
|
||||
function! rhubarb#FugitiveUrl(...) abort
|
||||
if a:0 == 1 || type(a:1) == type({})
|
||||
let opts = a:1
|
||||
@ -323,6 +325,9 @@ function! rhubarb#FugitiveUrl(...) abort
|
||||
elseif get(opts, 'type', '') ==# 'blob' || opts.path =~# '[^/]$'
|
||||
let escaped_commit = substitute(commit, '#', '%23', 'g')
|
||||
let url = root . '/blob/' . escaped_commit . '/' . path
|
||||
if get(opts, 'line1') > 0 && index(s:markup_exts, fnamemodify(path, ':e')) >= 0
|
||||
let url .= '?plain=1'
|
||||
endif
|
||||
if get(opts, 'line2') > 0 && get(opts, 'line1') == opts.line2
|
||||
let url .= '#L' . opts.line1
|
||||
elseif get(opts, 'line1') > 0 && get(opts, 'line2') > 0
|
||||
|
Reference in New Issue
Block a user