vim-patch:56994d215815

Update runtime files.
56994d2158
This commit is contained in:
Jan Edmund Lazo 2021-05-02 12:20:57 -04:00
parent abb13dde98
commit 7e36c9a2d3
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
17 changed files with 606 additions and 68 deletions

26
runtime/compiler/cm3.vim Normal file
View File

@ -0,0 +1,26 @@
" Vim compiler file
" Compiler: Critical Mass Modula-3 Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Apr 08
if exists("current_compiler")
finish
endif
let current_compiler = "cm3"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo&vim
" TODO: better handling of Quake errors
CompilerSet makeprg=cm3
CompilerSet errorformat=%D---\ building\ in\ %f\ ---,
\%W\"%f\"\\,\ line\ %l:\ warning:\ %m,
\%E\"%f\"\\,\ line\ %l:\ %m,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -493,14 +493,14 @@ CTRL-W J Move the current window to be at the very bottom, using the
CTRL-W H Move the current window to be at the far left, using the
full height of the screen. This works like closing the
current window and then creating another one with
":vert topleft split", except that the current window contents
`:vert topleft split`, except that the current window contents
is used for the new window.
*CTRL-W_L*
CTRL-W L Move the current window to be at the far right, using the full
height of the screen. This works like closing the
current window and then creating another one with
":vert botright split", except that the current window
`:vert botright split`, except that the current window
contents is used for the new window.
*CTRL-W_T*
@ -543,7 +543,7 @@ CTRL-W < Decrease current window width by N (default 1).
*CTRL-W_>*
CTRL-W > Increase current window width by N (default 1).
:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar*
:vert[ical] res[ize] [N] *:vertical-resize* *CTRL-W_bar*
CTRL-W | Set current window width to N (default: widest possible).
You can also resize a window by dragging a status line up or down with the

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Apr 05
" Last Change: 2021 Apr 17
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")

View File

@ -1,6 +1,6 @@
" Language: gprof
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
" Last Change: 2013 Jun 09
" Last Change: 2021 Apr 08
" When cursor is on one line of the gprof call graph,
" calling this function jumps to this function in the call graph.
@ -16,7 +16,7 @@ fun! <SID>GprofJumpToFunctionIndex()
norm! $y%
call search('^' . escape(@", '[]'), 'sw')
norm! zz
elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
elseif l:line =~ '^\(\s*[0-9\.]\+\)\{3}\s\+'
" We're in line in the flat profile.
norm! 55|eby$
call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')

View File

@ -0,0 +1,24 @@
" Vim filetype plugin file
" Language: Modula-3 Makefile
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 April 15
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
runtime! ftplugin/m3quake.vim
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Modula-3 Makefile (m3makefile m3overrides)\tm3makefile;m3overrides\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -0,0 +1,33 @@
" Vim filetype plugin file
" Language: Modula-3 Quake
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 April 15
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=s1:/*,mb:*,ex:*/,:%
setlocal commentstring=%\ %s
setlocal formatoptions-=t formatoptions+=croql
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words = '\<\%(proc\|if\|foreach\)\>:\<else\>:\<end\>'
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Modula-3 Quake Source Files (*.quake)\t*.quake\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -0,0 +1,39 @@
" Vim filetype plugin file
" Language: Modula-2
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Apr 08
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=s0:(*,mb:\ ,ex:*)
setlocal commentstring=(*%s*)
setlocal formatoptions-=t formatoptions+=croql
if exists("loaded_matchit") && !exists("b:match_words")
" The second branch of the middle pattern is intended to match CASE labels
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\)\>' ..
\ ':' ..
\ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' ..
\ ':' ..
\ '\<END\>'
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Modula-2 Source Files (*.def *.mod)\t*.def;*.mod\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl com< cms< fo< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -0,0 +1,38 @@
" Vim filetype plugin file
" Language: Modula-3
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Apr 08
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=s0:(*,mb:\ ,ex:*)
setlocal commentstring=(*%s*)
setlocal formatoptions-=t formatoptions+=croql
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\)\>' ..
\ ':' ..
\ '\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\)\>\|\%(^\s*\)\@<=\S.*=>' ..
\ ':' ..
\ '\<END\>'
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Modula-3 Source Files (*.m3)\t*.m3\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl com< cms< fo< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Feb 20
" Last Change: 2021 Apr 11
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -98,11 +98,11 @@ if exists("loaded_matchit")
" func name
" require a parenthesis following, then there can be an "endfunc".
let b:match_words =
+ \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\(w\%[hile]\|fo\%[r]\)\>,' .
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' .
\ '{:},' .
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' .
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
" Ignore syntax region commands and settings, any 'en*' would clobber
" if-endif.

