Nerdtree: Indentation broken with `8d005db` commit

Created on 8 Nov 2018  路  4Comments  路  Source: preservim/nerdtree

Environment

  • Operating System: macOS Mojave 10.14
  • Vim version :version: nvim 0.3.1
  • NERDTree version git rev-parse --short HEAD: 6fe967b
  • NERDTree settings applied in your vimrc, if any:
    vim Plug 'scrooloose/nerdtree' let g:NERDTreeWinPos = 'right' Plug 'jistr/vim-nerdtree-tabs' map <C-t> :NERDTreeTabsToggle<Enter> let NERDTreeMinimalUI = 1 let NERDTreeDirArrows = 1 let NERDTreeAutoDeleteBuffer = 1

Process

  1. Pull latests commits and open a folder

Current Result

Folders no longer indent when opening nerdtree
screen shot 2018-11-07 at 7 06 52 pm

Expected Result

Folders or files should indent (this is commit 91e0f22)
screen shot 2018-11-07 at 7 08 36 pm

Most helpful comment

For anyone else hitting this with indentLine the solution is to add the following to your vim config:

let g:g:indentLine_fileTypeExclude = ["nerdtree"]

All 4 comments

I'm curious about the screenshot you say is working. What is causing the double dots and pipes to be displayed before the filenames? My guess is its one or both of these plugins: indentLine and vim-better-whitespace, and they're interfering with the syntax highlighting that NERDTree is trying to do. If you can find a way to blacklist NERDTree windows from these plugins, that might be the answer. If that's not an option for you, you can try changing the NERDTreeNodeDelimiter to a non-whitespace character, one that won't show up in your filenames. Something like this may do the trick for you.

let NERDTreeNodeDelimiter = "\u263a"   " smiling face 

It was indentLine that was causing the issue! I really appreciate you taking the time to look into it @PhilRunninger I've been stuck with weird indenting issues in nerdtree for a while and this finally fixed it 馃檹 馃憦

For anyone else hitting this with indentLine the solution is to add the following to your vim config:

let g:g:indentLine_fileTypeExclude = ["nerdtree"]

This variable specify a list of buffer names, which can be regular expression. If the buffer's name fall into this list, the indentLine won't display.
e.g. let g:indentLine_bufNameExclude = ['_.', 'NERD_tree.']
Default value is [].

https://github.com/Yggdroot/indentLine/blob/master/doc/indentLine.txt#L115

Was this page helpful?
0 / 5 - 0 ratings