Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a NERDTree or other project plugin for vim that integrates with git to show the status of files?

Tags:

git

vim

nerdtree

I played with Aptana Studio for a while before moving over to VIM, and the only thing I really miss about Aptana Studio is the way that in their project view window your file names showed up a different color depending on their status in git (unchanged, changed but not staged, staged, untracked). I know I can just go to terminal and find out, but having it right there in my editor without having to type any commands is really helpful.

Does anyone know if a plugin with this functionality exists for vim? Whether it is a plugin for NERDTree, a replacement, or something else?

like image 914
Scott Avatar asked Jun 23 '11 13:06

Scott


2 Answers

For future reference, I created a fork of NERDTree that does exactly that, it can be found at https://github.com/SeySayux/NerdTreeGit .

Please note it's still in development, so it may break. It also contains a few oddities for which there aren't configurable options yet.

UPDATE: The project linked above is discontinued. For a (much better) alternative, try this: https://github.com/Xuyuanp/nerdtree-git-plugin

like image 82
Symaxion Avatar answered Sep 27 '22 01:09

Symaxion


Have you looked at fugitive.vim? It doesn't do exactly what you're looking for in terms of color-coding NERDTree based on git status -- I'm not aware of any Vim plugin that does, though it would be awesome. It does function as a pretty great little Git wrapper, and allows you to quickly view your project's status in a split window with :Gstatus. No need to go to the terminal. You can even add a branch indicator for the current file to Vim's status line.

You can watch the first in a five-part screencast on fugitive.vim here.

like image 40
michaelmichael Avatar answered Sep 23 '22 01:09

michaelmichael