call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
" Declare the list of plugins.
Plug 'tpope/vim-sensible'
Plug 'junegunn/seoul256.vim'
" 延迟按需加载,使用到命令的时候再加载或者打开对应文件类型才加载
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'ryanoasis/vim-devicons'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
" Configuration of NERDTree
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
" git-NerdTree
let g:NERDTreeGitStatusIndicatorMapCustom = {
\ 'Modified' :'✹',
\ 'Staged' :'✚',
\ 'Untracked' :'✭',
\ 'Renamed' :'➜',
\ 'Unmerged' :'═',
\ 'Deleted' :'✖',
\ 'Dirty' :'✗',
\ 'Ignored' :'☒',
\ 'Clean' :'✔︎',
\ 'Unknown' :'?',
\ }
" vim-nerdtree-syntax-highlight setting
" you can add these colors to your .vimrc to help customizing
let s:brown = "905532"
let s:aqua = "3AFFDB"
let s:blue = "689FB6"
let s:darkBlue = "44788E"
let s:purple = "834F79"
let s:lightPurple = "834F79"
let s:red = "AE403F"
let s:beige = "F5C06F"
let s:yellow = "F09F17"
let s:orange = "D4843E"
let s:darkOrange = "F16529"
let s:pink = "CB6F6F"
let s:salmon = "EE6E73"
let s:green = "8FAA54"
let s:lightGreen = "31B53E"
let s:white = "FFFFFF"
let s:rspec_red = 'FE405F'
let s:git_orange = 'F54D27'
let g:NERDTreeExtensionHighlightColor = {} " this line is needed to avoid error
let g:NERDTreeExtensionHighlightColor['css'] = s:blue " sets the color of css files to blue
let g:NERDTreeExactMatchHighlightColor = {} " this line is needed to avoid error
let g:NERDTreeExactMatchHighlightColor['.gitignore'] = s:git_orange " sets the color for .gitignore files
let g:NERDTreePatternMatchHighlightColor = {} " this line is needed to avoid error
let g:NERDTreePatternMatchHighlightColor['.*_spec\.rb$'] = s:rspec_red " sets the color for files ending with _spec.rb
let g:WebDevIconsDefaultFolderSymbolColor = s:beige " sets the color for folders that did not match any rule
let g:WebDevIconsDefaultFileSymbolColor = s:blue " sets the color for files that did not match any rule
Other NERDTree-dependent Plugins
[ ] jistr/vim-nerdtree-tabs
[x] ryanoasis/vim-devicons
[x] tiagofumo/vim-nerdtree-syntax-highlight
[ ] Others (specify):
[x] I've verified the issue occurs with only nerdtree-git-plugin installed.
Self-Diagnosis
The same issue is in here: https://github.com/Xuyuanp/nerdtree-git-plugin/issues/121
Environment (for bug reports)
[x] vimrc settings
nerdtree-git-plugin
installed.[x] Copy-Paste
call gitstatus#doctor#Say()
outputs VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31) Included patches: 1-2269 Modified by team+vim@tracker.debian.org Compiled by team+vim@tracker.debian.org Huge version without GUI. Features included (+) or not (-): +acl +cursorbind +insert_expand +mouse_sgr -ruby +title +arabic +cursorshape +job -mouse_sysmouse +scrollbind -toolbar +autocmd +dialog_con +jumplist +mouse_urxvt +signs +user_commands +autochdir +diff +keymap +mouse_xterm +smartindent +vartabs -autoservername +digraphs +lambda +multi_byte +sound +vertsplit -balloon_eval -dnd +langmap +multi_lang +spell +virtualedit +balloon_eval_term -ebcdic +libcall -mzscheme +startuptime +visual -browse +emacs_tags +linebreak +netbeans_intg +statusline +visualextra ++builtin_terms +eval +lispindent +num64 -sun_workshop +viminfo +byte_offset +ex_extra +listcmds +packages +syntax +vreplace +channel +extra_search +localmap +path_extra +tag_binary +wildignore +cindent -farsi -lua -perl -tag_old_static +wildmenu -clientserver +file_in_path +menu +persistent_undo -tag_any_white +windows -clipboard +find_in_path +mksession +postscript -tcl +writebackup +cmdline_compl +float +modify_fname +printer +termguicolors -X11 +cmdline_hist +folding +mouse +profile +terminal -xfontset +cmdline_info -footer -mouseshape -python +terminfo -xim +comments +fork() +mouse_dec +python3 +termresponse -xpm +conceal +gettext +mouse_gpm +quickfix +textobjects -xsmp +cryptv -hangul_input -mouse_jsbterm +reltime +textprop -xterm_clipboard +cscope +iconv +mouse_netterm +rightleft +timers -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-iU6mZD/vim-8.1.2269=. -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lcanberra -lacl -lattr -lgpm -ldl -L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -lpython3.8 -lcrypt -lpthread -ldl -lutil -lm -lmNERDTree: version: 6.10.16 root: /home/zhangyubin/cs61c
Git: version: git version 2.25.1 workdir: /home/zhangyubin/cs61c status output: ? su20-lab-starter/^A
Options: NERDTreeGitStatusConcealBrackets = '0' NERDTreeGitStatusShowIgnored = '0' NERDTreeGitStatusLogLevel = '2' NERDTreeGitStatusGitBinPath = 'git' NERDTreeGitStatusShowClean = '0' NERDTreeGitStatusUseNerdFonts = '0' NERDTreeGitStatusCwdOnly = '0' NERDTreeGitStatusEnable = '1' NERDTreeGitStatusUpdateOnCursorHold = '1' NERDTreeGitStatusAlignIfConceal = '1' NERDTreeGitStatusPorcelainVersion = '2' NERDTreeGitStatusMapPrevHunk = '[c' NERDTreeGitStatusUntrackedFilesMode = 'normal' NERDTreeGitStatusDirDirtyOnly = '1' NERDTreeGitStatusUpdateOnWrite = '1' NERDTreeGitStatusIndicatorMapCustom = { \ 'Dirty': '✗', \ 'Untracked': '✭', \ 'Deleted': '✖', \ 'Ignored': '☒', \ 'Unknown': '?', \ 'Renamed': '➜', \ 'Modified': '✹', \ 'Unmerged': '═', \ 'Staged': '✚', \ 'Clean': '✔', \ } NERDTreeGitStatusMapNextHunk = ']c'
Others: vim-devicons: yes WebDevIconsNerdTreeGitPluginForceVAlign = 1 WebDevIconsNerdTreeAfterGlyphPadding = ' ' WebDevIconsNerdTreeBeforeGlyphPadding = ' '
vim-nerdtree-syntax-highlight: yes NERDTreeSyntaxEnabledExactMatches = [] NERDTreeSyntaxEnabledExtensions = []
vim-nerdtree-tabs: no
Steps to Reproduce the Issue
1.open a directory 2.change the content in one file 3.conserve it and quit
Current Result (Include screenshots where appropriate.)
Nothing happen in nerdtree list
Expected Result
a sign tells me the file has changed and hasn't been add in git