Error starting vim plugin NERDTree

Asked 2 years ago, Updated 2 years ago, 74 views

Here and Here I introduced the vim plugin NERDTree, but when I started the plug-in with the command, I got an error.
When I pressed enter after the error was displayed, the plug-in itself seemed to be functioning properly and the directory was displayed.

  • MacOS High Sierra 10.13.6
  • Vim 8.0.1283
"NERDTree
set nocompatible
filetype off

if has('vim_starting')
set runtimepath+= through /.vim/bundle/neobundle.vim
call neobundle# begin(expand('~/.vim/bundle/'))
endif

"insert here your Neobundle plugins"
NeoBundle'scroolose/nerdtree'

call neobundle#end()
    
filetype plugin indent on

US>"NERDTree toggle key
noremap <silent><C-e> —NERDTreeToggle<CR>  
Error detected while processing/Users/xxxx/.vim/bundle/nerdtree/
syntax/nerdtree.vim:
line44:
E121: Undefined variable:g:NERDTreeNodeDelimiter
E15: Invalid expression: 'syn match NERDTreeNodeDelimiters#'.g: NER
DTreeNodeDelimiter.'#containedin=ALL'
Press ENTER or type command to continue  
39"highlighting to conceal the delimiter around the file/dir name
 40 if has ("conceal")
 41 exec'syn match NERDTreeNodeDelimiters#'.g: NERDTreeNodeDelimiter.'#conceal containedin=ALL'
 42 setlocal conceallevel=3 concealcursor=nvic
 43 else
 44 exec 'syn match NERDTreeNodeDelimiters #'.g: NERDTreeNodeDelimiter.' #containedin=ALL'
 45 hi!link NERDTreeNodeDelimiters Ignore
 46 endif
 47
 48syn match NERDTreeCWD#^[</].*$#

I feel like syntax is not working, but I didn't understand the contents of the error.
I've tried various things myself, but I can't solve them.
If you don't mind, please advise me.

"NERDTree
set nocompatible
filetype off

if has('vim_starting')
  set runtimepath+= through /.vim/bundle/neobundle.vim
endif

"insert here your Neobundle plugins"

  call neobundle# begin(expand('~/.vim/bundle/'))

NeoBundle'scroolose/nerdtree'

  call neobundle#end()

filetype plugin indent on

syntax enable

US>"NERDTree toggle key
noremap <silent><C-e> —NERDTreeToggle<CR>

vim

2022-09-30 10:10

1 Answers

There seems to have been a lot of corrections after that, so you should try the latest version.

Note: https://github.com/scrooloose/nerdtree/issues/912


2022-09-30 10:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.