preservim / nerdtree

A tree explorer plugin for vim.
Do What The F*ck You Want To Public License
19.65k stars 1.44k forks source link

Setting NERDTreeBookmarks = 0 causes "Error detected while processing function" with vim 8 on macOS 10.13 #885

Closed statico closed 6 years ago

statico commented 6 years ago

Environment

let g:NERDTreeMinimalUI = 1
let g:NERDTreeBookmarks = 0
let g:NERDTreeAutoDeleteBuffer = 1
let g:NERDTreeStatusLine = -1

Process

  1. brew install vim on macOS 10.13.6
  2. mkdir /tmp/vimtest
  3. git clone https://github.com/scrooloose/nerdtree /tmp/vimtest/.vim
  4. HOME=/tmp/vimtest vim
  5. Execute :let g:NERDTreeBookmarks = 0
  6. Execute :NERDTree

Current Result

This error:

Error detected while processing function 184[2]..185[1]..196[2]..82[2]..83:
line    2:
E714: List required
Error detected while processing function 184[2]..185[1]..196:
line    2:
E171: Missing :endif
Press ENTER or type command to continue

Expected Result

No error, just wonderful NERDTree

Screenshot(s)

image

Possible Fix

Don't set g:NERDTreeBookmarks to 0 for now.

Thank you for an awesome plugin!

lifecrisis commented 6 years ago

Well, g:NERDTreeBookmarks is a variable that is meant to be used internally by the NERDTree. It's global because, obviously, all NERDTree instances need to share this information.

Don't set this variable. What are you even trying to accomplish?

statico commented 6 years ago

Ah, somehow I confused this with NERDTreeMarkBookmarks:

https://github.com/scrooloose/nerdtree/blob/7c8c811f00f9e8f792a88a271f7f79ab0bdd7e85/doc/NERDTree.txt#L894-L900

Apparently it didn't cause an error before for some reason but does now. I'll just remove it.

Sorry, and thanks!