书呆子树:输入不会打开子目录
我在 Mac OSX 10.6.8 上通过 Pathogen 安装了 NERDTree。
当我 vim 目录时,我无法使用 Enter 键进入子目录。此外,目录看起来像这样:
?~V? doc/
发生了什么事?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
将其放入我的 .vimrc 中解决了问题:
let g:NERDTreeDirArrows=0
创建者给了我修复:
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
在 Mountain Lion 10.8.2
这对我有用
On Mountain Lion 10.8.2
This worked for me
我按照 jernkuan 的回答但没有用。对我有用的是在 vim 中输入
:set encoding=utf-8
但当我退出 vim 时我会丢失它。我每次使用 vim 时都必须这样做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如果您仍然想尝试让箭头字符正常工作,这是我的答案 为什么我的书呆子树有这些奇怪的字符。我运行 Arch Linux,所以你的情况可能会有所不同。
我遇到了完全相同的问题,并且能够通过取消注释 UTF-8 并在 /etc/locale.gen 中注释掉 ISO-8879-1 来修复它。然后我运行 locale-gen 并重新启动。还在我的 .bashrc 中添加了“export LANG=en_US.UTF-8”。以下是我的区域设置开始工作后的结果:
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:
我正在使用 RedHat 6.1 和 vim 7.3,并且必须重新编译 vim 以支持多字节。
然后验证是否已启用多字节支持。
I'm using RedHat 6.1 and vim 7.3 and had to recompile vim with multibyte support.
Then verify that multibyte support has been enabled.
检查您系统上的
locale
输出是否与此类似LANG=C
然后执行以下步骤:sudo echo "LANG=en_US.UTF-8" >>> /etc/locale.conf
sudo locale-gen
和sudo restart
再次检查您的
区域设置
。希望这可以解决您的问题。Check
locale
on your system, if output is something like this oneLANG=C
then do the following steps:sudo echo "LANG=en_US.UTF-8" >> /etc/locale.conf
sudo locale-gen
andsudo reboot
check your
locale
again. Hope this can solve your problem.在我的 fedora 27 上,我只需将
set encoding=utf-8
放入我的~/.vimrc
文件中,它就开始正常工作。On my fedora 27, I just put
set encoding=utf-8
into mine~/.vimrc
file, and it starts working properly.