view runtime/syntax/dirpager.vim @ 29193:1e9e9d89f0ee

Update runtime files Commit: https://github.com/vim/vim/commit/d592deb336523a5448779ee3d4bba80334cff1f7 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 17 15:42:40 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 17 Jun 2022 16:45:04 +0200
parents 9cb3a75a20b9
children
line wrap: on
line source

" 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"