Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrow chars do not work on Windows 7 and Vim 7.3 #135

Closed
mario-grgic opened this issue Feb 13, 2012 · 8 comments
Closed

arrow chars do not work on Windows 7 and Vim 7.3 #135

mario-grgic opened this issue Feb 13, 2012 · 8 comments
Labels

Comments

@mario-grgic
Copy link

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.

@scrooloose
Copy link
Collaborator

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 :-/

@chucklarge
Copy link

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.

@jamesamcl
Copy link

Thanks @chucklarge, that fixed it for me too (Arch Linux). The arrows look waaay better.

@MattVonVielen
Copy link

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

@sochoa
Copy link

sochoa commented Mar 7, 2013

Thanks @chucklarge, that resolved my issue as well. Specifically the following line:

scriptencoding utf-8

@asgeo1
Copy link

asgeo1 commented May 21, 2013

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.

@chidea
Copy link

chidea commented Oct 5, 2015

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.

@PhilRunninger
Copy link
Member

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 = "▼"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants