Closed mario-grgic closed 6 years ago
Im aware of this problem but dont have a windows machine to investigate with. That is why NERDTreeDirArrows defaults to 0 on windows.
Im not sure if it actually something with windows, or the way that vim is compiled on windows or something else :-/
I had a very similar issue on CentOS 5.6. I had ?~V? rather than the arrows. This really helped, http://stackoverflow.com/questions/3766204/vim-doesnt-support-unicode
Verify vim is compiled with multi-byte support. Explicitly set in .vimrc scriptencoding utf-8 set encoding=utf-8
after that, all was working correctly.
Thanks @chucklarge, that fixed it for me too (Arch Linux). The arrows look waaay better.
This is working fine for me on Windows 7 using either Consolas or DejaVu Sans Mono, with the current NERDTree master and the latest Vim 7.3 self-installer from www.vim.org
Thanks @chucklarge, that resolved my issue as well. Specifically the following line:
scriptencoding utf-8
On my Windows 8 VM, I'm having trouble getting this working. I've set scriptencoding utf-8
and the other utf-8 settings in Vim. Are using consolas font and the latest 7.3 Vim installer.
However, the console version of Vim seems to still show the arrows as '?'. Perhaps this is an issue with my console? Not sure. (I'm using ConEmu+Powershell).
gvim seems OK though and shows the arrows fine.
If I figure out what's causing it I'll post back.
I opened ~/vimfiles/nerdtree/plugin/NERD_tree.vim
or ~/.vim/nerdtree/plugin/NERD_tree.vim
and changed line 71 like below and it fixed the issue.
call s:initVariable("g:NERDTreeDirArrowExpandable", "▶")
call s:initVariable("g:NERDTreeDirArrowCollapsible", "▼")
Pretty sure Windows code page cp949 doesn't have slick arrow characters of NERDTree. Those arrow characters actually couldn't even pass through git thus became " and two broken ? characters which makes it script error while loading new gvim/vim.
NERDTree has been rewritten since this issue was created, and there are options that can be set in your vimrc
to specify the arrows:
let NERDTreeDirArrowExpandable = "▶"
let NERDTreeDirArrowCollapsible = "▼"
I have the latest NERDTree on both Mac OS X 10.6.8 and Windows 7 64 bit enterprise. On Mac OS X arrow chars are used to render the filesystem tree out of the box (MacVim, Terminal Vim and both Terminal app or iTerm2). On Windows |+ etc are used. If I force arrow keys with NERDTreeDirArrows=1 in _vimrc I still don't get arrow chars (I tried all kinds of modern fonts like Consolas and DejaVu Sans Mono etc), but instead get "â–¸" in both gvim and command prompt.