View File

@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Apr 07
" Last Change: 2021 Apr 08
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@ -110,7 +110,7 @@ func s:Highlight_Matching_Pair()
" We match "escape" for special items, such as lispEscapeSpecial, and
" match "symbol" for lispBarSymbol.
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\symbol\\|comment"''))'
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|symbol\\|comment"''))'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Syntax for Gprof Output
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
" Last Change: 2013 Jun 09
" Last Change: 2021 Apr 08
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -28,7 +28,7 @@ syn match gprofCallGraphTitle "Call graph (explanation follows)"
syn region gprofCallGraphHeader
\ start="^granularity: each sample hit covers.*"
\ end="^\s*index % time\s\+self\s\+children\s\+called\s\+name$"
syn match gprofCallGraphFunction "\s\+\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
syn match gprofCallGraphFunction "\<\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
syn match gprofCallGraphSeparator "^-\+$"
syn region gprofCallGraphTrailer
\ start="This table describes the call tree of the program"
@ -41,7 +41,7 @@ syn region gprofIndex
syn match gprofIndexFunctionTitle "^Index by function name$"
syn match gprofNumbers "^\s\+[0-9 ./+]\+"
syn match gprofNumbers "^\s*[0-9 ./+]\+"
syn match gprofFunctionIndex "\[\d\+\]"
syn match gprofSpecial "<\(spontaneous\|cycle \d\+\)>"

File diff suppressed because one or more lines are too long

177
runtime/syntax/m3build.vim Normal file
View File

