dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

netrw.vim (7206B)


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