@@ -2688,9 +2688,9 @@ function! s:initNerdTreeInPlace(dir)
2688
2688
call s: bindMappings ()
2689
2689
setfiletype nerdtree
2690
2690
" syntax highlighting
2691
- if has (" syntax" ) && exists (" g:syntax_on" )
2692
- call s: setupSyntaxHighlighting ()
2693
- endif
2691
+ " if has("syntax") && exists("g:syntax_on")
2692
+ " call s:setupSyntaxHighlighting()
2693
+ " endif
2694
2694
2695
2695
call s: renderView ()
2696
2696
endfunction
@@ -2919,9 +2919,9 @@ function! s:createTreeWin()
2919
2919
call s: bindMappings ()
2920
2920
setfiletype nerdtree
2921
2921
" syntax highlighting
2922
- if has (" syntax" ) && exists (" g:syntax_on" )
2923
- call s: setupSyntaxHighlighting ()
2924
- endif
2922
+ " if has("syntax") && exists("g:syntax_on")
2923
+ " call s:setupSyntaxHighlighting()
2924
+ " endif
2925
2925
endfunction
2926
2926
2927
2927
" FUNCTION: s:dumpHelp {{{2
@@ -3407,95 +3407,95 @@ function! s:setupStatusline()
3407
3407
endif
3408
3408
endfunction
3409
3409
" FUNCTION: s:setupSyntaxHighlighting() {{{2
3410
- function ! s: setupSyntaxHighlighting ()
3411
- " NERDTreeFlags are syntax items that should be invisible, but give clues as to
3412
- " how things should be highlighted
3413
- syn match NERDTreeFlag # \~ #
3414
- syn match NERDTreeFlag # \[ RO\] #
3415
-
3416
- " highlighting for the .. (up dir) line at the top of the tree
3417
- execute " syn match NERDTreeUp #\\ V" . s: tree_up_dir_line ." #"
3418
-
3419
- " highlighting for the ~/+ symbols for the directory nodes
3420
- syn match NERDTreeClosable # \~\< #
3421
- syn match NERDTreeClosable # \~\. #
3422
- syn match NERDTreeOpenable # +\< #
3423
- syn match NERDTreeOpenable # +\. # he =e - 1
3424
-
3425
- " highlighting for the tree structural parts
3426
- syn match NERDTreePart # |#
3427
- syn match NERDTreePart # `#
3428
- syn match NERDTreePartFile # [|`]-# hs =s + 1 contains =NERDTreePart
3429
-
3430
- " quickhelp syntax elements
3431
- syn match NERDTreeHelpKey # " \{ 1,2\} [^ ]*:# hs =s + 2 ,he =e - 1
3432
- syn match NERDTreeHelpKey # " \{ 1,2\} [^ ]*,# hs =s + 2 ,he =e - 1
3433
- syn match NERDTreeHelpTitle # " .*\~ # hs =s + 2 ,he =e - 1 contains =NERDTreeFlag
3434
- syn match NERDTreeToggleOn # ".*(on)# hs =e - 2 ,he =e - 1 contains =NERDTreeHelpKey
3435
- syn match NERDTreeToggleOff # ".*(off)# hs =e - 3 ,he =e - 1 contains =NERDTreeHelpKey
3436
- syn match NERDTreeHelpCommand # " :.\{ -}\> # hs =s + 3
3437
- syn match NERDTreeHelp # ^".*# contains =NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
3438
-
3439
- " highlighting for readonly files
3440
- syn match NERDTreeRO # .*\[ RO\] # hs =s + 2 contains =NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
3441
-
3442
- " highlighting for sym links
3443
- syn match NERDTreeLink # [^-| `].* -> # contains =NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
3444
-
3445
- " highlighing for directory nodes and file nodes
3446
- syn match NERDTreeDirSlash # /#
3447
- syn match NERDTreeDir # [^-| `].*/# contains =NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
3448
- syn match NERDTreeExecFile # [|` ].*\*\( $\| \) # contains =NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
3449
- syn match NERDTreeFile # |-.*# contains =NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
3450
- syn match NERDTreeFile # `-.*# contains =NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
3451
- syn match NERDTreeCWD # ^[</].*$#
3452
-
3453
- " highlighting for bookmarks
3454
- syn match NERDTreeBookmark # {.*}# hs =s + 1
3455
-
3456
- " highlighting for the bookmarks table
3457
- syn match NERDTreeBookmarksLeader # ^>#
3458
- syn match NERDTreeBookmarksHeader # ^>-\+ Bookmarks-\+ $# contains =NERDTreeBookmarksLeader
3459
- syn match NERDTreeBookmarkName # ^>.\{ -} # he =e - 1 contains =NERDTreeBookmarksLeader
3460
- syn match NERDTreeBookmark # ^>.*$# contains =NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
3461
-
3462
- if g: NERDChristmasTree
3463
- hi def link NERDTreePart Special
3464
- hi def link NERDTreePartFile Type
3465
- hi def link NERDTreeFile Normal
3466
- hi def link NERDTreeExecFile Title
3467
- hi def link NERDTreeDirSlash Identifier
3468
- hi def link NERDTreeClosable Type
3469
- else
3470
- hi def link NERDTreePart Normal
3471
- hi def link NERDTreePartFile Normal
3472
- hi def link NERDTreeFile Normal
3473
- hi def link NERDTreeClosable Title
3474
- endif
3475
-
3476
- hi def link NERDTreeBookmarksHeader statement
3477
- hi def link NERDTreeBookmarksLeader ignore
3478
- hi def link NERDTreeBookmarkName Identifier
3479
- hi def link NERDTreeBookmark normal
3480
-
3481
- hi def link NERDTreeHelp String
3482
- hi def link NERDTreeHelpKey Identifier
3483
- hi def link NERDTreeHelpCommand Identifier
3484
- hi def link NERDTreeHelpTitle Macro
3485
- hi def link NERDTreeToggleOn Question
3486
- hi def link NERDTreeToggleOff WarningMsg
3487
-
3488
- hi def link NERDTreeDir Directory
3489
- hi def link NERDTreeUp Directory
3490
- hi def link NERDTreeCWD Statement
3491
- hi def link NERDTreeLink Macro
3492
- hi def link NERDTreeOpenable Title
3493
- hi def link NERDTreeFlag ignore
3494
- hi def link NERDTreeRO WarningMsg
3495
- hi def link NERDTreeBookmark Statement
3496
-
3497
- hi def link NERDTreeCurrentNode Search
3498
- endfunction
3410
+ " function! s:setupSyntaxHighlighting()
3411
+ " " NERDTreeFlags are syntax items that should be invisible, but give clues as to
3412
+ " " how things should be highlighted
3413
+ " syn match NERDTreeFlag #\~#
3414
+ " syn match NERDTreeFlag #\[RO\]#
3415
+
3416
+ " " highlighting for the .. (up dir) line at the top of the tree
3417
+ " execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
3418
+
3419
+ " " highlighting for the ~/+ symbols for the directory nodes
3420
+ " syn match NERDTreeClosable #\~\<#
3421
+ " syn match NERDTreeClosable #\~\.#
3422
+ " syn match NERDTreeOpenable #+\<#
3423
+ " syn match NERDTreeOpenable #+\.#he=e-1
3424
+
3425
+ " " highlighting for the tree structural parts
3426
+ " syn match NERDTreePart #|#
3427
+ " syn match NERDTreePart #`#
3428
+ " syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
3429
+
3430
+ " " quickhelp syntax elements
3431
+ " syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
3432
+ " syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
3433
+ " syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag
3434
+ " syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey
3435
+ " syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey
3436
+ " syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
3437
+ " syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
3438
+
3439
+ " " highlighting for readonly files
3440
+ " syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
3441
+
3442
+ " " highlighting for sym links
3443
+ " syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
3444
+
3445
+ " " highlighing for directory nodes and file nodes
3446
+ " syn match NERDTreeDirSlash #/#
3447
+ " syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
3448
+ " syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
3449
+ " syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
3450
+ " syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
3451
+ " syn match NERDTreeCWD #^[</].*$#
3452
+
3453
+ " " highlighting for bookmarks
3454
+ " syn match NERDTreeBookmark # {.*}#hs=s+1
3455
+
3456
+ " " highlighting for the bookmarks table
3457
+ " syn match NERDTreeBookmarksLeader #^>#
3458
+ " syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
3459
+ " syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
3460
+ " syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
3461
+
3462
+ " if g:NERDChristmasTree
3463
+ " hi def link NERDTreePart Special
3464
+ " hi def link NERDTreePartFile Type
3465
+ " hi def link NERDTreeFile Normal
3466
+ " hi def link NERDTreeExecFile Title
3467
+ " hi def link NERDTreeDirSlash Identifier
3468
+ " hi def link NERDTreeClosable Type
3469
+ " else
3470
+ " hi def link NERDTreePart Normal
3471
+ " hi def link NERDTreePartFile Normal
3472
+ " hi def link NERDTreeFile Normal
3473
+ " hi def link NERDTreeClosable Title
3474
+ " endif
3475
+
3476
+ " hi def link NERDTreeBookmarksHeader statement
3477
+ " hi def link NERDTreeBookmarksLeader ignore
3478
+ " hi def link NERDTreeBookmarkName Identifier
3479
+ " hi def link NERDTreeBookmark normal
3480
+
3481
+ " hi def link NERDTreeHelp String
3482
+ " hi def link NERDTreeHelpKey Identifier
3483
+ " hi def link NERDTreeHelpCommand Identifier
3484
+ " hi def link NERDTreeHelpTitle Macro
3485
+ " hi def link NERDTreeToggleOn Question
3486
+ " hi def link NERDTreeToggleOff WarningMsg
3487
+
3488
+ " hi def link NERDTreeDir Directory
3489
+ " hi def link NERDTreeUp Directory
3490
+ " hi def link NERDTreeCWD Statement
3491
+ " hi def link NERDTreeLink Macro
3492
+ " hi def link NERDTreeOpenable Title
3493
+ " hi def link NERDTreeFlag ignore
3494
+ " hi def link NERDTreeRO WarningMsg
3495
+ " hi def link NERDTreeBookmark Statement
3496
+
3497
+ " hi def link NERDTreeCurrentNode Search
3498
+ " endfunction
3499
3499
3500
3500
" FUNCTION: s:stripMarkupFromLine(line, removeLeadingSpaces){{{2
3501
3501
" returns the given line with all the tree parts stripped off
0 commit comments