@ -0,0 +1,177 @@
" Vim syntax file
" Language: Modula-3 Makefile
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 April 15
if exists("b:current_syntax")
finish
endif
runtime! syntax/m3quake.vim
" Identifiers
syn match m3buildPredefinedVariable "\<\%(TARGET\|OS_TYPE\|BUILD_DIR\|PKG_USE\|WDROOT\)\>"
" Build Procedures {{{1
" Generated from cm3/m3-sys/cm3/src/M3Build.m3
syn keyword m3buildProcedure HasCBackend
" (* packages & locations *)
syn keyword m3buildProcedure Pkg
syn keyword m3buildProcedure override
syn keyword m3buildProcedure path_of
syn keyword m3buildProcedure pkg_subdir
" (* names *)
syn keyword m3buildProcedure program_name
syn keyword m3buildProcedure library_name
" (* calls in the generated .M3EXPORT files *)
syn keyword m3buildProcedure _define_lib
syn keyword m3buildProcedure _define_pgm
syn keyword m3buildProcedure _import_template
syn keyword m3buildProcedure _import_m3lib
syn keyword m3buildProcedure _import_otherlib
syn keyword m3buildProcedure _map_add_interface
syn keyword m3buildProcedure _map_add_generic_interface
syn keyword m3buildProcedure _map_add_module
syn keyword m3buildProcedure _map_add_generic_module
syn keyword m3buildProcedure _map_add_c
syn keyword m3buildProcedure _map_add_h
syn keyword m3buildProcedure _map_add_s
" (* compiler options *)
syn keyword m3buildProcedure m3_debug
syn keyword m3buildProcedure m3_optimize
syn keyword m3buildProcedure build_shared
syn keyword m3buildProcedure build_standalone
" (* derived files *)
syn keyword m3buildProcedure m3_compile_only
syn keyword m3buildProcedure m3_finish_up
" (* predefined system libraries *)
syn keyword m3buildProcedure import_sys_lib
" (* options *)
syn keyword m3buildProcedure m3_option
syn keyword m3buildProcedure remove_m3_option
" (* deleting *)
syn keyword m3buildProcedure deriveds
" (* imports *)
syn keyword m3buildProcedure include_dir
syn keyword m3buildProcedure include_pkg
syn keyword m3buildProcedure import
syn keyword m3buildProcedure import_version
syn keyword m3buildProcedure import_obj
syn keyword m3buildProcedure import_lib
" (* objects *)
syn keyword m3buildProcedure pgm_object
" (* sources *)
syn keyword m3buildProcedure source
syn keyword m3buildProcedure pgm_source
syn keyword m3buildProcedure interface
syn keyword m3buildProcedure Interface
syn keyword m3buildProcedure implementation
syn keyword m3buildProcedure module
syn keyword m3buildProcedure Module
syn keyword m3buildProcedure h_source
syn keyword m3buildProcedure c_source
syn keyword m3buildProcedure s_source
syn keyword m3buildProcedure ship_source
" (* generics *)
syn keyword m3buildProcedure generic_interface
syn keyword m3buildProcedure Generic_interface
syn keyword m3buildProcedure generic_implementation
syn keyword m3buildProcedure Generic_implementation
syn keyword m3buildProcedure generic_module
syn keyword m3buildProcedure Generic_module
syn keyword m3buildProcedure build_generic_intf
syn keyword m3buildProcedure build_generic_impl
" (* derived sources *)
syn keyword m3buildProcedure derived_interface
syn keyword m3buildProcedure derived_implementation
syn keyword m3buildProcedure derived_c
syn keyword m3buildProcedure derived_h
" (* hiding/exporting *)
syn keyword m3buildProcedure hide_interface
syn keyword m3buildProcedure hide_generic_interface
syn keyword m3buildProcedure hide_generic_implementation
syn keyword m3buildProcedure export_interface
syn keyword m3buildProcedure export_generic_interface
syn keyword m3buildProcedure export_generic_implementation
" (* templates *)
syn keyword m3buildProcedure template
" (* library building *)
syn keyword m3buildProcedure library
syn keyword m3buildProcedure Library
" (* program building *)
syn keyword m3buildProcedure program
syn keyword m3buildProcedure Program
syn keyword m3buildProcedure c_program
syn keyword m3buildProcedure C_program
" (* man pages *)
syn keyword m3buildProcedure manPage
syn keyword m3buildProcedure ManPage
" (* emacs *)
syn keyword m3buildProcedure Gnuemacs
syn keyword m3buildProcedure CompiledGnuemacs
" (* "-find" support *)
syn keyword m3buildProcedure find_unit
syn keyword m3buildProcedure enum_units
" (* export functions *)
syn keyword m3buildProcedure install_sources
syn keyword m3buildProcedure install_derived
syn keyword m3buildProcedure install_derived_link
syn keyword m3buildProcedure install_derived_symbolic_link
syn keyword m3buildProcedure install_derived_hard_link
syn keyword m3buildProcedure install_link_to_derived
syn keyword m3buildProcedure install_symbolic_link_to_derived
syn keyword m3buildProcedure install_hard_link_to_derived
syn keyword m3buildProcedure install_symbolic_link
syn keyword m3buildProcedure install_file
" (* installation functions *)
syn keyword m3buildProcedure BindExport
syn keyword m3buildProcedure BinExport
syn keyword m3buildProcedure LibdExport
syn keyword m3buildProcedure LibExport
syn keyword m3buildProcedure EmacsdExport
syn keyword m3buildProcedure EmacsExport
syn keyword m3buildProcedure DocdExport
syn keyword m3buildProcedure DocExport
syn keyword m3buildProcedure MandExport
syn keyword m3buildProcedure ManExport
syn keyword m3buildProcedure HtmlExport
syn keyword m3buildProcedure RootExport
syn keyword m3buildProcedure RootdExport
" (* misc *)
syn keyword m3buildProcedure gen_m3exports
syn keyword m3buildProcedure generate_tfile
syn keyword m3buildProcedure delete_file
syn keyword m3buildProcedure link_file
syn keyword m3buildProcedure symbolic_link_file
syn keyword m3buildProcedure hard_link_file
" }}}
hi def link m3buildPredefinedVariable Identifier
hi def link m3buildProcedure Function
let b:current_syntax = "m3build"
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -0,0 +1,74 @@
" Vim syntax file
" Language: Modula-3 Quake
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 April 15
if exists("b:current_syntax")
finish
endif
" Keywords
syn keyword m3quakeKeyword else end foreach if in is local or proc readonly
syn keyword m3quakeKeyword return
" Builtin procedures {{{
" Generated from m3-sys/m3quake/src/QMachine.m3
syn keyword m3quakeProcedure arglist cp_if defined empty equal error escape
syn keyword m3quakeProcedure exec cm3_exec file format include make_dir
syn keyword m3quakeProcedure normalize path stale try_exec try_cm3_exec
syn keyword m3quakeProcedure unlink_file write datetime date datestamp
syn keyword m3quakeProcedure TRACE_INSTR eval_func hostname
syn keyword m3quakeProcedure pushd popd cd getwd
syn keyword m3quakeProcedure quake
syn keyword m3quakeProcedure q_exec q_exec_put q_exec_get
syn keyword m3quakeProcedure fs_exists fs_readable fs_writable fs_executable
syn keyword m3quakeProcedure fs_isdir fs_isfile fs_contents fs_putfile
syn keyword m3quakeProcedure fs_mkdir fs_touch fs_lsdirs fs_lsfiles fs_rmdir
syn keyword m3quakeProcedure fs_rmfile fs_rmrec fs_cp
syn keyword m3quakeProcedure pn_valid pn_decompose pn_compose pn_absolute
syn keyword m3quakeProcedure pn_prefix pn_last pn_base pn_lastbase pn_lastext
syn keyword m3quakeProcedure pn_join pn_join2 pn_replace_ext pn_parent
syn keyword m3quakeProcedure pn_current
syn keyword m3quakeProcedure len
syn keyword m3quakeProcedure split sub skipl skipr squeeze compress pos
syn keyword m3quakeProcedure tcontains bool encode decode subst_chars
syn keyword m3quakeProcedure del_chars subst subst_env add_prefix add_suffix
" }}}
" Identifiers
syn match m3quakeEnvVariable "$\h\w\+"
" Operators
syn match m3quakeOperator "&"
syn match m3quakeOperator "\<\%(contains\|not\|and\|or\)\>"
" Strings
syn match m3quakeEscape "\\[\\nrtbf"]" contained display
syn region m3quakeString start=+"+ end=+"+ contains=m3quakeEscape
" Comments
syn keyword m3quakeTodo TODO FIXME XXX contained
syn region m3quakeComment start="%" end="$" contains=m3quakeTodo,@Spell
syn region m3quakeComment start="/\*" end="\*/" contains=m3quakeTodo,@Spell
" Default highlighting
hi def link m3quakeCommand Statement
hi def link m3quakeComment Comment
hi def link m3quakeEnvVariable Identifier
hi def link m3quakeEscape Special
hi def link m3quakeKeyword Keyword
hi def link m3quakeOperator Operator
hi def link m3quakeProcedure Function
hi def link m3quakeString String
hi def link m3quakeTodo Todo
let b:current_syntax = "m3quake"
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -1,59 +1,96 @@
" Vim syntax file
" Language: Modula-3
" Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
" Last Change: 2001 May 10
" Language: Modula-3
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
" Last Change: 2021 Apr 08
" Basic things only...
" Based on the modula 2 syntax file
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Modula-3 is case-sensitive
" syn case ignore
" Modula-3 keywords
syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY
syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE
syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION
syn keyword modula3Keyword DISPOSE DIV
syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION
syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT
syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT
syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK
syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX
syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE
syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY
syn keyword modula3Keyword RETURN ROOT
syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE
syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH
syn keyword modula3Keyword ANY ARRAY AS BITS BRANDED BY CASE CONST DEFINITION
syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION EXIT EXPORTS FINALLY
syn keyword modula3Keyword FROM GENERIC IMPORT LOCK METHOD OF RAISE RAISES
syn keyword modula3Keyword READONLY RECORD REF RETURN SET TRY TYPE TYPECASE
syn keyword modula3Keyword UNSAFE VALUE VAR WITH
syn match modula3keyword "\<UNTRACED\>"
" Special keywords, block delimiters etc
syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN
syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL
syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP
" Comments
syn region modula3Comment start="(\*" end="\*)"
" Reserved identifiers
syn keyword modula3Identifier ABS ADR ADRSIZE BITSIZE BYTESIZE CEILING DEC
syn keyword modula3Identifier DISPOSE FIRST FLOAT FLOOR INC ISTYPE LAST
syn keyword modula3Identifier LOOPHOLE MAX MIN NARROW NEW NUMBER ORD ROUND
syn keyword modula3Identifier SUBARRAY TRUNC TYPECODE VAL
" Predefined types
syn keyword modula3Type ADDRESS BOOLEAN CARDINAL CHAR EXTENDED INTEGER
syn keyword modula3Type LONGCARD LONGINT LONGREAL MUTEX NULL REAL REFANY TEXT
syn keyword modula3Type WIDECHAR
syn match modula3Type "\<\%(UNTRACED\s\+\)\=ROOT\>"
" Operators
syn keyword modulaOperator DIV MOD IN AND OR NOT
if exists("modula3_operators")
syn match modula3Operator "\^"
syn match modula3Operator "+\|-\|\*\|/\|&"
" TODO: need to exclude = in procedure definitions
syn match modula3Operator "<=\|<\|>=\|>\|:\@<!=\|#"
endif
" Booleans
syn keyword modula3Boolean TRUE FALSE
" Nil
syn keyword modula3Nil NIL
" Integers
syn match modula3Integer "\<\d\+L\=\>"
syn match modula3Integer "\<\d\d\=_\x\+L\=\>"
" Reals
syn match modula3Real "\c\<\d\+\.\d\+\%([EDX][+-]\=\d\+\)\=\>"
" String escape sequences
syn match modula3Escape "\\['"ntrf]" contained display
syn match modula3Escape "\\\o\{3}" contained display
syn match modula3Escape "\\\\" contained display
" Characters
syn match modula3Character "'\%([^']\|\\.\|\\\o\{3}\)'" contains=modula3Escape
" Strings
syn region modula3String start=+"+ end=+"+
syn region modula3String start=+'+ end=+'+
syn region modula3String start=+"+ end=+"+ contains=modula3Escape
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" Pragmas
syn region modula3Pragma start="<\*" end="\*>"
" The default methods for highlighting. Can be overridden later
hi def link modula3Keyword Statement
hi def link modula3Block PreProc
" Comments
syn region modula3Comment start="(\*" end="\*)" contains=modula3Comment,@Spell
" Default highlighting
hi def link modula3Block Statement
hi def link modula3Boolean Boolean
hi def link modula3Character Character
hi def link modula3Comment Comment
hi def link modula3String String
hi def link modula3Escape Special
hi def link modula3Identifier Keyword
hi def link modula3Integer Number
hi def link modula3Keyword Statement
hi def link modula3Nil Constant
hi def link modula3Operator Operator
hi def link modula3Pragma PreProc
hi def link modula3Real Float
hi def link modula3String String
hi def link modula3Type Type
let b:current_syntax = "modula3"
"I prefer to use this...
"set ai
"vim: ts=8
" vim: nowrap sw=2 sts=2 ts=8 noet:

