xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
<root> / data / vim / syntax / vifm.vim (bf520f8491ac81aadf8d7b6d1d40717f6333662c) (25KiB) (mode 100644) [raw]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518
" vifm syntax file
" Maintainer:  xaizek <xaizek@posteo.net>
" Last Change: May 2, 2024
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.

if exists('b:current_syntax')
	finish
endif

let b:current_syntax = 'vifm'

let s:cpo_save = &cpo
set cpo-=C

" General commands
syntax keyword vifmCommand contained
		\ alink apropos bmark bmarks bmgo cds change chi[story] chmod chown clone
		\ compare cope[n] co[py] cq[uit] d[elete] delbmarks delm[arks] delsession
		\ di[splay] dirs e[dit] el[se] empty en[dif] exi[t] file fin[d] fini[sh]
		\ go[to] gr[ep] h[elp] hideui histnext his[tory] histprev keepsel jobs
		\ locate ls lstrash marks media mes[sages] mkdir m[ove] noh[lsearch]
		\ on[ly] plugin plugins popd pushd pu[t] pw[d] qa[ll] q[uit] redr[aw]
		\ rege[dit] reg[isters] regular rename restart restore rlink screen sh[ell]
		\ siblnext siblprev sor[t] sp[lit] st[op] s[ubstitute] tabc[lose] tabm[ove]
		\ tabname tabnew tabn[ext] tabo[nly] tabp[revious] touch tr trashes tree
		\ session sync undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite]
		\ wq wqa[ll] xa[ll] x[it] y[ank]
		\ nextgroup=vifmArgs
syntax keyword vifmCommandCN contained
		\ alink apropos bmark bmarks bmgo cds change chi[story] chmod chown clone
		\ compare cope[n] co[py] cq[uit] d[elete] delbmarks delm[arks] delsession
		\ di[splay] dirs e[dit] el[se] empty en[dif] exi[t] file fin[d] fini[sh]
		\ go[to] gr[ep] h[elp] hideui histnext his[tory] histprev keepsel jobs
		\ locate ls lstrash marks media mes[sages] mkdir m[ove] noh[lsearch]
		\ on[ly] plugin plugins popd pushd pu[t] pw[d] qa[ll] q[uit] redr[aw]
		\ rege[dit] reg[isters] regular rename restart restore rlink screen sh[ell]
		\ siblnext siblprev sor[t] sp[lit] st[op] s[ubstitute] tabc[lose] tabm[ove]
		\ tabname tabnew tabn[ext] tabo[nly] tabp[revious] touch tr trashes tree
		\ session sync undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite]
		\ wq wqa[ll] xa[ll] x[it] y[ank]
		\ nextgroup=vifmArgsCN

" commands that might be prepended to a command without changing everything else
syntax keyword vifmPrefixCommands contained windo winrun

" Map commands
syntax keyword vifmMap contained amap anoremap aunmap dm[ap] dn[oremap] du[nmap]
		\ map mm[ap] mn[oremap] mu[nmap] nm[ap] nn[oremap] no[remap] nun[map] qm[ap]
		\ qn[oremap] qun[map] unm[ap] vm[ap] vn[oremap] vu[nmap]
		\ skipwhite nextgroup=vifmMapArgs
syntax keyword vifmCMapAbbr contained ca[bbrev] cm[ap] cnorea[bbrev] cno[remap]
		\ cuna[bbrev] cu[nmap]
		\ skipwhite nextgroup=vifmCMapArgs

" Other commands
syntax keyword vifmAutocmdCommand contained au[tocmd] nextgroup=vifmAutoEvent
syntax keyword vifmCdCommand contained cd
syntax keyword vifmCmdCommand contained com[mand] nextgroup=vifmCmdCommandName
syntax keyword vifmColoCommand contained colo[rscheme]
syntax keyword vifmHiCommand contained hi[ghlight]
syntax keyword vifmInvertCommand contained invert
syntax keyword vifmLetCommand contained let
syntax keyword vifmUnletCommand contained unl[et]
syntax keyword vifmSetCommand contained se[t] setl[ocal] setg[lobal]
syntax keyword vifmSoCommand contained so[urce]
syntax keyword vifmMarkCommand contained ma[rk]
syntax keyword vifmFtCommand contained filet[ype] filex[type] filev[iewer]
syntax keyword vifmExprCommand contained if ec[ho] elsei[f] exe[cute]
syntax keyword vifmNormalCommand contained norm[al]
		\ nextgroup=vifmColonSubcommand
