vim - nerdtree suddenly broke

前端 未结 3 1584
长发绾君心
长发绾君心 2020-12-23 09:54

\"enter

Nerdtree has suddenly started acting a little strange. As you can see in the s

相关标签:
3条回答
  • 2020-12-23 10:46

    A late solution: Tell vim to use utf-8 encoding and everything will be good, even the messy characters that appear on top of function and class folds But I agree with npiv, the + and - are much nicer than the fancy arrows :D

    Add this to your .vimrc

    set encoding=utf-8
    
    0 讨论(0)
  • 2020-12-23 10:48

    let g:NERDTreeDirArrowExpandable='|' let g:NERDTreeDirArrowCollapsible='+' Add the above statements in your vimrc. (I'm using csh. This has fixed for me.) If this is also not solving, below can be tried.

    The characters that are displayed in your screen shot are specified in NERD_tree.vim file. Change them to '|' (NERDTreeDirAllowExpandable) , '+' (NERDTreeDirArrowCollapsible) . Hope this helps (if not for you, for others whoever can't fix the problem in the ways specified above).

    0 讨论(0)
  • 2020-12-23 10:55

    As someone suggested in the comments, it was indeed an encoding issue. I had recently switched to zsh.

    Adding the following to your bashrc / zshrc etc.. should fix the problem

    export LC_ALL=en_US.utf-8 
    export LANG="$LC_ALL" 
    

    Alternatively you can tell NERDTree not to use the fancy arrow characters, by adding

    let g:NERDTreeDirArrows=0
    

    to your vimrc which will allow you to keep your current encoding

    0 讨论(0)
提交回复
热议问题