tsony-tsonev / nerdtree-git-plugin

A plugin of NERDTree showing git status
19 stars 0 forks source link

Not working. Breaks the NERDTree. #5

Closed hrqmonteiro closed 3 years ago

hrqmonteiro commented 3 years ago

I get this error when i try to open NerdTree

Error detected while processing function 204[2]..205[14]..188[20]..191[8]..155[25]..153[15]..265[5]..NERDT
reeGitStatusRefreshListener[5]..NERDTreeGetGitStatusPrefix:
line    6:
E716: Key not present in Dictionary: "Slash()"
E15: Invalid expression: b:NERDTree.root.path.str() . a:path.Slash()
Error detected while processing function 204[2]..205[14]..188[20]..191[8]..155:
line   25:
E171: Missing :endif
Error detected while processing function 204[2]..205:
line   14:
E171: Missing :endif
Press ENTER or type command to continue
tsony-tsonev commented 3 years ago

@hrqmonteiro fixed, check it out, pull the latest commit, also you might want to add this to .vimrc

augroup nerdtree
  autocmd!
  autocmd FileType nerdtree syntax clear NERDTreeFlags
  autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=ALL
  autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=ALL
  autocmd FileType nerdtree setlocal conceallevel=3
  autocmd FileType nerdtree setlocal concealcursor=nvic
augroup END

They've added square brackets around the flag in the latest https://github.com/preservim/nerdtree and this is removing them, if brackets are still showing downgrade the conceallevel value.

tsony-tsonev commented 3 years ago

I'll close the issue when you confirm it is working.