Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Missing dir arrows #522
Comments
ChaoyuChen
commented
Dec 9, 2015
|
Obviously this is a bug. Let's check plugin/NERD_tree.vim
This section means
The logic is reversed. To make the logic right, we must remove ! from the above code.
|
dawikur
commented
Dec 10, 2015
|
@ChaoyuChen, Check your change when running vim directly on Windows - you will see [] instead of arrows. The issue isn't that logic is reversed - it's correct. as You said:
On Windows most font's (if not all of them ) don't display arrows correctly, thus we use +/~ on it. The issue is that, we I am running vim in Linux ( Because of that I am proposing adding option to force-use +/~ - you can check in vimrc file for environment variable $SSH_CLIENT and set flag or not. I wouldn't do this in nerdtree itself, as you can ssh from linux (then rendering would could fine) or windows (rendering will be broken). Based on $SSH_CONNECTION you can check with |
ChaoyuChen
commented
Dec 10, 2015
|
Hello dawikur, Thanks for your sharing. I never executed vim on MS-Windows. Most of time I used putty with SSH session to my Linux. Based on your description, I realized the reason is that putty cannot render the special characters ▸and ▾. Therefore we should solve this issue at the putty side. At last, I found the cause is the font. I got the new font " Consolas for Powerline" from Github and change the font set at putty (Window -> Appearance -> font settings. Remember check "Allow selection of variable patch fonts") . Then my putty showed these 2 character correctly. By the way, I am wondering why these 2 characters are used..... |
dawikur
commented
Dec 11, 2015
|
@ChaoyuChen , thanks for response. You are right, this is fonts issue. I verified that I think this may be still considered as a problem. |
srinathh
commented
Dec 27, 2015
|
It's probably not safe to assume all non windows terminal environments with all font configurations will have the arrow characters enabled by default. I'm running into similar missing character issues with both vim & neovim running on xfce terminal on Ubuntu 14.04 in a crouton environment - i prefer the Source Code Pro font. In my case I fixed it by just commenting out the if/endif block and just using straight pluses and minuses. It maybe worth going back to +/- and having arrows as an option rather than the other way around |
satori
referenced this issue
Jan 28, 2016
Closed
Fixed windows arrow configuration if-statement #539
jeremyn
commented
Jun 26, 2016
|
This problem also happens using NERDTree/vim with Git (Bash) for Windows 2.9.0 and the mintty terminal. |
|
I disagree with adding another option. The "workaround" @dawikur suggested
is sufficient to handle this scenario. It would come down to |
it3xl
commented
Jan 9, 2017
|
All these endless workarounds with vimrc makes pain. |
|
Vim running on the Linux box doesn't know that it is being rendered in a Windows putty window. Why would you expect anything other than 0 to be returned from @ChaoyuChen presents a perfectly valid solution - changing the font putty uses. Consolas works well, as should any of the Powerline fonts. These fonts will render the arrow triangles correctly. If you prefer + and ~ instead, then setting them in your vimrc is a better way to go than adding a redundant option to NERDTree. I hesitate to use the word "workaround". There is a certain amount of setup (a better word, IMO) that is required for any plugin to work, whether in Vim, the plugin, or the terminal/emulator. Each person's way of working is different, so expecting a plugin to work out of the box for everyone is unrealistic. |
alphaCTzo7G
commented
Nov 11, 2017
•
|
@ChaoyuChen, @dawikur Thanks for the solution. This worked for me, after I had worked through all the solutions posted here: https://serverfault.com/questions/475925/how-to-fix-putty-showing-garbled-characters! Putty had a "Consolas" font installed by default. Is there a difference between "Consolas" and "Consolas for Powerline"? The reason I am asking is because, I dont want to make too many manual configuration changes, as it becomes hard to keep track of. |
alphaCTzo7G
referenced this issue
Nov 11, 2017
Open
Using vim when logging through Putty to a remote server doesnt display arrows correctly in nerdtree #760
|
The Powerline fonts contain special glyphs that are used in Powerline, Airline, and perhaps other custom statusline plugins. The characters are defined in the Private Use Area section of the font. Here are some of the characters that these plugins use. Their codes are, from left to right: |
alphaCTzo7G
commented
Nov 14, 2017
|
Thanks for pointing this out. Do you think then we can propose this to Putty? Powerline is pretty popular, and if Consolas for Powerline is a superset of Consolas, perhaps Putty should include "Consolas for Powerline" instead of "Consolas". Would it be helpful if I add this as a point in Faq? I can do a PR |
|
I can't answer for the Putty folks. If you can find a way to contact them, good luck. Here, we are moving the FAQ into the Wiki. You can edit that yourself without a PR. |




dawikur commentedDec 3, 2015
I'm using Windows machine, ssh to Linux with putty and there running Vim.
echo nerdtree#runningWindows()returns0but because I am rendering on Windows I don't have those fancy arrows.
This was probably introduced with 677a83b.
Can we add option to force usage of +/~ ?
Workaround is simple:
but this is always a workaround