diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:54:59 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:54:59 -0400 |
commit | 3adcf542289a0883924ae9b9be8b898c36702c95 (patch) | |
tree | f02166ef4c95161ffa994eb1a3e5729c93c2c66b /.vim/pack/vendor/start/nerdtree/syntax | |
parent | dfcc303e7cc284a45f55bae81ed888dc256432b8 (diff) |
Add some Vim plugins
Diffstat (limited to '.vim/pack/vendor/start/nerdtree/syntax')
-rw-r--r-- | .vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim b/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim new file mode 100644 index 0000000..c4197ee --- /dev/null +++ b/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim | |||
@@ -0,0 +1,97 @@ | |||
1 | let s:tree_up_dir_line = '.. (up a dir)' | ||
2 | syn match NERDTreeIgnore #\~# | ||
3 | exec 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#' | ||
4 | |||
5 | "highlighting for the .. (up dir) line at the top of the tree | ||
6 | execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line .'#' | ||
7 | |||
8 | "quickhelp syntax elements | ||
9 | syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#ms=s+2,me=e-1 | ||
10 | syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#ms=s+2,me=e-1 | ||
11 | syn match NERDTreeHelpTitle #" .*\~$#ms=s+2,me=e-1 | ||
12 | syn match NERDTreeToggleOn #(on)#ms=s+1,he=e-1 | ||
13 | syn match NERDTreeToggleOff #(off)#ms=e-3,me=e-1 | ||
14 | syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3 | ||
15 | syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeIgnore,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand | ||
16 | |||
17 | "highlighting for sym links | ||
18 | syn match NERDTreeLinkTarget #->.*# containedin=NERDTreeDir,NERDTreeFile | ||
19 | syn match NERDTreeLinkFile #.* ->#me=e-3 containedin=NERDTreeFile | ||
20 | syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir | ||
21 | |||
22 | "highlighting to conceal the delimiter around the file/dir name | ||
23 | if has('conceal') | ||
24 | exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# conceal containedin=ALL' | ||
25 | setlocal conceallevel=2 concealcursor=nvic | ||
26 | else | ||
27 | exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# containedin=ALL' | ||
28 | hi! link NERDTreeNodeDelimiters Ignore | ||
29 | endif | ||
30 | |||
31 | "highlighing for directory nodes and file nodes | ||
32 | syn match NERDTreeDirSlash #/# containedin=NERDTreeDir | ||
33 | |||
34 | if g:NERDTreeDirArrowExpandable !=# '' | ||
35 | exec 'syn match NERDTreeClosable #' . escape(g:NERDTreeDirArrowCollapsible, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile' | ||
36 | exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile' | ||
37 | let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-') | ||
38 | exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#' | ||
39 | exec 'syn match NERDTreeExecFile #^.*'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName' | ||
40 | exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile' | ||
41 | else | ||
42 | exec 'syn match NERDTreeDir #[^'.g:NERDTreeNodeDelimiter.']\{-}/\ze\($\|'.g:NERDTreeNodeDelimiter.'\)#' | ||
43 | exec 'syn match NERDTreeExecFile #[^'.g:NERDTreeNodeDelimiter.']\{-}'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName' | ||
44 | exec 'syn match NERDTreeFile #^.*'.g:NERDTreeNodeDelimiter.'.*[^\/]\($\|'.g:NERDTreeNodeDelimiter.'.*\)# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile' | ||
45 | endif | ||
46 | |||
47 | "highlighting for readonly files | ||
48 | exec 'syn match NERDTreeRO #.*'.g:NERDTreeNodeDelimiter.'\zs.*\ze'.g:NERDTreeNodeDelimiter.'.*\['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmarkName,NERDTreeFile' | ||
49 | |||
50 | exec 'syn match NERDTreeFlags #\[[^\]]*\]\ze'.g:NERDTreeNodeDelimiter.'# containedin=NERDTreeFile,NERDTreeExecFile,NERDTreeLinkFile,NERDTreeRO,NERDTreeDir' | ||
51 | |||
52 | syn match NERDTreeCWD #^[</].*$# | ||
53 | |||
54 | "highlighting for bookmarks | ||
55 | syn match NERDTreeBookmarkName # {.*}#hs=s+2,he=e-1 | ||
56 | |||
57 | "highlighting for the bookmarks table | ||
58 | syn match NERDTreeBookmarksLeader #^># | ||
59 | syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader | ||
60 | syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader | ||
61 | syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader | ||
62 | |||
63 | hi def link NERDTreePart Special | ||
64 | hi def link NERDTreePartFile Type | ||
65 | hi def link NERDTreeExecFile Title | ||
66 | hi def link NERDTreeDirSlash Identifier | ||
67 | |||
68 | hi def link NERDTreeBookmarksHeader statement | ||
69 | hi def link NERDTreeBookmarksLeader ignore | ||
70 | hi def link NERDTreeBookmarkName Identifier | ||
71 | hi def link NERDTreeBookmark normal | ||
72 | |||
73 | hi def link NERDTreeHelp String | ||
74 | hi def link NERDTreeHelpKey Identifier | ||
75 | hi def link NERDTreeHelpCommand Identifier | ||
76 | hi def link NERDTreeHelpTitle Macro | ||
77 | hi def link NERDTreeToggleOn Question | ||
78 | hi def link NERDTreeToggleOff WarningMsg | ||
79 | |||
80 | hi def link NERDTreeLinkTarget Type | ||
81 | hi def link NERDTreeLinkFile Macro | ||
82 | hi def link NERDTreeLinkDir Macro | ||
83 | |||
84 | hi def link NERDTreeDir Directory | ||
85 | hi def link NERDTreeUp Directory | ||
86 | hi def link NERDTreeFile Normal | ||
87 | hi def link NERDTreeCWD Statement | ||
88 | hi def link NERDTreeOpenable Directory | ||
89 | hi def link NERDTreeClosable Directory | ||
90 | hi def link NERDTreeIgnore ignore | ||
91 | hi def link NERDTreeRO WarningMsg | ||
92 | hi def link NERDTreeBookmark Statement | ||
93 | hi def link NERDTreeFlags Number | ||
94 | |||
95 | hi def link NERDTreeCurrentNode Search | ||
96 | |||
97 | hi NERDTreeFile ctermbg=NONE guibg=NONE | ||