diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 08:50:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 08:50:31 +0000 |
commit | aed8ce9da277f5ecffe968b324f242c41c3b752a (patch) | |
tree | d2e538394cb7a8a7c42a4aac6ccf1a8e3256999b /runtime/syntax/dirpager.vim | |
parent | Initial commit. (diff) | |
download | vim-aed8ce9da277f5ecffe968b324f242c41c3b752a.tar.xz vim-aed8ce9da277f5ecffe968b324f242c41c3b752a.zip |
Adding upstream version 2:9.0.1378.upstream/2%9.0.1378upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/dirpager.vim')
-rw-r--r-- | runtime/syntax/dirpager.vim | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/runtime/syntax/dirpager.vim b/runtime/syntax/dirpager.vim new file mode 100644 index 0000000..dc8b986 --- /dev/null +++ b/runtime/syntax/dirpager.vim @@ -0,0 +1,56 @@ +" Vim syntax file +" Maintainer: Thilo Six +" Contact: <vim-dev at vim dot org> +" http://www.vim.org/maillist.php#vim-dev +" +" Description: display directory content inside Vim with syntax +" highlighting +" File: runtime/syntax/dirpager.vim +" Last Change: 2022 Jun 14 +" Modeline: vim: ts=8:sw=2:sts=2: +" +" Credits: dirpager.vim is derived from Nikolai Weibulls dircolors.vim +" +" License: VIM License +" Vim is Charityware, see ":help Uganda" +" +" Usage: $ ls -la | view -c "set ft=dirpager" - +" +" +",----[ ls(1posix) ]-------------------------------------------------- +" +" The <entry type> character shall describe the type of file, as +" follows: +" +" d Directory. +" b Block special file. +" c Character special file. +" l (ell) Symbolic link. +" p FIFO. +" - Regular file. +" + +if exists("b:current_syntax") || &compatible + finish +endif + +setlocal nowrap + +syn keyword DirPagerTodo contained FIXME TODO XXX NOTE + +syn region DirPagerExe start='^...x\|^......x\|^.........x' end='$' contains=DirPagerTodo,@Spell +syn region DirPagerDir start='^d' end='$' contains=DirPagerTodo,@Spell +syn region DirPagerLink start='^l' end='$' contains=DirPagerTodo,@Spell +syn region DirPagerSpecial start='^b' end='$' contains=DirPagerTodo,@Spell +syn region DirPagerSpecial start='^c' end='$' contains=DirPagerTodo,@Spell +syn region DirPagerFifo start='^p' end='$' contains=DirPagerTodo,@Spell + +hi def link DirPagerTodo Todo +hi def DirPagerExe ctermfg=Green guifg=Green +hi def DirPagerDir ctermfg=Blue guifg=Blue +hi def DirPagerLink ctermfg=Cyan guifg=Cyan +hi def DirPagerSpecial ctermfg=Yellow guifg=Yellow +hi def DirPagerFifo ctermfg=Brown guifg=Brown + +let b:current_syntax = "dirpager" + |