简体   繁体   English

书呆子树:输入不打开子目录

[英]Nerd tree: enter does not open sub dirs

I installed NERDTree via Pathogen on Mac OSX 10.6.8. 我在Mac OSX 10.6.8上通过Pathogen安装了NERDTree。

When I vim a dir, I cannot enter into sub dirs with enter key. 当我修改一个目录时,我无法使用回车键进入子目录。 Furthermore, the dirs look like this: 此外,dirs看起来像这样:

?~V? doc/

What's going on? 这是怎么回事?

Putting this in my .vimrc solved the problem: let g:NERDTreeDirArrows=0 把它放在我的.vimrc中解决了这个问题: let g:NERDTreeDirArrows=0

The creator gave me the fix: https://github.com/scrooloose/nerdtree/issues/108 创作者给了我修复: https//github.com/scrooloose/nerdtree/issues/108

On Mountain Lion 10.8.2 在山狮10.8.2

This worked for me 这对我有用

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

I followed jernkuan's answer but didn't work. 我遵循了jernkuan的回答,但没有奏效。 What worked for me was typing :set encoding=utf-8 inside vim But I lose this when I exit out of vim. 对我:set encoding=utf-8在vim中输入:set encoding=utf-8但是当我退出vim时我失去了它。 I have to do this everytime I am on vim 每次我在vim时我都必须这样做

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. 我运行Arch Linux,所以你的里程可能会有所不同。

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. 我有这个完全相同的问题,并且能够通过取消注释UTF-8并在/etc/locale.gen中注释掉ISO-8879-1来修复它。 Then I ran locale-gen and restarted. 然后我运行locale-gen并重新启动。 Also added 'export LANG=en_US.UTF-8' to my .bashrc. 还将'export LANG = en_US.UTF-8'添加到我的.bashrc中。 Here are the results of my locale settings once it started working: 以下是我的语言环境设置开始工作后的结果:

[lysistrata@(none) ~]$ locale -a
C
en_US.utf8
POSIX
[lysistrata@(none) ~]$

I'm using RedHat 6.1 and vim 7.3 and had to recompile vim with multibyte support. 我正在使用RedHat 6.1和vim 7.3,并且必须使用多字节支持重新编译vim。

$ 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

Check locale on your system, if output is something like this one LANG=C then do the following steps: 检查系统上的locale ,如果输出类似于LANG=C则执行以下步骤:

  1. sudo echo "LANG=en_US.UTF-8" >> /etc/locale.conf
  2. sudo locale-gen and sudo reboot sudo locale-gensudo reboot

check your locale again. 再次检查您的locale Hope this can solve your problem. 希望这可以解决您的问题。

在我的fedora 27上,我只是将set encoding=utf-8放入我的~/.vimrc文件中,它开始正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM