Questions tagged [vim-fugitive]

Git integration for the Vim editor

A wrapper for Git that injects its functionality inside Vim, such as

  • View any blob, tree, commit, or tag in the repository
  • Bring up the output of git status
  • interactive vertical blame split
  • git mv on a file and simultaneously renames the buffer
  • grep exposure to search the work tree (or any arbitrary commit)
  • statusline integration
  • open the current file on GitHub

More at the github repository.

92 questions
1
vote
1 answer

Neovim plugin Fugitive isn't using the ssh key agent, so I can't Gpush/Git push

I am using Neovim on windows, as well as the vim-fugitive plugin. The plugin has a command that pushes commits, Gpush. I get an error saying "permission denied (publickey) fatal: could not read from remote repository. I am using an ssh key,…
kurokashiro
  • 39
  • 1
  • 6
1
vote
0 answers

Return from Gdiffsplit! three-way view

When I get a merge conflict, I do: :Gvdiffsplit! which opens a three-way diff to allow me to choose between "ours" and "theirs" for each chunk. Once I've done whatever I need to do, how do I close this view and return to just viewing the file?
LondonRob
  • 73,083
  • 37
  • 144
  • 201
1
vote
1 answer

How can I make fugitive-vim show the commit message for each line in the file?

I used to be able to do :Gblame in a file and see the author and commit message for each line in the file. But that setup is lost. In my current vimrc setup I get this output: d94c4702 src/components/questions/Question.tsx 30 (Martin…
martins
  • 9,669
  • 11
  • 57
  • 85
1
vote
1 answer

git show previous commit that modified a file without git log

In git we can easily construct revisions pointing to previous commits like HEAD~ HEAD^ and show files on those revisions like git show HEAD~:myfile What is the syntax to show the previous version of myfile without first consulting git log to get…
doraemon
  • 2,296
  • 1
  • 17
  • 36
1
vote
1 answer

vim-fugitive automatically gdiff on enter from gstatus

When using vim-fugitive if you issue :Gstatus it splits the screen and gives you the would be git commit editor and you can move over different files that have changes and press enter to see them in the other half of the screen. I believe it is like…
Ali
  • 18,665
  • 21
  • 103
  • 138
1
vote
1 answer

How to change the coloring scheme of Gdiff in vim-fugitive plugin?

I use the vim-fugitive plugin to check git diff. The coloring scheme to highlight the code changes does not compliment my solarized background. I am not able to see the commands to change the coloring scheme of Gdif. Could anyone help me changing…
Kai
  • 953
  • 6
  • 16
  • 37
1
vote
0 answers

How to add current git repo to vim statusline

I'm using vim-airline and fugitive. Currently only the git branch is shown. I'd like to show both the repo and the branch.
David
  • 606
  • 6
  • 11
1
vote
2 answers

The hotkey "dp"(diff put) has a mapping conflict with vim-fugitive, when copying changes with vimdiff

When comparing files, I like to use vimdiff(or vim -d) and I know a recommended way of copying changes with vimdiff is: ]c - advance to the next block with differences [c - reverse search for the previous block with…
jack guan
  • 331
  • 2
  • 12
1
vote
1 answer

Vim create list of files different from master

I'm looking for a way to set up Vim so that I can create a list of all the files on the current branch that are different to master(or any other branch of choice). I already use vim-fugitive for git diffing at file level. I would like a way to…
Lewis Jones
  • 236
  • 1
  • 7
1
vote
1 answer

How to Blame a particular revision in vim-fugitive

vim fugitive's Gblame is very good. Gblame annotates the current file and offers keyboard shortcuts like P, which annotates the parent-revision of the file form the blame window. However, if i want to annotate a specific revision of a file, how do i…
1
vote
1 answer

vi/fugitive: Gpush does not exit... sometimes

I just started using fugitive in my workflow... very useful! But I've seem to have run into a weird annoyance that I'm hoping someone might have a solution to: When I run :Gpush, sometimes control never returns to vi. Vi hangs on the output of git…
bmatcuk
  • 453
  • 3
  • 10
1
vote
1 answer

Access the last git command output in fugitive

Is there any way to see the git output produced by the most recent git command using vim-fugitive? I know that there is :Git! but this is only useful if you know that you want to see results of a command before you issue it. What do I do if I…
1
vote
1 answer

How can I run Fugitive's :Ggrep in a new split?

I want to use Tim Pope's Vim plugin Fugitive's :Ggrep [regex] command to search my codebase, but I would like to open the first match in a new split. How can I do this?
Jordan Eldredge
  • 1,587
  • 1
  • 19
  • 25
1
vote
1 answer

Ggrep only in the current directory

I want to :Ggrep not from the git root directory but only in the directory the current file is open in vim. I tried :Ggrep search_key ., but it still looks from the git root. Even :Git grep search_key . does the same as :Ggrep
prat0318
  • 571
  • 1
  • 8
  • 19
1
vote
0 answers

Vim-fugitive not matching Git command line

I installed vim-fugitive using pathogen. If I do git status in a terminal window, I get the correct branch and status. If in Vim, I do :Git status, I see the same that was in the terminal window (no surprise). But if in Vim, I do :Gstatus, the…
Bob
  • 3,283
  • 3
  • 20
  • 14