Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plugin-fugitive]

Git wrapper for Vim.

0
votes
1answer
26 views

how to create a buffer like a fugitive temporary buffer

When we call :Gdiff on a file, fugitive will create a buffer with a name fugitive:///path/to/file/. The modifiable option is off and readonly option is on. Most importantly, the file does not exist on ...
2
votes
1answer
15 views

How to load commits in a certain date range with fugitive?

I am able to do git log --pretty=format:"%h" --after="2018-06-7" --until="2018-06-10", in the shell, but if I try to do it in vim with fugitive like this: :Glog --after="2018-6-7" --until="2018-06-10"...
0
votes
0answers
29 views

Question mark instead branch symbol vim-fugitive [duplicate]

I installed the vim-fugitive plugin, but I get this question mark instead of the branch symbol in vim-airline: my vimrc call plug#begin() " Plugins Plug 'fatih/vim-go' Plug 'AndrewRadev/splitjoin....
1
vote
1answer
31 views

How to get 50 char long warning color highlight in vim gitcommit message without fugitive

I'm using vim-fugitive. However, I'm using a black and white colorscheme. So, I don't see any warning for the 50 char long subject line of git commit message. I want to know how I can add a highlight ...
2
votes
2answers
76 views

How to open a split-diff for selected file out of the commit

Using Vim-fugitive plugin I open a commit with :Gedit HEAD~5 The buffer looks like this: tree a75d4eea2207e408db6343a4869274b701b42135 parent 7fa89fec125ce60a341f7c37dd769a8a31c49359 author ...
0
votes
2answers
153 views

neovim: how to close the terminal buffer by just pressing enter?

NVIM v0.2.2 Build type: Release LuaJIT 2.0.5 Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -...
2
votes
1answer
156 views

How to patch add in Fugitive plugin

This screen I got after running the :Gstatus command Then I moved the cursor to init.vim file and pressed the p key, i.e. run git add –patch for the current file. Now I have this screen As you can ...
0
votes
3answers
204 views

How do I go back when I view a certain git hash

I'm using the vim-fugitive plugin for git blame annotations. When I'm on a certain line, I type :Gblame and it shows me the git commits: When I click on a git commit hash, I go to it, how can go ...
1
vote
2answers
160 views

QuickFixCmdPost autocommand after Glog

I run Glog! from fugitive to populate the quickfix window and set the following autocmd for QuickFixCmdPost (The following questions general and are not specific to Glog, I just use it as example) ...
1
vote
1answer
77 views

Fugitive Gbrowse while being ssh on a server

I work remotely via ssh on my dev machine which runs a tmux. I want to pipe the output of the Gbrowse back to my laptop. Is there any reasonable way to do that.
0
votes
0answers
43 views

How fugitive-specific is the 'git' filetype?

When you run fugitive's :Gblame, it opens a buffer whose 'filetype' is fugitiveblame. You can hit q to close its window. You can also hit o to view the commit for the line your cursor is on in a ...
1
vote
1answer
96 views

How to execute a command when leaving the 'fugitiveblame' window?

When executing :Gblame, it opens up a window for the blame information. When close that window with q, I want to execute wincmd = I've tried the following, they don't seem to work: autocmd BufLeave ...
5
votes
1answer
108 views

How can I make Neovim return to the tab that was active before running `:Git diff`?

How can I make Neovim automatically return to the tabpage that was active before running :Git diff %? Before I commit my work in git, I often run :Git diff to review changes (the :Git command is ...
4
votes
1answer
311 views

How to always append parameters for a Ggrep command?

I'm using the Fugitive plugin. It has the :Ggrep command which is very useful for searching the repo. One annoying thing is that I have huge .map files and I want to omit them from my search. I ...
5
votes
3answers
910 views

Git Fugitive how to git add a visually selected chunk of code

I would like to know if i could select some code in visual mode and git add it ? I checked with fugitive.vim but i didn't find how to do it. Is it possible ? Or is there any other plugin to do it ?
0
votes
0answers
371 views

How to diffget from both sources?

I'm using fugitive and running Gdiff to merge files during git conflict. I have changes which I'm gonna save from current branch the same as merging branch. If I type diffget current branch, it will ...
2
votes
2answers
187 views

Keep cursor in fugitive-:Gstatus window when view diffs/splits

I have tried to attach to following fugitive mapping: nnoremap <buffer> <silent> D :<C-U>execute <SID>StageDiff('Gdiff')<CR> a :h window-move-cursor mapping: diff --...
4
votes
1answer
416 views

Make vim-fugitive care about the current working directory when a file is not being edited

Background: I am doing more and more stuff directly from inside Neovim, and less and less from the terminal or even the terminal emulator. So instead of going to the desired directory to work in, and ...
4
votes
1answer
77 views

How do I get back to the current working copy while viewing git revisions?

When using :Glog or other git plugins like :GV (gitv?) and checking revisions or commit you end up in Read-Only mode viewing something like fugitive:///.git//300ed70aa473b7e8f983a2590c2af908cd0a0621/...
3
votes
1answer
189 views

Changing value of $MYVIMRC

I store my .vimrc in my dotfiles repository located at ~/dotfiles/.vimrc, which I want to manage with Git using vim-fugitive. I have symlinks from my home directory to my dotfiles, i.e. ~/.vimrc -> ...
18
votes
4answers
4k views

Easiest way to switch git branches

Right now I'm using fugitive to manage almost everything git related, but I can't find a good workflow to quickly visualize and switch between available branches. I can do :Git checkout <branch-...
11
votes
1answer
1k views

Why are my windows scrolling together?

I have two windows open on the same buffer and I want to edit two parts of the same file at the same time. I can't because the windows are scrolling together. I have noscrollbind set so I am ...
1
vote
2answers
416 views

Open Gstatus in new tab

I am using the vim-fugitive plugin and I encounter a strange behaviour. I don't know if it's really related to the plugin or not. I am trying to open the Gstatus page in a new tab. So I am creating a ...
3
votes
1answer
449 views

VimDiff incorrectly showing all lines as changed

I am using Vim with fugitive.vim plugin. Sometimes when diffing files versus their HEAD version from Fugitive's Gstatus window, Vim shows all lines in a file as changed, when in reality only one or ...
0
votes
2answers
95 views

y<C-G> not yanking commit SHA in fugitive?

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 ...
5
votes
1answer
571 views

How to manage fugitive commit with a git pre-commit hook?

When working on a git project in vim, I use the fugitive plugin. I like to open a :Gstatus split, press - to add file and then press C to commit my changes. I also have a git pre-commit hook, it runs ...