syntax match vifmPatternCommands contained /\<\(filter\(!\|\>\)\|select\(!\|\>\)\|unselect\>\)/ skipwhite
		\ nextgroup=vifmPatterns

" List of event names for autocommands (case insensitive)
syntax case ignore
syntax keyword vifmAutoEvent contained DirEnter nextgroup=vifmStatementC
syntax case match

" Builtin functions
syntax match vifmBuiltinFunction
		\ '\(chooseopt
		  \\|escape
		  \\|expand
		  \\|executable
		  \\|extcached
		  \\|filereadable
		  \\|filetype
		  \\|fnameescape
		  \\|getpanetype
		  \\|has
		  \\|input
		  \\|layoutis
		  \\|paneisat
		  \\|system
		  \\|tabpagenr
		  \\|term
		  \\)\ze('

" Operators
syntax match vifmOperator "\(==\|!=\|>=\?\|<=\?\|\.\|-\|+\|&&\|||\)" skipwhite

" Highlight groups
syntax keyword vifmHiArgs contained cterm ctermfg ctermbg gui guifg guibg
syntax case ignore
syntax keyword vifmHiGroups contained WildMenu Border Win CmdLine CurrLine
		\ OtherLine Directory Link Socket Device Executable Selected BrokenLink
		\ TopLine TopLineSel StatusLine JobLine SuggestBox Fifo ErrorMsg
		\ CmpMismatch CmpUnmatched CmpBlank
		\ AuxWin OtherWin TabLine TabLineSel HardLink LineNr OddLine
		\ User1 User2 User3 User4 User5 User6 User7 User8 User9 User10
		\ User11 User12 User13 User14 User15 User16 User17 User18 User19 User20
syntax keyword vifmHiStyles contained
		\ bold underline reverse inverse standout italic combine none
syntax keyword vifmHiColors contained black red green yellow blue magenta cyan
		\ white default lightblack lightred lightgreen lightyellow lightblue
		\ lightmagenta lightcyan lightwhite Grey0 NavyBlue DarkBlue Blue3 Blue3_2
		\ Blue1 DarkGreen DeepSkyBlue4 DeepSkyBlue4_2 DeepSkyBlue4_3 DodgerBlue3
		\ DodgerBlue2 Green4 SpringGreen4 Turquoise4 DeepSkyBlue3 DeepSkyBlue3_2
		\ DodgerBlue1 Green3 SpringGreen3 DarkCyan LightSeaGreen DeepSkyBlue2
		\ DeepSkyBlue1 Green3_2 SpringGreen3_2 SpringGreen2 Cyan3 DarkTurquoise
		\ Turquoise2 Green1 SpringGreen2_2 SpringGreen1 MediumSpringGreen Cyan2
		\ Cyan1 DarkRed DeepPink4 Purple4 Purple4_2 Purple3 BlueViolet Orange4
		\ Grey37 MediumPurple4 SlateBlue3 SlateBlue3_2 RoyalBlue1 Chartreuse4
		\ DarkSeaGreen4 PaleTurquoise4 SteelBlue SteelBlue3 CornflowerBlue
		\ Chartreuse3 DarkSeaGreen4_2 CadetBlue CadetBlue_2 SkyBlue3 SteelBlue1
		\ Chartreuse3_2 PaleGreen3 SeaGreen3 Aquamarine3 MediumTurquoise
		\ SteelBlue1_2 Chartreuse2 SeaGreen2 SeaGreen1 SeaGreen1_2 Aquamarine1
		\ DarkSlateGray2 DarkRed_2 DeepPink4_2 DarkMagenta DarkMagenta_2 DarkViolet
		\ Purple Orange4_2 LightPink4 Plum4 MediumPurple3 MediumPurple3_2 SlateBlue1
		\ Yellow4 Wheat4 Grey53 LightSlateGrey MediumPurple LightSlateBlue Yellow4_2
		\ DarkOliveGreen3 DarkSeaGreen LightSkyBlue3 LightSkyBlue3_2 SkyBlue2
		\ Chartreuse2_2 DarkOliveGreen3_2 PaleGreen3_2 DarkSeaGreen3 DarkSlateGray3
		\ SkyBlue1 Chartreuse1 LightGreen_2 LightGreen_3 PaleGreen1 Aquamarine1_2
		\ DarkSlateGray1 Red3 DeepPink4_3 MediumVioletRed Magenta3 DarkViolet_2
		\ Purple_2 DarkOrange3 IndianRed HotPink3 MediumOrchid3 MediumOrchid
		\ MediumPurple2 DarkGoldenrod LightSalmon3 RosyBrown Grey63 MediumPurple2_2
		\ MediumPurple1 Gold3 DarkKhaki NavajoWhite3 Grey69 LightSteelBlue3
		\ LightSteelBlue Yellow3 DarkOliveGreen3_3 DarkSeaGreen3_2 DarkSeaGreen2
		\ LightCyan3 LightSkyBlue1 GreenYellow DarkOliveGreen2 PaleGreen1_2
		\ DarkSeaGreen2_2 DarkSeaGreen1 PaleTurquoise1 Red3_2 DeepPink3 DeepPink3_2
		\ Magenta3_2 Magenta3_3 Magenta2 DarkOrange3_2 IndianRed_2 HotPink3_2
		\ HotPink2 Orchid MediumOrchid1 Orange3 LightSalmon3_2 LightPink3 Pink3
		\ Plum3 Violet Gold3_2 LightGoldenrod3 Tan MistyRose3 Thistle3 Plum2
		\ Yellow3_2 Khaki3 LightGoldenrod2 LightYellow3 Grey84 LightSteelBlue1
		\ Yellow2 DarkOliveGreen1 DarkOliveGreen1_2 DarkSeaGreen1_2 Honeydew2
		\ LightCyan1 Red1 DeepPink2 DeepPink1 DeepPink1_2 Magenta2_2 Magenta1
		\ OrangeRed1 IndianRed1 IndianRed1_2 HotPink HotPink_2 MediumOrchid1_2
		\ DarkOrange Salmon1 LightCoral PaleVioletRed1 Orchid2 Orchid1 Orange1
		\ SandyBrown LightSalmon1 LightPink1 Pink1 Plum1 Gold1 LightGoldenrod2_2
		\ LightGoldenrod2_3 NavajoWhite1 MistyRose1 Thistle1 Yellow1 LightGoldenrod1
		\ Khaki1 Wheat1 Cornsilk1 Grey100 Grey3 Grey7 Grey11 Grey15 Grey19 Grey23
		\ Grey27 Grey30 Grey35 Grey39 Grey42 Grey46 Grey50 Grey54 Grey58 Grey62
		\ Grey66 Grey70 Grey74 Grey78 Grey82 Grey85 Grey89 Grey93
syntax case match
syntax match vifmHiGroups contained "column:[A-Z][a-zA-Z]*"
syntax match vifmHiGroups contained
		\ "column:\(ext\|name\|size\|atime\|ctime\|mtime\|iname\|dir\|type\|fileext\|nitems\|groups\|target\|root\|fileroot\|gid\|gname\|mode\|uid\|uname\|perms\|nlinks\|inode\)"

" Options
syntax keyword vifmOption contained aproposprg autocd autochpos caseoptions
		\ cdpath cd chaselinks classify columns co confirm cf cpoptions cpo
		\ cvoptions deleteprg dotdirs dotfiles dirsize fastrun fillchars fcs findprg
		\ followlinks fusehome gdefault grepprg histcursor history hi hloptions
		\ hlsearch hls iec ignorecase ic iooptions incsearch is laststatus lines
		\ locateprg ls lsoptions lsview mediaprg milleroptions millerview
		\ mintimeoutlen mouse navoptions number nu numberwidth nuw previewoptions
		\ previewprg quickview relativenumber rnu rulerformat ruf runexec scrollbind
		\ scb scrolloff sessionoptions ssop so sort sortgroups sortorder sortnumbers
		\ shell sh shellflagcmd shcf shortmess shm showtabline stal sizefmt slowfs
		\ smartcase scs statusline stl suggestoptions syncregs syscalls tablabel
		\ tabline tabprefix tabscope tabstop tabsuffix tal timefmt timeoutlen title
		\ tm trash trashdir ts tuioptions to undolevels ul vicmd viewcolumns
		\ vifminfo vimhelp vixcmd wildmenu wmnu wildstyle wordchars wrap wrapscan ws

" Disabled boolean options
syntax keyword vifmOption contained noautocd noautochpos nocf nochaselinks
		\ nodotfiles nofastrun nofollowlinks nohlsearch nohls noiec noignorecase
		\ noic noincsearch nois nolaststatus nols nolsview nomillerview nonumber
		\ nonu noquickview norelativenumber nornu noscrollbind noscb norunexec
		\ nosmartcase noscs nosortnumbers nosyscalls notitle notrash novimhelp
		\ nowildmenu nowmnu nowrap nowrapscan nows

" Inverted boolean options
syntax keyword vifmOption contained invautocd invautochpos invcf invchaselinks
		\ invdotfiles invfastrun invfollowlinks invhlsearch invhls inviec
		\ invignorecase invic invincsearch invis invlaststatus invls invlsview
		\ invmillerview invnumber invnu invquickview invrelativenumber invrnu
		\ invscrollbind invscb invrunexec invsmartcase invscs invsortnumbers
		\ invsyscalls invtitle invtrash invvimhelp invwildmenu invwmnu invwrap
		\ invwrapscan invws

" Expressions
syntax region vifmStatement start='^\(\s\|:\)*'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend
		\ contains=vifmCommand,vifmCmdCommand,vifmCmdCommandSt,vifmMarkCommandSt
		\,vifmFtCommandSt,vifmCMapAbbr,vifmMap,vifmMapSt,vifmCMapSt,vifmExecute
		\,vifmComment,vifmInlineComment,vifmNotComment,vifmExprCommandSt,vifmNormalCommandSt
		\,vifmCdCommandSt,vifmSet,vifmArgument,vifmSoCommandSt,vifmPrefixCommands
		\,vifmAutocmdCommand,vifmAutoEvent,vifmPatternCommands
" Contained statement with highlighting of angle-brace notation.
syntax region vifmStatementCN start='\(\s\|:\)*'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend contained
		\ contains=vifmCommandCN,vifmCmdCommand,vifmCmdCommandSt,vifmMarkCommandSt
		\,vifmFtCommandStN,vifmCMapAbbr,vifmMap,vifmMapSt,vifmCMapSt,vifmExecute
		\,vifmComment,vifmInlineComment,vifmNotComment,vifmExprCommandSt,vifmNormalCommandSt
		\,vifmNotation,vifmCdCommandStN,vifmSetN,vifmArgument,vifmSoCommand
		\,vifmSoCommandStN,vifmInvertCommand,vifmInvertCommandStN,vifmPrefixCommands
		\,vifmLetCN
" Contained statement without highlighting of angle-brace notation.
syntax region vifmStatementC start='\(\s\|:\)*'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend contained
		\ contains=vifmCommand,vifmCmdCommand,vifmCmdCommandSt,vifmMarkCommandSt
		\,vifmFtCommandSt,vifmCMapAbbr,vifmMap,vifmMapSt,vifmCMapSt,vifmExecute
		\,vifmComment,vifmInlineComment,vifmNotComment,vifmExprCommandSt,vifmNormalCommandSt
		\,vifmCdCommandSt,vifmSet,vifmArgument,vifmSoCommand,vifmSoCommandSt
		\,vifmInvertCommand,vifmInvertCommandSt,vifmPrefixCommands
		\,vifmAutocmdCommand,vifmAutoEvent,vifmPatternCommands,vifmLetC,vifmUnletC
syntax region vifmCmdCommandSt start='^\(\s\|:\)*com\%[mand]\>'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend
		\ contains=vifmCmdCommand,vifmComment,vifmInlineComment,vifmNotComment
syntax region vifmCmdCommandName contained start='!\?\s\+[a-zA-Z]\+' end='\ze\s'
		\ skip='\(\s*\\\)\|\(\s*".*$\)'
		\ nextgroup=vifmCmdArgs
syntax region vifmCmdArgs start='\(\s*\n\s*\\\)\?\s*\S\+'
		\ end='\s' skip='\(\n\s*\\\)\|\(\n\s*".*$\)'
		\ contained
		\ contains=vifmColonSubcommand,vifmComment
syntax region vifmColoCommandSt start='^\(\s\|:\)*colo\%[rscheme]\>' end='$'
		\ keepend oneline contains=vifmColoCommand
syntax region vifmInvertCommandSt start='\(\s\|:\)*invert\>' end='$\||'
		\ keepend oneline contains=vifmInvertCommand
syntax region vifmInvertCommandStN start='\(\s\|:\)*invert\>' end='$\||'
		\ contained keepend oneline contains=vifmInvertCommand,vifmNotation
syntax region vifmSoCommandSt start='\(\s\|:\)*so\%[urce]\>' end='$\||'
		\ keepend oneline
		\ contains=vifmSoCommand,vifmEnvVar,vifmStringInExpr,vifmComment
		\,vifmInlineComment
syntax region vifmSoCommandStN start='\(\s\|:\)*so\%[urce]\>' end='$\||'
		\ contained keepend oneline
		\ contains=vifmSoCommand,vifmEnvVar,vifmNotation,vifmStringInExpr
		\,vifmComment,vifmInlineComment
syntax region vifmMarkCommandSt start='^\(\s\|:\)*ma\%[rk]\>' end='$' keepend
		\ oneline contains=vifmMarkCommand
syntax region vifmCdCommandSt start='\(\s\|:\)*cd\>' end='$\||' keepend oneline
		\ contains=vifmCdCommand,vifmEnvVar,vifmStringInExpr
" Highlight for :cd command with highlighting of angle-brace notation.
syntax region vifmCdCommandStN start='\(\s\|:\)*cd\>' end='$\||' keepend oneline
		\ contained
		\ contains=vifmCdCommand,vifmEnvVar,vifmNotation,vifmStringInExpr
syntax region vifmFtCommandSt start='\(\s\|:\)*file[tvx]'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend
		\ contained
		\ contains=vifmFtBeginning,vifmComment
syntax region vifmFtCommandStN start='\(\s\|:\)*file[tvx]'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$\|\(<[cC][rR]>\)' keepend
		\ contained
		\ contains=vifmComment,vifmNotation,vifmFtBeginning
syntax region vifmMapSt start='^\(\s\|:\)*\(map\|mm\%[ap]\|mn\%[oremap]\|mu\%[nmap]\|nm\%[ap]\|nn\%[oremap]\|no\%[remap]\|nun\%[map]\|qm\%[ap]\|qn\%[oremap]\|qun\%[map]\|unm\%[ap]\|vm\%[ap]\|vn\%[oremap]\|vu\%[nmap]\)'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend
		\ contains=vifmMap
syntax region vifmCMapSt
		\ start='^\(\s\|:\)*\(cm\%[ap]\|cno\%[remap]\|cu\%[nmap]\)'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend
		\ contains=vifmCMapAbbr
syntax region vifmExprCommandSt
		\ start='\<\(if\|ec\%[ho]\|elsei\%[f]\|exe\%[cute]\)\>'
		\ end='$\||'
		\ contains=vifmExprCommand,vifmString,vifmStringInExpr,vifmBuiltinFunction
		\,vifmOperator,vifmEnvVar,vifmNumber
syntax region vifmNormalCommandSt start='\(\s\|:\)*norm\%[al]\>' end='$' keepend
		\ oneline
		\ contains=vifmNormalCommand,vifmComment
syntax region vifmExecute start='!' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
		\ keepend
		\ contains=vifmNotation,vifmComment
syntax region vifmMapArgs start='\ze\S\+'
		\ end='\ze.' skip='\(\n\s*\\\)\|\(\n\s*".*$\)'
		\ contained
		\ nextgroup=vifmMapArgList
syntax region vifmCMapArgs start='\S\+'
		\ end='\n\s*\\' skip='\(\n\s*\\\)\|\(\n\s*".*$\)'
		\ contained
		\ contains=vifmMapArgList,vifmMapLhs,vifmMapCRhs
syntax region vifmMapLhs start='\S\+'
		\ end='\ze\s' skip='\(\s*\\\)\|\(\s*".*$\)'
		\ contained
		\ contains=vifmNotation,vifmComment
		\ nextgroup=vifmMapRhs
syntax region vifmMapRhs start='.'
		\ end='\ze<[cC][rR]>' skip='\(\s*\\\)\|\(\s*".*$\)'
		\ contained keepend
		\ contains=vifmNotation,vifmComment,vifmColonSubcommandN
		\ nextgroup=vifmMapRhs
syntax region vifmMapCRhs start='\s'
		\ end='<[cC][rR]>' skip='\(\s*\\\)\|\(\s*".*$\)'
		\ contained keepend
		\ contains=vifmNotation,vifmComment,vifmSubcommandN
syntax region vifmColonSubcommand start='\s*\(\s*\n\s*\\\)\?:\s*\S\+'
		\ end='$' skip='\s*\n\(\s*\\\)\|\(\s*".*$\)'
		\ contained
		\ contains=vifmStatementC
" Contained sub command with highlighting of angle-brace notation.
syntax region vifmColonSubcommandN start='\s*\(\s*\n\s*\\\)\?:\s*\S\+'
		\ end='\ze<[cC][rR]>\|$' skip='\s*\n\(\s*\\\)\|\(\s*".*$\)' keepend
		\ contained
		\ contains=vifmStatementCN
syntax region vifmSubcommandN start='\s*\(\s*\n\s*\\\)\?:\?\s*\S\+'
		\ end='\ze<[cC][rR]>\|$' skip='\s*\n\(\s*\\\)\|\(\s*".*$\)' keepend
		\ contained
		\ contains=vifmStatementCN
" Non-empty pattern or form [!][{]{*.ext,*.e}[}], [!][/]/regex/[/][iI] or
" <mime-type-globs>, possibly multi-line.
" [!]/regexp/[iI]*
syntax region vifmPattern contained
		\ start='!\?/\ze\(\n\s*\\\|\n\s*".*$\|[^/]\|\\/\)\+/'
		\ skip='\\/\|\(\n\s*\\\)\|\(\n\s*".*$\)' end='/[iI]*\ze\|/\ze\S\+' keepend
		\ contains=vifmComment,vifmInlineComment,vifmNotComment,vifmNotPattern
" [!]//regexp//[iI]*
syntax region vifmPattern contained
		\ start='!\?//\ze\(/[^/]\|\n\s*\\\|\n\s*".*$\|[^/]\|\\/\)\+//'
		\ skip='/[^/]\|\(\n\s*\\\)\|\(\n\s*".*$\)' end='//[iI]*' keepend
		\ contains=vifmComment,vifmInlineComment,vifmNotComment,vifmNotPattern
" [!]{regexp}
syntax region vifmPattern contained
		\ start='!\?{[^}]' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='}' keepend
		\ contains=vifmComment,vifmInlineComment,vifmNotComment,vifmNotPattern
" [!]{{regexp}}
syntax region vifmPattern contained
		\ start='!\?{{\ze.\{-}}}' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='}}' keepend
		\ contains=vifmComment,vifmInlineComment,vifmNotComment,vifmNotPattern
" [!]<regexp>
syntax region vifmPattern contained
		\ start='!\?<[^>]' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='>' keepend
		\ contains=vifmComment,vifmInlineComment,vifmNotComment,vifmNotPattern
syntax region vifmPatterns contained
		\ start='\(^\|\s\)\zs[/{<!]'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)'
		\ end='\(/[a-zA-Z]\{,4}\|[}>iI]\)\(\s\)' keepend
		\ contains=vifmPattern,vifmComment
