mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-09 12:03:47 -05:00
@@ -201,6 +201,16 @@ that are part of Git repositories).
|
|||||||
|
|
||||||
MAPPINGS *fugitive-mappings*
|
MAPPINGS *fugitive-mappings*
|
||||||
|
|
||||||
|
These maps are available everywhere.
|
||||||
|
|
||||||
|
*fugitive-c_CTRL-R_CTRL-G*
|
||||||
|
<C-R><C-G> On the command line, recall the path to the current
|
||||||
|
object (that is, a representation of the object
|
||||||
|
recognized by |:Gedit|).
|
||||||
|
|
||||||
|
*fugitive-y_CTRL-G*
|
||||||
|
["x]y<C-G> Yank the commit SHA and path to the current object.
|
||||||
|
|
||||||
These maps are available in Git objects.
|
These maps are available in Git objects.
|
||||||
|
|
||||||
*fugitive-<CR>*
|
*fugitive-<CR>*
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ function! s:Detect(path)
|
|||||||
endif
|
endif
|
||||||
if exists('b:git_dir')
|
if exists('b:git_dir')
|
||||||
silent doautocmd User Fugitive
|
silent doautocmd User Fugitive
|
||||||
cnoremap <expr> <buffer> <C-R><C-G> <SID>recall()
|
cnoremap <buffer> <expr> <C-R><C-G> <SID>recall()
|
||||||
|
nnoremap <buffer> <silent> y<C-G> :call setreg(v:register,<SID>recall())<CR>
|
||||||
let buffer = fugitive#buffer()
|
let buffer = fugitive#buffer()
|
||||||
if expand('%:p') =~# '//'
|
if expand('%:p') =~# '//'
|
||||||
call buffer.setvar('&path',s:sub(buffer.getvar('&path'),'^\.%(,|$)',''))
|
call buffer.setvar('&path',s:sub(buffer.getvar('&path'),'^\.%(,|$)',''))
|
||||||
|
|||||||
Reference in New Issue
Block a user