g:NERDTreeIndicatorMapCustom‘ is deprecated

g:NERDTreeIndicatorMapCustom' is deprecated

    • 问题描述
    • 问题定位

问题描述

  • [nerdtree-git-status] option ‘g:NERDTreeIndicatorMapCustom’ is deprecated, please use ‘g:NERDTreeGitStatusIndicatorMapCustom’ Press ENTER or type command to continue
  • 解决办法引用自@chxuan
  • 问题产生原因本插件的原作者@Xuyuanp在更新版本后改变了变量的名字

问题定位

执行: sudo vim ~/.vimrc
在文件中找到如下代码(行号为我的文件中的行号)

1
2
3
4
5
6
7
8
9
10
11
12
308 let g:NERDTreeIndicatorMapCustom = {                                                                                                                          
309     \ "Modified"  : "?",
310     \ "Staged"    : "?",
311     \ "Untracked" : "?",
312     \ "Renamed"   : "?",
313     \ "Unmerged"  : "═",
314     \ "Deleted"   : "?",
315     \ "Dirty"     : "?",
316     \ "Clean"     : "??",
317     \ 'Ignored'   : '?',
318     \ "Unknown"   : "?"
319     \ }

修改line 308 “g:NERDTreeIndicatorMapCustom”
为? ??? “g:NERDTreeGitStatusIndicatorMapCustom”

1
2
3
4
5
6
7
8
9
10
11
12
13
307 " nerdtree-git-plugin
308 let g:NERDTreeGitStatusIndicatorMapCustom = {                                                                                                                          
309     \ "Modified"  : "?",
310     \ "Staged"    : "?",
311     \ "Untracked" : "?",
312     \ "Renamed"   : "?",
313     \ "Unmerged"  : "═",
314     \ "Deleted"   : "?",
315     \ "Dirty"     : "?",
316     \ "Clean"     : "??",
317     \ 'Ignored'   : '?',
318     \ "Unknown"   : "?"
319     \ }

问题结束