Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
113 lines
3.5 KiB
Markdown
113 lines
3.5 KiB
Markdown
nerdtree-git-plugin
|
|
===================
|
|
[](https://github.com/Xuyuanp/nerdtree-git-plugin/actions?query=workflow%3ACI)
|
|
[](http://www.wtfpl.net/about/)
|
|
[](https://github.com/Xuyuanp/nerdtree-git-plugin/graphs/contributors)
|
|
|
|
A plugin of [NERDTree](https://github.com/preservim/nerdtree) showing git status flags.
|
|
|
|
The original project [git-nerdtree](https://github.com/Xuyuanp/git-nerdtree) will not be maintained any longer.
|
|
|
|

|
|
|
|
## Installation
|
|
|
|
Use your favorite package manager. Here is the example of using [vim-plug](https://github.com/junegunn/vim-plug)
|
|
|
|
```vim script
|
|
Plug 'preservim/nerdtree' |
|
|
\ Plug 'Xuyuanp/nerdtree-git-plugin'
|
|
```
|
|
|
|
## New project
|
|
|
|
[Yanil](https://github.com/Xuyuanp/yanil): Another nerdtree like plugin for neovim(>= 0.5.0) only. I'm focusing on this project.
|
|
|
|
## 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.
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
|
\ 'Modified' :'✹',
|
|
\ 'Staged' :'✚',
|
|
\ 'Untracked' :'✭',
|
|
\ 'Renamed' :'➜',
|
|
\ 'Unmerged' :'═',
|
|
\ 'Deleted' :'✖',
|
|
\ 'Dirty' :'✗',
|
|
\ 'Ignored' :'☒',
|
|
\ 'Clean' :'✔︎',
|
|
\ 'Unknown' :'?',
|
|
\ }
|
|
```
|
|
|
|
There is a predefined map used *nerdfonts*, to enable it
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0
|
|
```
|
|
|
|
> How to show `ignored` status?
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusShowIgnored = 1 " a heavy feature may cost much more time. default: 0
|
|
```
|
|
|
|
> How to cooperate with [vim-devicons](https://github.com/ryanoasis/vim-devicons)
|
|
|
|
```vim
|
|
Plug 'preservim/nerdtree' |
|
|
\ Plug 'Xuyuanp/nerdtree-git-plugin' |
|
|
\ Plug 'ryanoasis/vim-devicons'
|
|
```
|
|
|
|
Make sure they are in the right order.
|
|
|
|
> How to indicate every single `untracked` file under an `untracked` dir?
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusUntrackedFilesMode = 'all' " a heavy feature too. default: normal
|
|
```
|
|
|
|
> How to set `git` executable file path?
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusGitBinPath = '/your/file/path' " default: git (auto find in path)
|
|
```
|
|
|
|
> How to show `Clean` indicator?
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusShowClean = 1 " default: 0
|
|
```
|
|
|
|
> How to hide the boring brackets(`[ ]`)?
|
|
|
|
```vim
|
|
let g:NERDTreeGitStatusConcealBrackets = 1 " default: 0
|
|
```
|
|
|
|
**NOTICE**: DO NOT enable this feature if you have also installed [vim-devicons](https://github.com/ryanoasis/vim-devicons).
|
|
|
|
## Shameless Self Promotion
|
|
|
|
[Yanil](https://github.com/Xuyuanp/yanil): Yet Another Nerdtree In Lua
|
|
|
|
## Credits
|
|
|
|
* [scrooloose](https://github.com/scrooloose): Open API for me.
|
|
* [git\_nerd](https://github.com/swerner/git_nerd): Where my idea comes from.
|
|
* [PickRelated](https://github.com/PickRelated): Add custom indicators & Review code.
|