What could cause strange characters in Vim?

This one liner from scrooloose on this thread fixed it:

let g:NERDTreeDirArrows=0

Try putting that in your .vimrc

(see also: same answer posted here on Stack Overflow)


I've solved the problem. What I did to solve it:

  • Edited /etc/locale.gen to LC_ALL="en_US.UTF-8" instead of LC_ALL="en_US"
  • Ran locale-gen as root
  • Ran locale -a, it showed en_US.UTF-8; however, locale showed LC_ALL still being en_US, then I remembered I had exported LC_ALL in my .bashrc last night trying to fix this, so I changed my LANG and LC_ALL to en_US.UTF-8
  • Reloaded the terminal, ran gvim, success! It's strange though, it is using the triangle arrow characters now, instead of the box ones. Makes me think it uses the box ones for ISO-8859 and triangles for UTF-8 possibly, which leads me to suspect I might have problems down the road in some other program. I'll fix it when it comes to it.

Maybe this is not worth a hack but it seems it worked for me.

I changed the line in NERDTree.vim:

call s:initVariable("g:NERDTreeDirArrows", s:running_windows) 

(it was !s:running_windows before)

Now I don't see any fancy + symbol, but at least jumping directories works from within vim. I'm on solaris and I don't think I have root access.