0

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).

0
2

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

1
  • 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. – amphetamachine Apr 6 '15 at 16:39
0

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, privacy policy and cookie policy

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