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> / tests / test-data / syntax-highlight / syntax.vifm (fa6d1d6f9773d65e6fb0b0017cd7c73de65dad03) (21KiB) (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 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744
" "s" should NOT be highlighted
nnoremap ,E :%nextract . %c<cr>:cd %c:r:s/\.tar$//<cr>

" "<cr>" in the last line should be highlighted as angle bracket notation
nnoremap az : if expand('%c') == expand('%f')
          \ |    execute '!pack %c.zip %c'
          \ | else
          \ |    execute '!pack %d:t.zip %f'
          \ | endif
          \ | normal j<cr>

" both occurrences of "<cr>" should be highlighted as angle bracket notation
nnoremap bb :marks<cr><cr>

" non of arguments should be highlighted
touch copy-init.cp
m e20-en.avi
co e20-en.avi
mkdir mkdir

" "<cr>" should be highlighted as angle bracket notation
nnoremap o :!<cr>
" this should be highlighted as a comment

" "edit" should be highlighted as :commands
edit file
" this should be highlighted as a comment

" "<cr>" should be highlighted as angle bracket notation
nnoremap ,b :set viewcolumns=-{name}..,6{}.<cr>
nnoremap ,b :set viewcolumns='-{name}..,6{}.'<cr>
nnoremap ,b :set viewcolumns="-{name}..,6{}."<cr>

" ":nnoremap" and ":let" should be highlighted as :commands
" "$a" as environment variable
" "'a'" as a string
" "<left>" and "<cr>" should be highlighted as angle bracket notation
nnoremap s :let $a <left>= 'a'<cr>

" "<silent>" should be highlighted as angle bracket notation
" "<wait>" should be highlighted as angle bracket notation
map <silent> ,b :set viewcolumns="-{name}..,6{}."<cr>
map <silent>,b :set viewcolumns="-{name}..,6{}."<cr>
map <silent><silent>,b :set viewcolumns="-{name}..,6{}."<cr>
map <silent> <silent>,b :set viewcolumns="-{name}..,6{}."<cr>
map <wait><silent>,b :set viewcolumns="-{name}..,6{}."<cr>
nnoremap <silent> a b
nmap <silent> a b
cnoremap <silent> a b
cmap <silent> a b
qnoremap <silent> a b
qmap <silent> a b
dnoremap <silent> a b
dmap <silent> a b
" "<silEnt>" shouldn't be highlighted
" "<silent>" shouldn't be highlighted
map <silEnt> ,b :set viewcolumns="-{name}..,6{}."<cr>
map ,b :set viewcolumns="-{name}..,6{}."<cr><silent>

" "<c-@>" should be highlighted as angle bracket notation
nnoremap <c-@> j

" the second and third lines should be highlighted as comments
" "trash" in the line after comments should NOT be highlighted
set slowfs=fuse.sshfs
"set slowfs=fuse.sshfs,curlftpfs
"set slowfs=fuse.sshfs,curlftpfs
\trash
\ trash
\  trash
\   trash
\    trash

" "set" should NOT be highlighted as :command
" "not comment should NOT be highlighted as a comment
" "'vim -p'" should be highlighted as 'string'
" ""vim -p"" should be highlighted as "string"
" "vicmd" and "trashdir" should be highlighted as 'option' name
" 1st, 2nd, last occurrences of "trash" should be highlighted as 'option' name
" nothing else should be highlighted (watch "trash")
set trashdir= trash
  \ trashdir=  trash "not comment
  \ trashdir=\ trash
  \ vicmd='vim -p' vicmd="vim -p" trash

" "set" should NOT be highlighted as :command
" "trashdir" should be highlighted as 'option' name
" "trash" on right-hand side should NOT be highlighted at all
set trashdir=%r/.vifm-Trash,$HOME/.vifm/trash

" highlight of "trash" and "trashdir" should be of 'option' name group on both
" lines
set trash trashdir=$HOME/.vifm/trash
set trashdir=$HOME/.vifm/trash trash

" "comment should be highlighted as comment
set vifminfo=dhistory,save,dirstack,registers,bookmarks "comment

" "$VIFM" should be highlighted as environment variable name
" `" comment` should be highlighted as a comment
source $VIFM/vifmrc_local " comment
unlet $VIFM

" не подсвечены строки
cd "строка не подсвечена"
nnoremap foo :cd "строка не подсвечена"
so "/tmp/%a.vifm"
command! eso :exe ':!vim "/tmp/%a.vifm"' | so "/tmp/%a.vifm"

let $FOO="foo"
" комментарий подсвечен как строка

let $FOO="foo"
" комментарий не подсвечен

invert f
invert s
invert o

invert? f
invert? s
invert? o

" "not comment should NOT be highlighted as comment
nnoremap ga "not a comment
    \ : if filetype('.') == 'dir'
    \ |     execute 'строка подсвечивается только до | а после подсвечивается не как строка'
    \ | endif<cR><CR><Cr><cr>
" еще не подсвечен endif<cr> и этот комментарий


" "not comment should NOT be highlighted as comment
nnoremap ,sn
    \ <c-w><c-v> "not a comment
     \<c-w>L<c-w>|2<c-w><
     \:fileviewer *,*/ seq 2 999 || echo "echo не подсвечено как ключевое слово и эта строка не подсвечена как строка"<cr>
     \:view!<cr>
     \<c-w>l

" "ts" should be highlighted as 'option' name only in the first line
:set ts
:let ts
:hi ts

command foo
    \ bar "this should NOT be highlighted as comment
    " this should be highlighted as comment
    " this should be highlighted as comment too
    \ biz

map foo bar
    " this should be highlighted as comment, "cd" below as a :command and
    " "<cr>" as angle bracket notation
    \ :cd<cr>
    " this should be highlighted as comment
    " this should be highlighted as comment too
    \ biz

command foo bar
" this should be highlighted as comment
" this should be highlighted as comment too

map foo
    \ bar
" this should be highlighted as comment
" this should be highlighted as comment too

command foo :bar<cr>
" this should be highlighted as comment, but "<cr>" above should NOT be
" highlighted at all

map foo :bar
" this should be highlighted as comment
" this should be highlighted as comment too


" "$HOME" should be highlighted as environment variable
" "<cr>" should be highlighted as bracket notation
nnoremap gh :cd $HOME<cr>
" "<home>" as bracket notation
cnoremap <c-b> <home>

" left-hand side should be highlighted as bracket notation
nnoremap <insert> rhs
nnoremap <a-s-a> rhs
nnoremap <s-a-b> rhs
nnoremap <m-s-c> rhs
nnoremap <s-m-d> rhs
nnoremap <a-0> rhs
nnoremap <m-1> rhs
cnoremap <s-home> sh
cnoremap <s-end> se
cnoremap <s-left> sl
cnoremap <s-right> sr
cnoremap <s-up> su
cnoremap <s-down> sd
cnoremap <s-delete> sdel
cnoremap <s-insert> sins
cnoremap <s-pageup> spu
cnoremap <s-pagedown> spd

" "windo" and "normal" should be highlighted as :command
" "<cr>" should NOT be highlighted as bracket notation
windo normal zo<cr>

" "$HOME" should be highlighted as environment variable
" "<cr>" should NOT be highlighted as bracket notation
windo normal :cd $HOME<cr>
windo normal :execute 'a'<cr>

" fileviewer и view не подсвечены как ключевые слова, но случай вроде особый
nnoremap ,sn
    \ <c-w><c-v>
     \<c-w>L<c-w>|2<c-w><
     \:fileviewer *,*/ seq 2 999 || echo "false"<cr>
     \:view!<cr>
     \<c-w>l

command! foo :echo 'не подсвечено из-за !'

" echo and string on the second line should NOT be highlighted, while <cr>
" should
nnoremap aw :!%S echo %c:p >> ~/.config/watch-queue
            \ && echo 'Stored to watch queue.'<cr>

" "100" should be highlighted as a number
if &columns < 100
    only
else
    vsplit
endif

" all single quoted strings should be highlighted
command cx :cd ~/projects/experiments/ | mkdir '%a' | cd '%a' | touch '%%d:t.c'

" highlight operators
if &columns == != > >= < <= . - + 100
    only
else
    vsplit
endif

" both patterns should be highlighted
" "d" between vertical bars should NOT be highlighted in any special way in
" either of lines
windo filter! /^.*\.(o|d|class|pyc)$|^\$RECYCLE\.BIN\/$/
windo filter /^.*\.(o|d|class|pyc)$|^\$RECYCLE\.BIN\/$/

" ":cd" should be highlighted as a :command in both lines below
nnoremap ,e :!%nextract ~/tmp %c<cr><space>:cd ~/tmp/%C:t:r:s/\.tar$//<cr>
nnoremap ,E :!%nextract . %c<cr>:cd %c:r:s/\.tar$//<cr>

" "highlight" should be highlighted as a :command in both lines below
" "clear" should be highlighted as a :command in both lines below
" "clear2" should NOT be highlighted
highlight clear
highlight clear2

" "nnoremap" should be highlighted as a :command
" "<f7>" should be highlighted as angle bracket notation
" "mkdir" should be highlighted as a :command
" "<space>" and "<left>" should be highlighted as angle bracket notation
nnoremap <f7> :mkdir<space>
nnoremap ,s :restart<left><left><left><left><left><left><left><left><left>

" "{*.h,*.c}" and "!{*.h,*.c}" should be highlighted as a 'string'
highlight {*.h,*.c}  cterm=bold ctermfg=yellow
highlight !{*.h,*.c}  cterm=bold ctermfg=yellow
" "{}" and "!{}" should NOT be highlighted
highlight {} cterm=bold ctermfg=yellow
highlight !{} cterm=bold ctermfg=yellow
" "<text/*>" and "!<binary/octet-stream>" should be highlighted as a 'string'
highlight <text/*> cterm=bold ctermfg=yellow
highlight !<binary/octet-stream> cterm=bold ctermfg=yellow
" "<>" and "!<>" should NOT be highlighted
highlight <> cterm=bold ctermfg=yellow
highlight !<> cterm=bold ctermfg=yellow
" "/\.(7z|Z|a|ace|alz|apkg)$/[iI]" and "!/\.(7z|Z|a|ace|alz|apkg)$/[iI]" should
" be highlighted as a 'string'
highlight /\.(7z|Z|a|ace|alz|apkg)$/ ctermfg=red
highlight /\.(7z|Z|a|ace|alz|apkg)$/i ctermfg=red
highlight /\.(7z|Z|a|ace|alz|apkg)$/I ctermfg=red
highlight !/\.(7z|Z|a|ace|alz|apkg)$/iI ctermfg=red
highlight /\.(7z|Z|a|ace|alz|apkg)$/Ii ctermfg=red
highlight /\.(7z|Z|a|ace|alz|apkg)$/IiI ctermfg=red
" leading "!" should NOT be highlighted as a 'string'
highlight !!/\.(7z|Z|a|ace|alz|apkg)$/iI ctermfg=red
" "/\.(7z|Z|a|ace|alz|apkg)$/" (but not "g") should be highlighted as a 'string'
highlight /\.(7z|Z|a|ace|alz|apkg)$/g ctermfg=red
" "//" should NOT be highlighted
highlight // ctermfg=red
" comments and patterns should be highlighted properly (as stated above)
highlight /.*\.djvu$|
          \.*\.tex$|
          " \.*\.txt$|
          \.*\.xhtml$|
          \.*\.xml$/iI cterm=underline ctermfg=188 ctermbg=default
highlight //.*\.djvu$|
          \.*\.tex$|
          " \.*\.txt$|
          \.*\.xhtml$|
          \.*\.xml$//iI cterm=underline ctermfg=188 ctermbg=default
highlight {*.djvu,
          \*.tex,
          " *.txt,
          \*.xhtml,
          \*.xml} cterm=underline ctermfg=188 ctermbg=default
highlight {{*.djvu,
          \*.tex,
          " *.txt,
          \*.xhtml,
          \*.xml}} cterm=underline ctermfg=188 ctermbg=default
" "not comment should NOT be highlighted as comment
" " \*.xhtml, should be highlighted as comment
highlight {*.djvu, "not comment
          " \*.xhtml,
          \*.xml} cterm=underline ctermfg=188 ctermbg=default
" "column:*" should be highlighted
highlight column:ext cterm=bold
highlight column:iname cterm=bold
highlight column:Custom cterm=bold
" "column:bad" shouldn't be highlighted
highlight column:bad cterm=bold

" "italic" should be highlighted
" "combine" should be highlighted
highlight Win cterm=italic
highlight Win cterm=combine

" "guifg", "guibg" and "gui" should be highlighted
" "#14fd14" should be highlighted
highlight Win guifg=yellow guibg=#14fd14 gui=combine

" patterns here should NOT be highlighted
highlight // cterm=bold ctermfg=yellow
highlight //// cterm=bold ctermfg=yellow
highlight {} cterm=bold ctermfg=yellow
highlight {{}} cterm=bold ctermfg=yellow
highlight <> cterm=bold ctermfg=yellow
" patterns here should be highlighted (except for {{}} suffix)
highlight /a/ cterm=bold ctermfg=yellow
highlight /a\/b/ cterm=bold ctermfg=yellow
highlight //full/path/to\/file// cterm=bold ctermfg=yellow
highlight //fullpath// cterm=bold ctermfg=yellow
highlight <text/*>//a//{things}{{}} cterm=bold ctermfg=yellow
highlight {{?}} cterm=bold ctermfg=yellow
filetype *.vifm {Open in Vim} vim
filextype {{*.vifm}} {Open in Vim} vim
filextype <text/plain>{*.vifm},/regex/<application/pdf>{*.pdf}
       \ {Open in Vim} vim
filextype <text/plain>{*.vifm},/regex/,<application/pdf>{*.pdf}
       \ {Open in Vim} vim
filetype <text/plain>{*.vifm},<application/pdf>{{*.pdf}}
       \ {Open in Vim} vim
fileviewer <text/plain>{*.vifm},//some/regex\/here//,<application/pdf>{*.pdf}
       \ cat

" "cabbrev", "cnoreabbrev" and "cunabbrev" should be highlighted as :commands
" "<space>" and "<left>" should be highlighted as angle bracket notation
cabbrev utf2cp <bar>iconv<space>-f<space>utf-8<space>-t<space>cp1251
cabbrev fi filter!
cabbrev pathtosomething C:/path/to/something
cnoreabbrev ddd e
cunabbrev bbb c
cabbrev pyp python<space>-c<space>'print<space>'<left>

" "command" and ":normal" should be highlighted as :commands
" "something should be highlighted as comment
command! myredraw :normal!  "something

" "autocmd" and ":setlocal" should be highlighted as :commands
" "DirEnter" should be highlighted as autocommand event name
" 'sort' should be highlighted as option
" "comment should be highlighted as comment
autocmd DirEnter ~/downloads,~/downloads/torrents setlocal sort=-mtime,dir "comment

" "fileviewer" should be highlighted as :commands
" "not comment should NOT be highlighted
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm   "not comment
         \ imgt %px %py %pw %ph %c  "not comment

" "fileviewer" should be highlighted as :command
" `" \ comment1` should be highlighted as comment
" `" \ comment2` should be highlighted as comment
fileviewer *.ext
         " \ comment1
         " \ comment2
         \ cmd

" "fileviewer" should be highlighted as :command
" "/,*/" should not be highlighted as a pattern
fileviewer .*/,*/ tree %f

" "," must not be highlighted
filextype /regex/,{*.pdf}
filextype /reg\/ex/,{*.pdf}

filetype {*.spx,*.opus},
        \<audio/mpeg,audio/x-wav>
       \ {Play using ffplay}
       \ ffplay -nodisp -hide_banner -autoexit %c

filetype {*.wav}
        \<audio/mpeg,audio/x-wav>
       \ {Play using ffplay}
       \ ffplay -nodisp -hide_banner -autoexit %c

filextype {*.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
          \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
          \*.as[fx]}
        \ {View using ffplay}
        \ ffplay -fs -hide_banner -autoexit %f

if $sort_type == 'size'
    set sort=+mtime
    let $sort_type = 'mtime'
    echo 'Sorted by modification date'
elseif $sort_type == 'name'
    set sort=-size
    let $sort_type = 'size'
    echo 'Sorted by size'
else
    set sort=+name
    let $sort_type = 'name'
    echo 'Sorted by name'
endif

" commands should be highlighted, patterns too
select   /*/
select!  /*/
unselect !{pat}
" only commands should be highlighted
unselect! /*/
unselect ! cmd
unselect pat

" the following should be highlighted as :commands
dm
dma
dmap
dn
dno
dnor
dnore
dnorem
dnorema
dnoremap
du
dun
dunm
dunma
dunmap
cq
cqu
cqui
cquit
compare
cope
copen
siblnext
siblprev
histnext
histprev
tabnew
tabname
tabc
tabcl
tabclo
tabclos
tabclose
qa
qal
qall
wqa
wqal
wqall
xa
xal
xall
go
got
goto
tabm
tabmo
tabmov
tabmove
tree
regular
media
tabn
tabne
tabnex
tabnext
tabo
tabon
tabonl
tabonly
tabp
tabpr
tabpre
tabprev
tabprevi
tabprevio
tabpreviou
tabprevious
cds
hideui
session
delsession
plugins
plugin
st
sto
stop
keepsel
amap
anoremap
aunmap
rege
reged
regedi
regedit
chi
chis
chist
chisto
chistor
chistory

" the words following ":" should be highlighted as :commands
nnoremap lhs :session
nnoremap lhs :delsession
nnoremap lhs :tabonly
nnoremap lhs :chis
nnoremap lhs :chist
nnoremap lhs :chisto
nnoremap lhs :chistor
nnoremap lhs :chistory
nnoremap lhs :keepsel
nnoremap lhs :plugin
nnoremap lhs :plugins
nnoremap lhs :st
nnoremap lhs :sto
nnoremap lhs :stop

" "hi" should be highlighted as :command and its argument as highlight group
hi CurrLine
hi CmpMismatch
hi CmpUnmatched
hi CmpBlank
hi AuxWin
hi OtherWin
hi TabLine
hi TabLineSel
hi HardLink
hi User1
hi User2
hi User3
hi User4
hi User5
hi User6
hi User7
hi User8
hi User9
hi User10
hi User11
hi User12
hi User13
hi User14
hi User15
hi User16
hi User17
hi User18
hi User19
hi User20
hi LineNr
hi OddLine

" "set" should be highlighted as :command
" "*dotfiles" should be highlighted as 'option'
" "caseoptions" should be highlighted as 'option'
" "sizefmt" should be highlighted as 'option'
" "*millerview" should be highlighted as 'option'
" "milleroptions" should be highlighted as 'option'
" "lsoptions" should be highlighted as 'option'
" "previewprg" should be highlighted as 'option'
" "tabscope" should be highlighted as 'option'
" "showtabline" and "stal" should be highlighted as 'option'
" "histcursor" should be highlighted as 'option'
" "*quickview" should be highlighted as 'option'
" "syncregs" should be highlighted as 'option'
" "mediaprg" should be highlighted as 'option'
" "shellflagcmd" and "shcf" should be highlighted as 'option'
" "tablabel" should be highlighted as 'option'
" "sessionoptions" and "ssop" should be highlighted as 'option'
" "tabprefix" should be highlighted as 'option'
" "tabsuffix" should be highlighted as 'option'
" "previewoptions" should be highlighted as 'option'
" "autocd" should be highlighted as 'option'
" "mouse" should be highlighted as 'option'
" "navoptions" should be highlighted as 'option'
" "tabline" and "tal" should be highlighted as 'option'
" "hloptions" should be highlighted as 'option'
set dotfiles nodotfiles invdotfiles dotfiles!
set caseoptions
set sizefmt
set millerview nomillerview invmillerview
set milleroptions
set lsoptions
set previewprg
set tabscope
set showtabline stal
set histcursor
set quickview noquickview invquickview
set syncregs
set mediaprg
set shellflagcmd shcf
set tablabel
set sessionoptions ssop
set tabprefix
set tabsuffix
set previewoptions
set autocd noautocd invautocd autocd!
set mouse
set navoptions
set tabline tal
set hloptions

" "echo" should be highlighted as :command
" "chooseopt" should be highlighted as builtin function
" "'file'" should be highlighted as a string
echo chooseopt('file')

" "term" should be highlighted as a function()
echo term('cmd')

" "tabpagenr" should be highlighted as a function()
echo tabpagenr('$')

" "escape" should be highlighted as a function()
echo escape('path name', '\ ')

" "fnameescape" should be highlighted as a function()
echo fnameescape('path name')

" "extcached" and "expand" should be highlighted as a function()
" "'uses'", "'%c'" and 'stat --format=%%bx%%B %c' should be highlighted as a
" string literal
echo extcached('uses', expand('%c'), expand('stat --format=%%bx%%B %c'))

" "input" should be highlighted as a function()
" "'prompt: ' should be highlight as a string literal
echo input('prompt: ')

" "filereadable" should be highlighted as a function()
echo filereadable('path')

" "let" should be highlighted as a :command
" "unlet" should be highlighted as a :command
" "term" should be highlighted as a function()
" "$FZF_RES" should be highlighted as an environment variable
" "'fzf 2>&0'" should be highlighted as a string literal
command! fzf : let $FZF_RES = term('fzf 2>&0')
            \| unlet $FZF_RES

" "let" should be highlighted as a :command
" "%1*" should be highlighted as a string literal
" '" initial color" should be highlighted as a comment
let &statusline = "%1*"           " initial color
:let &statusline = "%1*"          " initial color

" TODO

" "vifm" should NOT be highlighted as a command
autocmd DirEnter ~/repos/vifm/**/* setl previewprg='git log --color -- %c 2>&1'

" ranges in front of commands
33delete

" variables
echo v:servername

" ":echo" should be highlighted as :commands
" should any of these (&something) be highlighted specially?
echo &sort
echo &l:sort
echo &g:sort

" :set highlight spreads across too many lines!
nnoremap s :if $size_sort != ''
         \ |  set sort=+name
         \ |  let $size_sort = ''
         \ |else
         \ |  set sort=-size
         \ |  let $size_sort = 'yes'
         \ |endif<cr>
command! togglesort
         \ :if $sort_type == 'size'
         \ |    set sort=+mtime
         \ |    let $sort_type = 'mtime'
         \ |    echo 'Sorted by modification date'
         \ |else
         \ |    if $sort_type == 'name'
         \ |        set sort=-size
         \ |        let $sort_type = 'size'
         \ |        echo 'Sorted by size'
         \ |    else
         \ |        set sort=+name
         \ |        let $sort_type = 'name'
         \ |        echo 'Sorted by name'
         \ |    endif
         \ |endif

" "s" should NOT be highlighed
" "mkdir" on the third line should be highlighted
command! mkartistdir %C:t:s/ *-.*//
command! :mkartistdir %C:t:s/ *-.*//
command! mkartistdir :mkdir %C:t:s/ *-.*//
command! mkartistdir :mkd %C:t:s/ *-.*//

" "<" and ">" should NOT be highlighted as operators
" "<cr>" should be highlighted as angle bracket notation
windo normal :execute 'a'<cr>

" "marks" should be highlighted as :command
nnoremap bb :
          \ marks<cr>

" "restart" and "write" should be highlighted as :command
" "<cr>" should NOT be highlighted as angle bracket notation
command! reload :write | restart<cr>

" "restart" and write should be highlighted as :command
" "<cr>" should be highlighted as angle bracket notation
nnoremap j : execute 'normal! j'
          \| execute ":!$PREVIEW_CMD %q"<cr>

" "set" should be highlighted as :command
" "vifminfo" should be highlighted as 'option' name
" "not comment should NOT be highlighted as comment
" "comment should be highlighted as comment
" "registers" should NOT be highlighted in the command below
set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,phistory,fhistory "not a comment
           \,dirstack,registers,bookmarks "comment
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