syntax match vifmNotPattern contained '!\?\({{}}\|\<//\>\|////\)'
syntax region vifmHi
		\ start='^\(\s\|:\)*\<hi\%[ghlight]\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)'
		\ end='$' keepend
		\ contains=vifmHiCommand,vifmHiArgs,vifmHiGroups,vifmHiStyles,vifmHiColors
		\,vifmNumber,vifmComment,vifmInlineComment,vifmNotComment,vifmHiClear
		\,vifmPatterns,vifmHexColor
syntax region vifmFtBeginning contained
		\ start='\<\(filet\%[ype]\|filext\%[ype]\|filev\%[iewer]\)\>\s\+\S'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)'
		\ end='\(\S\zs\s\)' keepend
		\ contains=vifmFtCommand,vifmPatterns,vifmComment

" common highlight for :command arguments without highlighting of angle-bracket
" notation
syntax region vifmArgs start='!\?\zs\(\s*\S\+\|[^a-zA-Z]\)'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='|\|$'
		\ contained
		\ contains=vifmStringInExpr,vifmComment
" common highlight for :command arguments with highlighting of angle-bracket
" notation
syntax region vifmArgsCN start='!\?\zs\(\s*\S\+\|[^a-zA-Z]\)'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='|\|$'
		\ contained
		\ contains=vifmStringInExpr,vifmNotation

syntax region vifmSet
		\ start='\(\s\|:\)*\<\(se\%[t]\|setg\%[lobal]\|setl\%[ocal]\)\>'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
		\ keepend
		\ contains=vifmSetCommand,vifmOption,vifmSetAssignSQS,vifmSetAssignDQS
		\,vifmSetAssignNS,vifmComment,vifmInlineComment,vifmNotComment
syntax region vifmSetN
		\ start='\(\s\|:\)*\<\(se\%[t]\|setg\%[lobal]\|setl\%[ocal]\)\>'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
		\ keepend
		\ contains=vifmSetCommand,vifmOption,vifmSetAssignSQS,vifmSetAssignDQS
		\,vifmSetAssignNSN,vifmComment,vifmInlineComment,vifmNotComment,vifmNotation
syntax region vifmSet2 contained
		\ start='^\(\s\|:\)*\<\(se\%[t]\|setg\%[lobal]\|setl\%[ocal]\)\>'
		\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
		\ keepend
		\ contains=vifmSetCommand,vifmOption,vifmSetAssignSQS,vifmSetAssignDQS
		\,vifmSetAssignNSN,vifmComment,vifmInlineComment,vifmNotComment,vifmNotation

" Highlight for =value part of :set arguments of form option=value

" For single quoted string (check that it starts with =')
syntax region vifmSetAssignSQS contained
		\ start="='" skip=+\\\\\|\\'+ end=+'+ keepend
		\ contains=vifmString
" For double quoted string (check that it starts with =")
syntax region vifmSetAssignDQS contained
		\ start='="' skip=+\\\\\|\\"+ end=+"+ keepend
		\ contains=vifmString
" For not strings (check that it doesn't start with either =' or =")
syntax region vifmSetAssignNS contained
		\ start='=[^"'' ]' skip='\(\n\s*\\\)\|\(\n\s*".*$\)\|^.*\S.*\\\s' end='^\s*\\\s\|[^\\]\s\|$'
		\ extend
		\ contains=vifmNumber,vifmComment,vifmInlineComment
" For not strings (check that it doesn't start with either =' or =")
syntax region vifmSetAssignNSN contained
		\ start='=[^"'' ]' skip='\(\n\s*\\\)\|\(\n\s*".*$\)\|^.*\S.*\\\s' end='^\s*\\\s\|[^\\]\s\|$'
		\ extend
		\ contains=vifmNumber,vifmComment,vifmInlineComment,vifmNotation

" :let command with highlighting of angle-brace notation.
syntax region vifmLet
		\ start='^\(\s\|:\)*\<let\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
		\ keepend
		\ contains=vifmLetCommand,vifmEnvVar,vifmString,vifmStringInExpr,vifmComment
		\,vifmInlineComment,vifmNotComment
" Contained :let command without highlighting of angle-brace notation.
syntax region vifmLetC
		\ start='\<let\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$\||'
		\ keepend
		\ contains=vifmLetCommand,vifmEnvVar,vifmString,vifmStringInExpr,vifmComment
		\,vifmInlineComment,vifmNotComment,vifmBuiltinFunction
" Contained :let command with highlighting of angle-brace notation.
syntax region vifmLetCN
		\ start='\<let\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$\||'
		\ keepend
		\ contains=vifmLetCommand,vifmEnvVar,vifmString,vifmStringInExpr,vifmComment
		\,vifmInlineComment,vifmNotComment,vifmBuiltinFunction,vifmNotation
syntax region vifmUnlet
		\ start='^\(\s\|:\)*\<unl\%[et]\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
		\ keepend
		\ contains=vifmUnletCommand,vifmEnvVar,vifmComment,vifmInlineComment,vifmNotComment
syntax region vifmUnletC
		\ start='\<unl\%[et]\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$\||'
		\ keepend
		\ contains=vifmUnletCommand,vifmEnvVar,vifmComment,vifmInlineComment,vifmNotComment
syntax region vifmString contained start=+="+hs=s+1 skip=+\\\\\|\\"+  end=+"+
syntax region vifmString contained start=+='+hs=s+1 skip=+\\\\\|\\'+  end=+'+
syntax region vifmStringInExpr contained start=+=\@<="+hs=s+1 skip=+\\\\\|\\"+
		\ end=+"+
