view runtime/syntax/dirpager.vim @ 32828:656c54d276d5 v9.0.1727

patch 9.0.1727: minor problems with the teapot Commit: https://github.com/vim/vim/commit/b0efa49ed179d3aa1fa0358d4c3c6d35a0efb291 Author: Sean Dewar <seandewar@users.noreply.github.com> Date: Sat Jul 8 10:35:19 2023 +0100 patch 9.0.1727: minor problems with the teapot Problem: minor problems with the teapot() Solution: remove the null check, update documentation Update the builtin-function-list entry. (It implicitly returns 0, but such functions usually use "none") Also, tv_get_string_strict() can not return NULL, so remove that check closes: #12647 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 17 Aug 2023 23:00:04 +0200
parents 1e9e9d89f0ee
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"