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

后端 未结 4 1723
悲&欢浪女
悲&欢浪女 2021-02-19 03:54

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 na

4条回答
  •  囚心锁ツ
    2021-02-19 04:13

    I use the git.vim plugin that provides several git functionalities like add/commit/diff/log, etc. So from within vim, I've mapped gs to GitStatus, which opens a new viewport and displays the status neatly:

    enter image description here

    But my favorite feature of this plugin is the GitBranch() function with which you can add the current branch to your status line, as I have outlined in a previous answer of mine.

    Along the same lines, it should be possible to write a function that calls GitStatus and greps the output and reports whether there are staged changes or unstaged changes present in the repo, which can then be conveniently added to the statusline.

提交回复
热议问题