From e68e12a33b2dd05be4459a794e511a02ac6038bd Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 29 Jun 2014 21:44:19 +0100 Subject: [PATCH] fix highlighting for readonly files --- syntax/nerdtree.vim | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/syntax/nerdtree.vim b/syntax/nerdtree.vim index 8b82f32..5ab1f8c 100644 --- a/syntax/nerdtree.vim +++ b/syntax/nerdtree.vim @@ -16,9 +16,6 @@ syn match NERDTreeToggleOff #(off)#hs=e-3,he=e-1 syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3 syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand -"highlighting for readonly files -syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart - "highlighting for sym links syn match NERDTreeLinkTarget #->.*# containedin=NERDTreeDir,NERDTreeFile syn match NERDTreeLinkFile #.* ->#me=e-3 containedin=NERDTreeFile @@ -31,9 +28,12 @@ if g:NERDTreeDirArrows syn match NERDTreeClosable #▾# containedin=NERDTreeDir,NERDTreeFile syn match NERDTreeOpenable #▸# containedin=NERDTreeDir,NERDTreeFile - syn match NERDTreeDir #[^▾▸ ].*/# - syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark - syn match NERDTreeFile #^[^"\.▾▸] *[^▾▸]*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile + "syn match NERDTreeDir #[^▾▸ ].*/# + "syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark + "syn match NERDTreeFile #^[^"\.▾▸] *[^▾▸]*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile + + "highlighting for readonly files + syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeFlag,NERDTreeBookmark,NERDTreeFile else "highlighting for the ~/+ symbols for the directory nodes syn match NERDTreeClosable #\~\<# @@ -44,12 +44,15 @@ else "highlighting for the tree structural parts syn match NERDTreePart #|# syn match NERDTreePart #`# - syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart containedin=NERDTreeRO + syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeOpenable,NERDTreeClosable - syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark - syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile - syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile + syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark + syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile + syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile + + "highlighting for readonly files + syn match NERDTreeRO #|-.*\[RO\]#he=e-5 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile endif syn match NERDTreeCWD #^[