nerdtree-git-plugin


Ⅰ. 插件描述

A plugin of NERDTree showing git status

Ⅱ. 基本信息

创建日期:  2014-07-05
使用用户:  10
Github星:  15
插件作者:  Alberto Fanjul

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'albfan/nerdtree-git-plugin-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'albfan/nerdtree-git-plugin-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'albfan/nerdtree-git-plugin-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/albfan/nerdtree-git-plugin

Ⅳ. 文档说明

nerdtree-git-plugin

Build Status
Stories in Ready

A plugin of NERDTree showing git status flags. Works with the LATEST version of NERDTree.

The original project git-nerdtree will not be maintained any longer.

Imgur

Installation

For Pathogen

git clone https://github.com/albfan/nerdtree-git-plugin.git ~/.vim/bundle/nerdtree-git-plugin

Now reload the vim

For Vundle

Plugin 'scrooloose/nerdtree'

Plugin 'albfan/nerdtree-git-plugin'

For NeoBundle

NeoBundle 'scrooloose/nerdtree'

NeoBundle 'albfan/nerdtree-git-plugin'

For Plug

Plug 'scrooloose/nerdtree'

Plug 'albfan/nerdtree-git-plugin'

FAQ

Got error message like `Error detected while processing function
177[2]..178[22]..181[7]..144[9]..142[36]..238[4]..NERDTreeGitStatusRefreshListener[2]..NERDTreeGitStatusRefresh:

line 6:
E484: Can't open file /tmp/vZEZ6gM/1` while nerdtree opening in fish, how to resolve this problem?

This was because that vim couldn't execute system function in fish. Add set shell=sh in your vimrc.

This issue has been fixed.

How to config custom symbols?

Use this variable to change symbols.

let g:NERDTreeIndicatorMapCustom = {
    \ "Modified"  : "✹",
    \ "Staged"    : "✚",
    \ "Untracked" : "✭",
    \ "Renamed"   : "➜",
    \ "Unmerged"  : "═",
    \ "Deleted"   : "✖",
    \ "Dirty"     : "✗",
    \ "Clean"     : "✔︎",
    \ 'Ignored'   : '☒',
    \ "Unknown"   : "?"
    \ }

How to show ignored status?

let g:NERDTreeShowIgnoredStatus = 1 (a heavy feature may cost much more time)

testing

Test suite only need vim installed

$ [pacman|apt-get|yum] install vim

Given that, you need to provide a failed test with three files:

    • testN.sh: bash script to generate scenario
    • testN.vim: source for vim where you do whatever operations in vim
    • testN.ok: Expected output for test
    1. When reporting new issues, add """" failed to testN.vim to allow suite to detect expected failed test
    2. When fixing issues, remove failed mark to related test.

    Please see files on t directory for examples

    More info on TDD

    Running test suite

    $ cd t
    $ ./suite.sh
    

    Credits

    添加新评论