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
2
votes
1 answer

Vim Fugitive: toggling ":Gblame" function

I'm still kinda new in vim so i hope this question isn't too basic, but I couldn't find an answer in fugitive's DOCs.. im looking to add a toggling function that does the following: if :Gblame buffer is open: close buffer else execute…
Amichai
  • 174
  • 2
  • 11
2
votes
1 answer

Modify vim-fugitive Gstatus mapping

The :Gstatus window has specific mappings for that particular buffer. In my case, I would like to change the cc mapping to not only execute :Gcommit but also go into insert mode afterwards. It seems like the user robodendron figured out how to do…
J-Win
  • 1,322
  • 16
  • 35
2
votes
2 answers

NeoVim Fugitive Plugin Gpush Locking Up

Using NeoVim I am having problems with the :Gpush command locking up the editor. Does anyone have a work around for this problem?
Cogwizzle
  • 550
  • 4
  • 14
2
votes
2 answers

insert mode Gcommit fugitive

I am trying to commit using :Gcommit. A split window appears. I think I am supposed to enter the commit message there. However, when I press "i" to enter the insert mode, the buffer changes and I see lines, which are looking like the follwing…
skew41
  • 41
  • 2
2
votes
2 answers

GCommit doesn't work with fugitive.vim under windows xp?

I've just discovered fugitive.vim, which is pretty cool. However, I've run into a problem (this is using windows xp, msys git 1.7, fugitive.vim 1.1, and gvim 7.2). Adding files to the index and checking the status works just fine, but when I do a…
Paul Wicks
  • 62,960
  • 55
  • 119
  • 146
2
votes
1 answer

How to display 'word-level' changes when resolving conflicts with 3-way diff?

Resolving conflicts with fugitive is great. After reading Painless Merge Conflict Resolution in Git, I started to think how to display changes not only on a line-level but also on word-level. All examples / cases are based on…
wryrych
  • 1,765
  • 4
  • 20
  • 31
2
votes
1 answer

Gblame: Colour each commit a different colour

Git-fugitive provides a terrific blame view (:Gblame) as seen here with the commit ID shown on the far left: ae228e74 (Dotan Cohen 2013-06-30 14:55:45 +0300)| 71 if operation == '-': 9a5d1a16 (Dotan Cohen 2013-06-26 18:59:55 +0300)| 72 …
dotancohen
  • 30,064
  • 36
  • 138
  • 197
2
votes
1 answer

vim should auto commit on quit using git or fugitive(?)

I´m new to git and I´ve a little problem using git the way I want to. I administrate a bunch of servers. What I want to have is a local repository of the config files I edit. In case of missconfiguratin I could then easily jump back to a working…
chris4jahn
  • 21
  • 2
2
votes
1 answer

Using vim as an external tool in intellij idea

I want to use vim editor as an external tool in intellij idea. I mapped a Ctrl-U combination to opening the current file with vim. Then I want to use the fugitive plugin, which is a wrapper over git and uses the git binary. But the vim opened from…
ryskajakub
  • 6,351
  • 8
  • 45
  • 75
2
votes
1 answer

Calling command from `-c` command line argument doesn't work in Vim

I'm using the Fugitive plugin. It has a command(?) Git! which executes a command and opens the result in a new buffer. Example: :Git! diff --cached I have a function which calls this, and does some other things after that. And I have this command…
Dogbert
  • 212,659
  • 41
  • 396
  • 397
2
votes
1 answer

Show message in vim map

I use fugitive vim plugin. with a map and BufferIsEmpty function, I close the diff buffer if this don't have changes. I use this map nn g0 :w Gsplit! diff -U0 \ exec BufferIsEmpty() ?…
JuanPablo
  • 23,792
  • 39
  • 118
  • 164
1
vote
1 answer

Vim fugitive plugin does not recognise git archive on Windows

I installed vim fugitive via pathogen plugin. Helptags created the tags for fugitive. In the next step I set up a brand new git repo with git init, jumped into that folder, created a README. In gVim I then run :Gstatus but the split window that…
orschiro
  • 19,847
  • 19
  • 64
  • 95
1
vote
1 answer

vim: set nocursorbind after Gdiff with fugitive plugin

when I use Gdiff, this open a window with differences, but when I close the window differences the cursorbind is 1. How I can set nocursorbind when I close the window differences ? I think in autocmd BufDelete fugitive* set nocursorbind but don't…
JuanPablo
  • 23,792
  • 39
  • 118
  • 164
1
vote
2 answers

How to display git "tag" in lightline?

I work on git tags on a daily basis & switch between 'em. I have my lightline configured where it does display git branch in status bar of lightline. But I am trying to display git tag as well. gitbranch component from lightline does display the…
1
vote
1 answer

"Unknown function: 37_repo_dir" when opening a new file in vim

I recently updated oh-my-zsh, vim and ran rcup to update dotfiles and vim plugins. When opening a new file in vim I get an error, part of which contains: Unknown function: 37_repo_dir This seems to be related to the fugitive plugin that I have…
pygeek
  • 7,356
  • 1
  • 20
  • 41