83
runtime/syntax/psl.vim Normal file
View File

@ -0,0 +1,83 @@
" Vim syntax file
" Language: Property Specification Language (PSL)
" Maintainer: Daniel Kho <daniel.kho@logik.haus>
" Last Changed: 2021 Apr 17 by Daniel Kho
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Read in VHDL syntax files
runtime! syntax/vhdl.vim
unlet b:current_syntax
let s:cpo_save = &cpo
set cpo&vim
" case is not significant
syn case ignore
" Add ! character to keyword recognition.
setlocal iskeyword+=33
" PSL keywords
syn keyword pslOperator A AF AG AX
syn keyword pslOperator E EF EG EX
syn keyword pslOperator F G U W X X!
syn keyword pslOperator abort always assert assume async_abort
syn keyword pslOperator before before! before!_ before_ bit bitvector boolean
syn keyword pslOperator clock const countones cover
syn keyword pslOperator default
syn keyword pslOperator ended eventually!
syn keyword pslOperator fairness fell for forall
syn keyword pslOperator hdltype
syn keyword pslOperator in inf inherit isunknown
syn keyword pslOperator mutable
syn keyword pslOperator never next next! next_a next_a! next_e next_e! next_event next_event! next_event_a next_event_a! next_event_e next_event_e! nondet nondet_vector numeric
syn keyword pslOperator onehot onehot0
syn keyword pslOperator property prev
syn keyword pslOperator report restrict restrict! rose
syn keyword pslOperator sequence stable string strong sync_abort
syn keyword pslOperator union until until! until!_ until_
syn keyword pslOperator vmode vpkg vprop vunit
syn keyword pslOperator within
"" Common keywords with VHDL
"syn keyword pslOperator and is not or to
" PSL operators
syn match pslOperator "=>\||=>"
syn match pslOperator "<-\|->"
syn match pslOperator "@"
"Modify the following as needed. The trade-off is performance versus functionality.
syn sync minlines=600
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link pslSpecial Special
hi def link pslStatement Statement
hi def link pslCharacter Character
hi def link pslString String
hi def link pslVector Number
hi def link pslBoolean Number
hi def link pslTodo Todo
hi def link pslFixme Fixme
hi def link pslComment Comment
hi def link pslNumber Number
hi def link pslTime Number
hi def link pslType Type
hi def link pslOperator Operator
hi def link pslError Error
hi def link pslAttribute Special
hi def link pslPreProc PreProc
let b:current_syntax = "psl"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

