I'm having some trouble getting the yC-G command in normal mode to yank the current commit SHA. Currently it only yanks the file name.

From :h fugitive:

["x]y<C-G>     Yank the commit SHA and path to the current object.

I've tried running :Gedit after which yC-G yanks :0:file-name.ext.

I'm confused. Am I using this keyboard shortcut correctly, or is there a bug?

It exhibits the same behavior in both gui mode and text mode.

I'm using the most recent version of vim-fugitive (as of 2015-04-02).


2 Answers 2


Thats because you should be on a fugitive-revision for that to work. (:h fugitive-revision).

  • I eventually figured out I needed to open a specific revision from the quickfix list. I nmapped a key command to :Glog<CR>:cwindow<CR> to help with this. Commented Apr 6, 2015 at 16:39

The problem was that was the vim binary I was using wasn't compiled with +xterm_clipboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.