mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Default coo to identifier under cursor in temp buffers
I initially intended to do a :Git branch specific version of this, but `:Git checkout bad-argument --` is mostly harmless, so hack it for now. Closes https://github.com/tpope/vim-fugitive/issues/1572
This commit is contained in:
@@ -6099,7 +6099,7 @@ function! fugitive#MapJumps(...) abort
|
||||
|
||||
call s:Map('n', 'co<Space>', ':Git checkout<Space>')
|
||||
call s:Map('n', 'co<CR>', ':Git checkout<CR>')
|
||||
call s:Map('n', 'coo', ':<C-U>Git checkout <C-R>=<SID>SquashArgument()<CR> --<CR>')
|
||||
call s:Map('n', 'coo', ':<C-U>Git checkout <C-R>=substitute(<SID>SquashArgument(),"^$",get(<SID>TempState(),"filetype","") ==# "git" ? expand("<cfile>") : "","")<CR> --<CR>')
|
||||
call s:Map('n', 'co?', ':<C-U>help fugitive_co<CR>', '<silent>')
|
||||
|
||||
call s:Map('n', 'cb<Space>', ':Git branch<Space>')
|
||||
|
||||
Reference in New Issue
Block a user