indentLine icon indicating copy to clipboard operation
indentLine copied to clipboard

indentLine_leadingSpaceEnabled breaks NEDTree Indentation

Open Jeansen opened this issue 9 years ago • 7 comments

when I set in the following in my vimrc: let g:indentLine_leadingSpaceEnabled = 1

the indentation in NERDTree is lost. That means when I open a folder with subfolders, they are not indented beneath, but show up directly underneath the parent folder with the same indentation level. Actually, there is now indentation at all, all folders are left aligned!

When I set indentLine_leadingSpaceEnabled = 0 everything works as expected. I can even call the Toggle-Funkction IndentLinesToggle and/or LeadingSpaceToggle without breaking the NERDTree view.

Jeansen avatar Apr 20 '16 15:04 Jeansen

Can not reproduce.

Yggdroot avatar Apr 21 '16 05:04 Yggdroot

Could you please provide your vimrc settings that u tried? mine is like this:

let g:indentLine_enabled = 0 let g:indentLine_char = '|' let g:indentLine_color_term = 128 let g:indentLine_leadingSpaceEnabled = 1 let g:indentLine_leadingSpaceChar = '·'

Jeansen avatar Apr 21 '16 19:04 Jeansen

I think this is a conflict with some other plugin, please remove all your other plugins and have a try.

Yggdroot avatar Apr 22 '16 01:04 Yggdroot

I have got the same problem when I use the plugin 'ryanoasis/vim-devicons' with setting like this:

let g:webdevicons_enable_nerdtree = 1

arthurzwl avatar Feb 21 '17 05:02 arthurzwl

Looks like the problem is really with the 'devicons' plugin.

emil14 avatar Nov 21 '17 09:11 emil14

indentLine was breaking indentation both with devicons disabled and enabled for me. Here's my config:

Plug 'Yggdroot/indentLine'
  let g:indentLine_color_term = 233
  let g:indentLine_leadingSpaceEnabled = 1
  let g:indentLine_leadingSpaceChar = '.'

I had to disable it to get the latest version of nerdtree working, with or without devicons enabled.

DapperFox avatar Nov 20 '18 16:11 DapperFox

Calling LeadingSpaceDisable when nerdtree buffer is loaded fixes the issue.

Add the following to your .vimrc

autocmd BufEnter NERD_tree* :LeadingSpaceDisable

hrai avatar Jun 18 '19 11:06 hrai