robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
c7a9404019
master
1" Creator: Charles E Campbell 2" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com> 3" Maintainer: This runtime file is looking for a new maintainer. 4" Language: Netrw Listing Syntax 5 6 7if exists ( "b:current_syntax" ) 8finish 9endif 10 11let b: current_syntax = "netrwlist" 12 13" Directory List Syntax Highlighting: {{{ 14 15syn cluster NetrwGroup contains = netrwHide , netrwSortBy , netrwSortSeq , netrwQuickHelp , netrwVersion , netrwCopyTgt 16syn cluster NetrwTreeGroup contains = netrwDir , netrwSymLink , netrwExe 17 18syn match netrwPlain "\(\S\+ \) * \S\+ "contains = netrwLink , @NoSpell 19syn match netrwSpecial "\%(\S\+ \) * \S\+ [ *|= ] \ze\%(\s\{2,}\|$\) "contains = netrwClassify , @NoSpell 20syn match netrwDir "\.\{1,2}/ "contains = netrwClassify , @NoSpell 21syn match netrwDir "\%(\S\+ \) * \S\+/\ze\%(\s\{2,}\|$\) "contains = netrwClassify , @NoSpell 22syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s "skipwhite contains = netrwDateSep , @NoSpell nextgroup = netrwTime 23syn match netrwSymLink "\%(\S\+ \) * \S\+@\ze\%(\s\{2,}\|$\) "contains = netrwClassify , @NoSpell 24syn match netrwExe "\%(\S\+ \) * \S * [ ^~ ] \*\ze\%(\s\{2,}\|$\) "contains = netrwClassify , @NoSpell 25if has ( "gui_running" ) && ( & enc == 'utf-8' || & enc == 'utf-16' || & enc == 'ucs-4' ) 26syn match netrwTreeBar "^\%( [ -+|│ ] \)\+ "contains = netrwTreeBarSpace nextgroup = @netrwTreeGroup 27else 28syn match netrwTreeBar "^\%( [ -+| ] \)\+ "contains = netrwTreeBarSpace nextgroup = @netrwTreeGroup 29endif 30syn match netrwTreeBarSpace "" contained 31 32syn match netrwClassify "[ *=|@/ ] \ze\%(\s\{2,}\|$\) "contained 33syn match netrwDateSep "/ "contained 34syn match netrwTime "\d\{1,2}:\d\{2}:\d\{2} "contained contains = netrwTimeSep 35syn match netrwTimeSep ": " 36 37syn match netrwComment '". * \%(\t\|$\) 'contains = @NetrwGroup , @NoSpell 38syn match netrwHide '^"\s * \(Hid\|Show\)ing: 'skipwhite contains = @NoSpell nextgroup = netrwHidePat 39syn match netrwSlash "/ "contained 40syn match netrwHidePat "[ ^, ] \+ "contained skipwhite contains = @NoSpell nextgroup = netrwHideSep 41syn match netrwHideSep ", "contained skipwhite nextgroup = netrwHidePat 42syn match netrwSortBy "Sorted by "contained transparent skipwhite nextgroup = netrwList 43syn match netrwSortSeq "Sort sequence: "contained transparent skipwhite nextgroup = netrwList 44syn match netrwCopyTgt "Copy/Move Tgt: "contained transparent skipwhite nextgroup = netrwList 45syn match netrwList ". * $ "contained contains = netrwComma , @NoSpell 46syn match netrwComma ", "contained 47syn region netrwQuickHelp matchgroup = Comment start = "Quick Help:\s\+ "end = "$ "contains = netrwHelpCmd , netrwQHTopic , @NoSpell keepend contained 48syn match netrwHelpCmd "\S\+\ze: "contained skipwhite contains = @NoSpell nextgroup = netrwCmdSep 49syn match netrwQHTopic "( [ a-zA-Z & ] \+) "contained skipwhite 50syn match netrwCmdSep ": "contained nextgroup = netrwCmdNote 51syn match netrwCmdNote ".\{-}\ze "contained contains = @NoSpell 52syn match netrwVersion "(netrw. * ) "contained contains = @NoSpell 53syn match netrwLink "--> "contained skipwhite 54 55" }}} 56" Special filetype highlighting {{{ 57 58if exists ( "g:netrw_special_syntax" ) && g: netrw_special_syntax 59if exists ( "+suffixes" ) && & suffixes != "" 60let suflist = join ( split ( & suffixes , ',' )) 61let suflist = escape ( substitute ( suflist , " " , '\\|' , 'g' ), '.~' ) 62exe "syn match netrwSpecFile '\\(\\S\\+ \\)*\\S*\\(" . suflist . "\\)\\>' contains=netrwTreeBar,@NoSpell" 63endif 64syn match netrwBak "\(\S\+ \) * \S\+\.bak\> "contains = netrwTreeBar , @NoSpell 65syn match netrwCompress "\(\S\+ \) * \S\+\.\%(gz\|bz2\|Z\|zip\)\> "contains = netrwTreeBar , @NoSpell 66if has ( "unix" ) 67syn match netrwCoreDump "\<core\%(\.\d\+\)\=\> "contains = netrwTreeBar , @NoSpell 68endif 69syn match netrwLex "\(\S\+ \) * \S\+\.\%(l\|lex\)\> "contains = netrwTreeBar , @NoSpell 70syn match netrwYacc "\(\S\+ \) * \S\+\.y\> "contains = netrwTreeBar , @NoSpell 71syn match netrwData "\(\S\+ \) * \S\+\.dat\> "contains = netrwTreeBar , @NoSpell 72syn match netrwDoc "\(\S\+ \) * \S\+\.\%(doc\|txt\|pdf\|ps\|docx\)\> "contains = netrwTreeBar , @NoSpell 73syn match netrwHdr "\(\S\+ \) * \S\+\.\%(h\|hpp\)\> "contains = netrwTreeBar , @NoSpell 74syn match netrwLib "\(\S\+ \) * \S * \.\%(a\|so\|lib\|dll\)\> "contains = netrwTreeBar , @NoSpell 75syn match netrwMakeFile "\< [ mM ] akefile\>\|\(\S\+ \) * \S\+\.mak\> "contains = netrwTreeBar , @NoSpell 76syn match netrwObj "\(\S\+ \) * \S * \.\%(o\|obj\)\> "contains = netrwTreeBar , @NoSpell 77syn match netrwPix "\c\(\S\+ \) * \S * \.\%(bmp\|fits\=\|gif\|je\=pg\|pcx\|ppc\|pgm\|png\|ppm\|psd\|rgb\|tif\|xbm\|xcf\)\> "contains = netrwTreeBar , @NoSpell 78syn match netrwTags "\<\(ANmenu\|ANtags\)\> "contains = netrwTreeBar , @NoSpell 79syn match netrwTags "\<tags\> "contains = netrwTreeBar , @NoSpell 80syn match netrwTilde "\(\S\+ \) * \S\+\~\*\=\> "contains = netrwTreeBar , @NoSpell 81syn match netrwTmp "\<tmp\(\S\+ \) * \S\+\>\|\(\S\+ \) * \S * tmp\> "contains = netrwTreeBar , @NoSpell 82endif 83 84" }}} 85" Highlighting Links: {{{ 86 87if ! exists ( "did_drchip_netrwlist_syntax" ) 88let did_drchip_netrwlist_syntax = 1 89hi default link netrwClassify Function 90hi default link netrwCmdSep Delimiter 91hi default link netrwComment Comment 92hi default link netrwDir Directory 93hi default link netrwHelpCmd Function 94hi default link netrwQHTopic Number 95hi default link netrwHidePat Statement 96hi default link netrwHideSep netrwComment 97hi default link netrwList Statement 98hi default link netrwVersion Identifier 99hi default link netrwSymLink Question 100hi default link netrwExe PreProc 101hi default link netrwDateSep Delimiter 102 103hi default link netrwTreeBar Special 104hi default link netrwTimeSep netrwDateSep 105hi default link netrwComma netrwComment 106hi default link netrwHide netrwComment 107hi default link netrwMarkFile TabLineSel 108hi default link netrwLink Special 109 110" special syntax highlighting (see :he g:netrw_special_syntax) 111hi default link netrwCoreDump WarningMsg 112hi default link netrwData Folded 113hi default link netrwHdr netrwPlain 114hi default link netrwLex netrwPlain 115hi default link netrwLib DiffChange 116hi default link netrwMakefile DiffChange 117hi default link netrwYacc netrwPlain 118hi default link netrwPix Special 119 120hi default link netrwBak netrwGray 121hi default link netrwCompress netrwGray 122hi default link netrwSpecFile netrwGray 123hi default link netrwObj netrwGray 124hi default link netrwTags netrwGray 125hi default link netrwTilde netrwGray 126hi default link netrwTmp netrwGray 127endif 128 129" set up netrwGray to be understated (but not Ignore'd or Conceal'd, as those 130" can be hard/impossible to read). Users may override this in a colorscheme by 131" specifying netrwGray highlighting. 132redir => s:netrwgray 133sil hi netrwGray 134redir END 135 136if s: netrwgray !~ 'guifg' 137if has ( "gui" ) && has ( "gui_running" ) 138if & bg == "dark" 139exe "hi netrwGray gui=NONE guifg=gray30" 140else 141exe "hi netrwGray gui=NONE guifg=gray70" 142endif 143else 144hi link netrwGray Folded 145endif 146endif 147 148" }}} 149 150" vim:ts=8 sts=4 sw=4 et fdm=marker