blob: dc8b9867ab273f31731b39c02f8f8bba6c6a74fe [file] [log] [blame]
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +02001" Vim syntax file
Bram Moolenaarc8734422012-06-01 22:38:45 +02002" Maintainer: Thilo Six
3" Contact: <vim-dev at vim dot org>
4" http://www.vim.org/maillist.php#vim-dev
5"
6" Description: display directory content inside Vim with syntax
7" highlighting
8" File: runtime/syntax/dirpager.vim
Bram Moolenaard592deb2022-06-17 15:42:40 +01009" Last Change: 2022 Jun 14
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010010" Modeline: vim: ts=8:sw=2:sts=2:
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020011"
Bram Moolenaarc8734422012-06-01 22:38:45 +020012" Credits: dirpager.vim is derived from Nikolai Weibulls dircolors.vim
13"
14" License: VIM License
15" Vim is Charityware, see ":help Uganda"
16"
17" Usage: $ ls -la | view -c "set ft=dirpager" -
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020018"
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010019"
20",----[ ls(1posix) ]--------------------------------------------------
21"
22" The <entry type> character shall describe the type of file, as
23" follows:
24"
25" d Directory.
26" b Block special file.
27" c Character special file.
28" l (ell) Symbolic link.
29" p FIFO.
30" - Regular file.
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010031"
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020032
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010033if exists("b:current_syntax") || &compatible
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020034 finish
35endif
36
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020037setlocal nowrap
38
39syn keyword DirPagerTodo contained FIXME TODO XXX NOTE
40
41syn region DirPagerExe start='^...x\|^......x\|^.........x' end='$' contains=DirPagerTodo,@Spell
42syn region DirPagerDir start='^d' end='$' contains=DirPagerTodo,@Spell
43syn region DirPagerLink start='^l' end='$' contains=DirPagerTodo,@Spell
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010044syn region DirPagerSpecial start='^b' end='$' contains=DirPagerTodo,@Spell
45syn region DirPagerSpecial start='^c' end='$' contains=DirPagerTodo,@Spell
46syn region DirPagerFifo start='^p' end='$' contains=DirPagerTodo,@Spell
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020047
48hi def link DirPagerTodo Todo
49hi def DirPagerExe ctermfg=Green guifg=Green
50hi def DirPagerDir ctermfg=Blue guifg=Blue
51hi def DirPagerLink ctermfg=Cyan guifg=Cyan
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010052hi def DirPagerSpecial ctermfg=Yellow guifg=Yellow
53hi def DirPagerFifo ctermfg=Brown guifg=Brown
Bram Moolenaar8e5af3e2011-04-28 19:02:44 +020054
55let b:current_syntax = "dirpager"
56