Skip to content

Instantly share code, notes, and snippets.

@PhilRunninger
Created August 2, 2019 12:58
Show Gist options
  • Save PhilRunninger/525468085b42b0a88c7c0567553ff22c to your computer and use it in GitHub Desktop.
Save PhilRunninger/525468085b42b0a88c7c0567553ff22c to your computer and use it in GitHub Desktop.
Syntax file to change NERDTree indentation to 1 space per level
" This syntax file changes the indentation of NERDTree to appear as 1 space
" per level instead of the normal 2 spaces. It works only if your vim has the
" +conceal feature turned on, and it must be saved as
" ~/.vim/after/syntax/nerdtree.vim to work properly.
if has("conceal")
syntax clear NERDTreeOpenable
syntax clear NERDTreeClosable
let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-')
exec 'syntax match CompressSpaces #['.s:dirArrows.' ]\zs \ze.*' . g:NERDTreeNodeDelimiter . '# containedin=ALL conceal'
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment