Mercurial > vim
annotate runtime/syntax/netrw.vim @ 11733:8184a3de9d9b v8.0.0749
patch 8.0.0749: some unicode digraphs are hard to remember
commit https://github.com/vim/vim/commit/816e7660e1efb918ad85b5c78d21b957d1bcad17
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 22 20:42:04 2017 +0200
patch 8.0.0749: some unicode digraphs are hard to remember
Problem: Some unicode digraphs are hard to remember.
Solution: Add alternatives with a backtick. (Chris Harding, closes https://github.com/vim/vim/issues/1861)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 22 Jul 2017 20:45:05 +0200 |
parents | 43efa4f5a8ea |
children | 65d7fd8381a3 |
rev | line source |
---|---|
829 | 1 " Language : Netrw Remote-Directory Listing Syntax |
6476 | 2 " Maintainer : Charles E. Campbell |
3 " Last change: Oct 06, 2014 | |
4 " Version : 19 | |
829 | 5 " --------------------------------------------------------------------- |
6 | |
7 " Syntax Clearing: {{{1 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7183
diff
changeset
|
8 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7183
diff
changeset
|
9 if exists("b:current_syntax") |
829 | 10 finish |
11 endif | |
12 | |
13 " --------------------------------------------------------------------- | |
14 " Directory List Syntax Highlighting: {{{1 | |
1619 | 15 syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion,netrwCopyTgt |
16 syn cluster NetrwTreeGroup contains=netrwDir,netrwSymLink,netrwExe | |
829 | 17 |
6476 | 18 syn match netrwPlain "\(\S\+ \)*\S\+" contains=netrwLink,@NoSpell |
2034 | 19 syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell |
20 syn match netrwDir "\.\{1,2}/" contains=netrwClassify,@NoSpell | |
5618 | 21 syn match netrwDir "\%(\S\+ \)*\S\+/\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell |
2034 | 22 syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s" skipwhite contains=netrwDateSep,@NoSpell nextgroup=netrwTime |
23 syn match netrwSymLink "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell | |
3153 | 24 syn match netrwExe "\%(\S\+ \)*\S*[^~]\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell |
6476 | 25 if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4') |
5618 | 26 syn match netrwTreeBar "^\%([-+|│] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup |
6476 | 27 else |
28 syn match netrwTreeBar "^\%([-+|] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup | |
29 endif | |
2034 | 30 syn match netrwTreeBarSpace " " contained |
829 | 31 |
2034 | 32 syn match netrwClassify "[*=|@/]\ze\%(\s\{2,}\|$\)" contained |
33 syn match netrwDateSep "/" contained | |
34 syn match netrwTime "\d\{1,2}:\d\{2}:\d\{2}" contained contains=netrwTimeSep | |
1121 | 35 syn match netrwTimeSep ":" |
829 | 36 |
2034 | 37 syn match netrwComment '".*\%(\t\|$\)' contains=@NetrwGroup,@NoSpell |
38 syn match netrwHide '^"\s*\(Hid\|Show\)ing:' skipwhite contains=@NoSpell nextgroup=netrwHidePat | |
829 | 39 syn match netrwSlash "/" contained |
2034 | 40 syn match netrwHidePat "[^,]\+" contained skipwhite contains=@NoSpell nextgroup=netrwHideSep |
41 syn match netrwHideSep "," contained skipwhite nextgroup=netrwHidePat | |
42 syn match netrwSortBy "Sorted by" contained transparent skipwhite nextgroup=netrwList | |
43 syn match netrwSortSeq "Sort sequence:" contained transparent skipwhite nextgroup=netrwList | |
44 syn match netrwCopyTgt "Copy/Move Tgt:" contained transparent skipwhite nextgroup=netrwList | |
45 syn match netrwList ".*$" contained contains=netrwComma,@NoSpell | |
829 | 46 syn match netrwComma "," contained |
5734 | 47 syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,netrwQHTopic,@NoSpell keepend contained |
48 syn match netrwHelpCmd "\S\+\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep | |
6476 | 49 syn match netrwQHTopic "([a-zA-Z &]\+)" contained skipwhite |
829 | 50 syn match netrwCmdSep ":" contained nextgroup=netrwCmdNote |
2034 | 51 syn match netrwCmdNote ".\{-}\ze " contained contains=@NoSpell |
52 syn match netrwVersion "(netrw.*)" contained contains=@NoSpell | |
6476 | 53 syn match netrwLink "-->" contained skipwhite |
829 | 54 |
1619 | 55 " ----------------------------- |
56 " Special filetype highlighting {{{1 | |
57 " ----------------------------- | |
58 if exists("g:netrw_special_syntax") && netrw_special_syntax | |
2034 | 59 syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell |
60 syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell | |
61 if has("unix") | |
62 syn match netrwCoreDump "\<core\%(\.\d\+\)\=\>" contains=netrwTreeBar,@NoSpell | |
63 endif | |
4339 | 64 syn match netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell |
65 syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell | |
2034 | 66 syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell |
4339 | 67 syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\)" contains=netrwTreeBar,@NoSpell |
68 syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" contains=netrwTreeBar,@NoSpell | |
2034 | 69 syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell |
70 syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell | |
71 syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell | |
4339 | 72 syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell |
2034 | 73 syn match netrwTags "\<tags\>" contains=netrwTreeBar,@NoSpell |
3153 | 74 syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell |
2034 | 75 syn match netrwTmp "\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell |
1619 | 76 endif |
77 | |
829 | 78 " --------------------------------------------------------------------- |
79 " Highlighting Links: {{{1 | |
1619 | 80 if !exists("did_drchip_netrwlist_syntax") |
829 | 81 let did_drchip_netrwlist_syntax= 1 |
2034 | 82 hi default link netrwClassify Function |
83 hi default link netrwCmdSep Delimiter | |
84 hi default link netrwComment Comment | |
85 hi default link netrwDir Directory | |
86 hi default link netrwHelpCmd Function | |
5734 | 87 hi default link netrwQHTopic Number |
2034 | 88 hi default link netrwHidePat Statement |
89 hi default link netrwHideSep netrwComment | |
90 hi default link netrwList Statement | |
91 hi default link netrwVersion Identifier | |
92 hi default link netrwSymLink Question | |
93 hi default link netrwExe PreProc | |
94 hi default link netrwDateSep Delimiter | |
829 | 95 |
2034 | 96 hi default link netrwTreeBar Special |
97 hi default link netrwTimeSep netrwDateSep | |
98 hi default link netrwComma netrwComment | |
99 hi default link netrwHide netrwComment | |
2908 | 100 hi default link netrwMarkFile TabLineSel |
6476 | 101 hi default link netrwLink Special |
1619 | 102 |
103 " special syntax highlighting (see :he g:netrw_special_syntax) | |
2034 | 104 hi default link netrwBak NonText |
105 hi default link netrwCompress Folded | |
106 hi default link netrwCoreDump WarningMsg | |
107 hi default link netrwData DiffChange | |
4339 | 108 hi default link netrwHdr netrwPlain |
109 hi default link netrwLex netrwPlain | |
2034 | 110 hi default link netrwLib DiffChange |
111 hi default link netrwMakefile DiffChange | |
112 hi default link netrwObj Folded | |
113 hi default link netrwTilde Folded | |
114 hi default link netrwTmp Folded | |
115 hi default link netrwTags Folded | |
4339 | 116 hi default link netrwYacc netrwPlain |
829 | 117 endif |
118 | |
119 " Current Syntax: {{{1 | |
120 let b:current_syntax = "netrwlist" | |
121 " --------------------------------------------------------------------- | |
122 " vim: ts=8 fdm=marker |