View File

@ -2,10 +2,9 @@
" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc )
" Maintainer: Magnus Woldrich <m@japh.se>
" URL: http://github.com/trapd00r/vim-syntax-ratpoison
" Last Change: 2011 Apr 11
" Last Change: 2021-04-12 13:46:04
" Previous Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@ -38,7 +37,7 @@ syn keyword ratpoisonCommandArg select set setenv sfdump shrink contained
syn keyword ratpoisonCommandArg source sselect startup_message time title contained
syn keyword ratpoisonCommandArg tmpwm unalias undefinekey undo unmanage contained
syn keyword ratpoisonCommandArg unsetenv verbexec version vsplit warp contained
syn keyword ratpoisonCommandArg windows contained
syn keyword ratpoisonCommandArg windows framefmt infofmt contained
syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained
syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained
@ -92,19 +91,27 @@ syn keyword ratpoisonSetArg barpadding contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg bgcolor
syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg fgcolor
syn keyword ratpoisonSetArg framefmt contained nextgroup=ratpoisonWinFmtArg
syn keyword ratpoisonSetArg fwcolor
syn keyword ratpoisonSetArg framemsgwait contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg gravity contained nextgroup=ratpoisonGravityArg
syn keyword ratpoisonSetArg bwcolor
syn keyword ratpoisonSetArg gravity contained nextgroup=ratpoisonGravityArg
syn keyword ratpoisonSetArg historysize
syn keyword ratpoisonSetArg historycompaction
syn keyword ratpoisonSetArg historyexpansion
syn keyword ratpoisonSetArg infofmt contained nextgroup=ratpoisonWinFmtArg
syn keyword ratpoisonSetArg topkmap
syn keyword ratpoisonSetArg barinpadding
syn keyword ratpoisonSetArg font
syn keyword ratpoisonSetArg framesels
syn keyword ratpoisonSetArg maxundos
syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg
syn keyword ratpoisonSetArg msgwait contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg startup_message
syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg
syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg
syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg
@ -113,6 +120,8 @@ syn keyword ratpoisonSetArg winliststyle contained nextgroup=ratpoisonWinListArg
syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg
syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
syn match ratpoisonFrameFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
syn match ratpoisonInfoFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained
@ -126,6 +135,7 @@ syn match ratpoisonDefCommand "^\s*defbgcolor\s*"
syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg
syn match ratpoisonDefCommand "^\s*deffgcolor\s*"
syn match ratpoisonDefCommand "^\s*deffont\s*"
syn match ratpoisonDefCommand "^\s*defframefmt\s*" nextgroup=ratpoisonWinFmtArg
syn match ratpoisonDefCommand "^\s*defframesels\s*"
syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg
syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg
@ -243,14 +253,13 @@ syn match ratpoisonVoidCommand "^\s*\zsversion\ze\s*$"
syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$"
syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$"
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link ratpoisonBooleanArg Boolean
hi def link ratpoisonCommandArg Keyword
hi def link ratpoisonComment Comment
hi def link ratpoisonDefCommand Identifier
hi def link ratpoisonFrameFmtArg Special
hi def link ratpoisonGravityArg Constant
hi def link ratpoisonInfoFmtArg Special
hi def link ratpoisonKeySeqArg Special
hi def link ratpoisonNumberArg Number
hi def link ratpoisonSetArg Keyword
@ -261,7 +270,6 @@ hi def link ratpoisonWinFmtArg Special
hi def link ratpoisonWinNameArg Constant
hi def link ratpoisonWinListArg Constant
let b:current_syntax = "ratpoison"
" vim: ts=8