syntax region vifmStringInExpr contained start=+=\@<='+hs=s+1
		\ skip=+\\\\\|\\'\|''+  end=+'+
syntax region vifmStringInExpr contained start=+[.( ]"+hs=s+1 skip=+\\\\\|\\"+
		\ end=+"+
syntax region vifmStringInExpr contained start=+[.( ]'+hs=s+1
		\ skip=+\\\\\|\\'\|''+  end=+'+
syntax region vifmArgument contained start=+"+ skip=+\\\\\|\\"+  end=+"+
syntax region vifmArgument contained start=+'+ skip=+\\\\\|\\'\|''+  end=+'+
syntax match vifmEnvVar contained /\$[0-9a-zA-Z_]\+/
syntax match vifmNumber contained /\d\+/
syntax match vifmHexColor contained /#[0-9a-fA-F]\{6}/

" Optional map arguments right after command name
syntax match vifmMapArgList '\(<\(silent\|wait\)>\s*\)*' contained
		\ nextgroup=vifmMapLhs

" Ange-bracket notation
syntax case ignore
syntax match vifmNotation '<\(esc\|cr\|space\|del\|nop\|\%(s-\)\?tab\|\%(s-\)\?home\|\%(s-\)\?end\|\%(s-\)\?left\|\%(s-\)\?right\|\%(s-\)\?up\|\%(s-\)\?down\|bs\|\%(s-\)\?delete\|\%(s-\)\?insert\|\%(s-\)\?pageup\|\%(s-\)\?pagedown\|\([acms]-\)\?f\d\{1,2\}\|c-s-[a-z[\]^_]\|s-c-[a-z[\]^_]\|c-[a-z[\]^_@]\|[am]-c-[a-z]\|c-[am]-[a-z]\|[am]-[0-9a-z]\|[am]-s-[a-z]\|s-[am]-[a-z]\)>'
syntax case match

" Whole line comment
syntax region vifmComment contained extend
		\ contains=@Spell start='^\(\s\|:\)*"' end='$'
" Comment at the end of a line
syntax match vifmInlineComment contained contains=@Spell '\s"[^"]*$'
" This prevents highlighting non-first line of multi-line command
syntax match vifmNotComment contained '\s"[^"]*\(\n\s*\(\\\|"\)\)\@='

" Empty line
syntax match vifmEmpty /^\s*$/

" :highlight clear
syntax match vifmHiClear contained /\s*\<clear\>\s*/

" Check spelling only in syntax elements marked with @Spell
syntax spell notoplevel

" Highlight
highlight link vifmAutocmdCommand Statement
highlight link vifmPatternCommands Statement
highlight link vifmComment Comment
highlight link vifmInlineComment Comment
highlight link vifmCommand Statement
highlight link vifmCommandCN Statement
highlight link vifmPrefixCommands Statement
highlight link vifmCdCommand Statement
highlight link vifmCmdCommand Statement
highlight link vifmColoCommand Statement
highlight link vifmHiCommand Statement
highlight link vifmHiClear Statement
highlight link vifmInvertCommand Statement
highlight link vifmMarkCommand Statement
highlight link vifmFtCommand Statement
highlight link vifmExprCommand Statement
highlight link vifmNormalCommand Statement
highlight link vifmLetCommand Statement
highlight link vifmUnletCommand Statement
highlight link vifmSetCommand Statement
highlight link vifmSoCommand Statement
highlight link vifmBuiltinFunction Function
highlight link vifmOperator Operator
highlight link vifmMap Statement
highlight link vifmCMapAbbr Statement
highlight link vifmHiArgs Type
highlight link vifmAutoEvent Type
highlight link vifmHiGroups Identifier
highlight link vifmPattern String
highlight link vifmHiStyles PreProc
highlight link vifmHiColors Special
highlight link vifmOption PreProc
highlight link vifmNotation Special
highlight link vifmMapArgList Special
highlight link vifmString String
highlight link vifmStringInExpr String
highlight link vifmEnvVar PreProc
highlight link vifmNumber Number
highlight link vifmHexColor Number

let &cpo = s:cpo_save
unlet s:cpo_save

" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 :
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master