Use substitute() for backward compatibility. Change conceallevel to 3.

This commit is contained in:
Phil Runninger (mac) 2018-10-31 08:45:43 -04:00
parent 91e0f2253f
commit 8d005db94f
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ function! s:TreeDirNode.displayString()
let l:cascade = self.getCascade()
for l:dirNode in l:cascade
let l:next = l:dirNode.path.displayString()
let l:label .= l:label == '' ? l:next : strcharpart(l:next,1)
let l:label .= l:label == '' ? l:next : substitute(l:next,'^.','','')
endfor
" Select the appropriate open/closed status indicator symbol.

View File

@ -39,7 +39,7 @@ syn match NERDTreeFlags #\[.\]# containedin=NERDTreeDir
"highlighing to conceal the delimiter around the file/dir name
if has("conceal")
exec 'syn match NERDTreeNodeDelimiters #' . g:NERDTreeNodeDelimiter . '# conceal containedin=NERDTreeFile,NERDTreeLinkFile,NERDTreeExecFile,NERDTreeRO,NERDTreeDir'
setlocal conceallevel=2 concealcursor=nvic
setlocal conceallevel=3 concealcursor=nvic
else
exec 'syn match NERDTreeNodeDelimiters #' . g:NERDTreeNodeDelimiter . '# containedin=NERDTreeFile,NERDTreeLinkFile,NERDTreeExecFile,NERDTreeRO,NERDTreeDir'
hi! link NERDTreeNodeDelimiters Ignore