mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Add >/ and >:/ as work-tree version expansions
Not sure I want to waste the easy to type ">" on the work tree version, so adding some alternatives.
This commit is contained in:
@@ -1868,7 +1868,7 @@ endfunction
|
|||||||
function! s:Expand(rev, ...) abort
|
function! s:Expand(rev, ...) abort
|
||||||
if a:rev =~# '^>\=:[0-3]$'
|
if a:rev =~# '^>\=:[0-3]$'
|
||||||
let file = len(expand('%')) ? a:rev[-2:-1] . ':%' : '%'
|
let file = len(expand('%')) ? a:rev[-2:-1] . ':%' : '%'
|
||||||
elseif a:rev ==# '>'
|
elseif a:rev =~# '^>\%(:\=/\)\=$'
|
||||||
let file = '%'
|
let file = '%'
|
||||||
elseif a:rev ==# '>:'
|
elseif a:rev ==# '>:'
|
||||||
let file = empty(s:DirCommitFile(@%)[0]) ? ':0:%' : '%'
|
let file = empty(s:DirCommitFile(@%)[0]) ? ':0:%' : '%'
|
||||||
|
|||||||
Reference in New Issue
Block a user