Nerd tree: enter does not open sub dirs

2019-03-09 00:47发布

I installed NERDTree via Pathogen on Mac OSX 10.6.8.

When I vim a dir, I cannot enter into sub dirs with enter key. Furthermore, the dirs look like this:

?~V? doc/

What's going on?

标签: vim nerdtree
7条回答
地球回转人心会变
2楼-- · 2019-03-09 00:58

Putting this in my .vimrc solved the problem: let g:NERDTreeDirArrows=0

The creator gave me the fix: https://github.com/scrooloose/nerdtree/issues/108

查看更多
forever°为你锁心
3楼-- · 2019-03-09 01:00

If you'd still like to try to get the arrow characters to work, here is my answer from Why does my nerd tree have these odd characters. I run Arch Linux, so your mileage may vary.

I had this exact same problem and was able to fix it by uncommenting UTF-8 and leaving ISO-8879-1 commented out in /etc/locale.gen. Then I ran locale-gen and restarted. Also added 'export LANG=en_US.UTF-8' to my .bashrc. Here are the results of my locale settings once it started working:

[lysistrata@(none) ~]$ locale -a
C
en_US.utf8
POSIX
[lysistrata@(none) ~]$
查看更多
ゆ 、 Hurt°
4楼-- · 2019-03-09 01:02

I'm using RedHat 6.1 and vim 7.3 and had to recompile vim with multibyte support.

$ cd ~/src && wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
$ tar xjf vim-7.3.tar.bz2 && cd vim-7.3
$ ./configure --enable-multibyte
$ make
$ sudo make install

Then verify that multibyte support has been enabled.

$ vim --version | grep byte
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent 
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype
查看更多
够拽才男人
5楼-- · 2019-03-09 01:05

On my fedora 27, I just put set encoding=utf-8 into mine ~/.vimrc file, and it starts working properly.

查看更多
我想做一个坏孩纸
6楼-- · 2019-03-09 01:06

I followed jernkuan's answer but didn't work. What worked for me was typing :set encoding=utf-8 inside vim But I lose this when I exit out of vim. I have to do this everytime I am on vim

查看更多
贼婆χ
7楼-- · 2019-03-09 01:10

On Mountain Lion 10.8.2

This worked for me

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
查看更多
登录 后发表回答