nerdtree icon indicating copy to clipboard operation
nerdtree copied to clipboard

Undefined variable: g:NERDTreeDirArrowCollapsible

Open hlx98007 opened this issue 11 years ago • 5 comments

I am using the latest version of nerdtree with Pathogen

folder structure is like this:

.vim/autoload/pathogen.vim
.vim/bundle/nerdtree

The errors appear when I vim a directory, or toggle my quick button to bring out nerdtree via F10

map <F10> :NERDTreeToggle<CR>

Entire error message is:

Error detected while processing /home/username/.vim/bundle/nerdtree/syntax/nerdtree.vim:
line   26:
E121: Undefined variable: g:NERDTreeDirArrowCollapsible
E116: Invalid arguments for function escape(g:NERDTreeDirArrowCollapsible, '~').'# containedin=NERDTreeDir,NERDTreeFil
e'
E15: Invalid expression: 'syn match NERDTreeClosable #'.escape(g:NERDTreeDirArrowCollapsible, '~').'# containedin=NERD
TreeDir,NERDTreeFile'

hlx98007 avatar Sep 21 '15 20:09 hlx98007

As per README

add to your .vimrc

let g:NERDTreeDirArrows = 1
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'

eugene-p avatar Sep 27 '15 23:09 eugene-p

Problem solved! Thanks!

hlx98007 avatar Sep 29 '15 15:09 hlx98007

Why this don't have a default value?

neohunter avatar Oct 25 '15 14:10 neohunter

When I made a key binding via nmap <F5> :NERDTreeToggle<CR> and then press F5, It occurs a promble as following:

处理 /root/.vim/bundle/nerdtree/syntax/nerdtree.vim 时发生错误:
第    3 行:
E121: 未定义的变量: g:NERDTreeGlyphReadOnly
E15: 无效的表达式: 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#'
第   34 行:
E121: 未定义的变量: g:NERDTreeGlyphReadOnly
E15: 无效的表达式: 'syn match NERDTreeRO # *\zs.*\ze \['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFi
le'

My OS is Ubuntu 16.04 LTS Vim Version: 8.0.599

nerdtree_error And after press Enter,I could see the nerdtree list.

kelein avatar Jun 13 '17 10:06 kelein

When I made a key binding via nmap <F5> :NERDTreeToggle<CR> and then press F5, It occurs a promble as following:

处理 /root/.vim/bundle/nerdtree/syntax/nerdtree.vim 时发生错误:
第    3 行:
E121: 未定义的变量: g:NERDTreeGlyphReadOnly
E15: 无效的表达式: 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#'
第   34 行:
E121: 未定义的变量: g:NERDTreeGlyphReadOnly
E15: 无效的表达式: 'syn match NERDTreeRO # *\zs.*\ze \['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFi
le'

My OS is Ubuntu 16.04 LTS Vim Version: 8.0.599

nerdtree_error And after press Enter,I could see the nerdtree list.

add to your .vimrc:

let g:NERDTreeGlyphReadOnly = "RO"

markjenny avatar Oct 13 '18 16:10 markjenny