diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:44:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:44:24 +0000 |
commit | 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 (patch) | |
tree | 3537e168b860f2742f6029d70501b5ed7d15d345 /runtime/syntax/dirpager.vim | |
parent | Initial commit. (diff) | |
download | vim-upstream.tar.xz vim-upstream.zip |
Adding upstream version 2:8.1.0875.upstream/2%8.1.0875upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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..1a60063 --- /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: 2012 May 19 +" 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" + |