0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

Updated runtime files.

This commit is contained in:
Bram Moolenaar
2012-01-10 14:55:01 +01:00
parent 64a72303f8
commit 6ee8d89cf9
24 changed files with 278 additions and 103 deletions

View File

@@ -3,7 +3,7 @@
" Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
" Previous maintainer:
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Last Change: 2010 Apr 18
" Last Change: 2012 Jan 5
" Thanks to Ori Avtalion for feedback on the comment markers!
@@ -15,6 +15,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn case ignore
" storage types
@@ -40,7 +43,7 @@ syn match asmIdentifier "[a-z_][a-z0-9_]*"
" Various #'s as defined by GAS ref manual sec 3.6.2.1
" Technically, the first decNumber def is actually octal,
" since the value of 0-7 octal is the same as 0-7 decimal,
" I prefer to map it as decimal:
" I (Kevin) prefer to map it as decimal:
syn match decNumber "0\+[1-7]\=[\t\n$,; ]"
syn match decNumber "[1-9]\d*"
syn match octNumber "0[0-7][0-7]\+"
@@ -49,14 +52,34 @@ syn match binNumber "0[bB][0-1]*"
syn keyword asmTodo contained TODO
" GAS supports various comment markers as described here:
" http://sourceware.org/binutils/docs-2.19/as/Comments.html
" I have commented out the ARM comment marker "@" by default as I think more
" people are using "@" with the .type directive. See
" http://sourceware.org/binutils/docs-2.19/as/Type.html
" GAS supports one type of multi line comments:
syn region asmComment start="/\*" end="\*/" contains=asmTodo
" Line comment characters depend on the target architecture and command line
" options and some comments may double as logical line number directives or
" preprocessor commands. This situation is described at
" http://sourceware.org/binutils/docs-2.22/as/Comments.html
" Some line comment characters have other meanings for other targets. For
" example, .type directives may use the `@' character which is also an ARM
" comment marker.
" As a compromise to accommodate what I arbitrarily assume to be the most
" frequently used features of the most popular architectures (and also the
" non-GNU assembly languages that use this syntax file because their asm files
" are also named *.asm), the following are used as line comment characters:
syn match asmComment "[#;!|].*" contains=asmTodo
" syn match asmComment "@.*" contains=asmTodo
" Side effects of this include:
" - When `;' is used to separate statements on the same line (many targets
" support this), all statements except the first get highlighted as
" comments. As a remedy, remove `;' from the above.
" - ARM comments are not highlighted correctly. For ARM, uncomment the
" following two lines and comment the one above.
"syn match asmComment "@.*" contains=asmTodo
"syn match asmComment "^#.*" contains=asmTodo
" Advanced users of specific architectures will probably want to change the
" comment highlighting or use a specific, more comprehensive syntax file.
syn match asmInclude "\.include"
syn match asmCond "\.if"
@@ -97,7 +120,7 @@ if version >= 508 || !exists("did_asm_syntax_inits")
HiLink octNumber Number
HiLink binNumber Number
HiLink asmIdentifier Identifier
HiLink asmIdentifier Identifier
HiLink asmType Type
delcommand HiLink
@@ -105,4 +128,7 @@ endif
let b:current_syntax = "asm"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2011 Dec 30
" Last Change: 2012 Jan 04
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -181,7 +181,7 @@ if !exists("c_no_ansi") || exists("c_ansi_typedefs")
syn keyword cType mbstate_t wctrans_t wint_t wctype_t
endif
if !exists("c_no_c99") " ISO C99
syn keyword cType bool complex
syn keyword cType _Bool bool _Complex complex _Imaginary imaginary
syn keyword cType int8_t int16_t int32_t int64_t
syn keyword cType uint8_t uint16_t uint32_t uint64_t
syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
@@ -203,6 +203,15 @@ endif
if !exists("c_no_c99")
syn keyword cStorageClass inline restrict
endif
if !exists("c_no_c11")
syn keyword cStorageClass _Alignas alignas
syn keyword cOperator _Alignof alignof
syn keyword cStorageClass _Atomic
syn keyword cOperator _Generic
syn keyword cStorageClass _Noreturn noreturn
syn keyword cOperator _Static_assert static_assert
syn keyword cStorageClass _Thread_local thread_local
endif
if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
if exists("c_gnu")

View File

@@ -3,7 +3,7 @@
" Maintainer: Reimer Behrends <behrends@cse.msu.edu>
" With much input from Jocelyn Fiat <fiat@eiffel.com>
" See http://www.cse.msu.edu/~behrends/vim/ for the most current version.
" Last Change: 2001 May 09
" Last Change: 2011 Dec 31 by Thilo Six
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -13,6 +13,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Option handling
if exists("eiffel_ignore_case")
@@ -193,4 +196,6 @@ endif
let b:current_syntax = "eiffel"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

View File

@@ -1,11 +1,11 @@
" Vim syntax file
" Language: FORTH
" Maintainer: Christian V. J. Br<42>ssow <cvjb@cvjb.de>
" Last Change: Di 07 Jul 2009 21:38:45 CEST
" Last Change: Sa 07 Jan 2012 21:30:55 CET
" Filenames: *.fs,*.ft
" URL: http://www.cvjb.de/comp/vim/forth.vim
" $Id: forth.vim,v 1.12 2008/07/07 21:39:12 bruessow Exp $
" $Id: forth.vim,v 1.13 2012/01/07 21:31:31 bruessow Exp $
" The list of keywords is incomplete, compared with the offical ANS
" wordlist. If you use this language, please improve it, and send me
@@ -16,6 +16,10 @@
" for forth.vim).
" Many Thanks to...
"
" 2012-01-07:
" Thilo Six <T.Six at gmx dot de> send a patch for cpoptions.
" See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151
"
" 2009-06-28:
" Josh Grams send a patch to allow the parenthesis comments at the
@@ -47,7 +51,7 @@
" Thomas E. Vaughan <tevaugha at ball dot com> send me a patch
" for the parenthesis comment word, so words with a trailing
" parenthesis will not start the highlighting for such comments.
"
"
" 2003-05-10:
" Andrew Gaul <andrew at gaul.org> send me a patch for
" forthOperators.
@@ -80,6 +84,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Synchronization method
syn sync ccomment
syn sync maxlines=200
@@ -125,7 +132,7 @@ syn keyword forthOperators F~REL F~ABS F~
syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= U< U<=
syn keyword forthOperators U> U>= D0< D0<= D0<> D0= D0> D0>= D< D<= D<>
syn keyword forthOperators D= D> D>= DU< DU<= DU> DU>= WITHIN ?NEGATE
syn keyword forthOperators ?DNEGATE
syn keyword forthOperators ?DNEGATE
" stack manipulations
syn keyword forthStack DROP NIP DUP OVER TUCK SWAP ROT -ROT ?DUP PICK ROLL
@@ -171,7 +178,7 @@ syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION>
syn keyword forthDefine <INTERPRETATION COMPILATION> <COMPILATION ] LASTXT
syn keyword forthDefine COMP' POSTPONE, FIND-NAME NAME>INT NAME?INT NAME>COMP
syn keyword forthDefine NAME>STRING STATE C; CVARIABLE
syn keyword forthDefine , 2, F, C,
syn keyword forthDefine , 2, F, C,
syn match forthDefine "\[IFDEF]"
syn match forthDefine "\[IFUNDEF]"
syn match forthDefine "\[THEN]"
@@ -210,7 +217,7 @@ syn match forthCharOps '\<\[char\]\s\S\s'
syn region forthCharOps start=+."\s+ skip=+\\"+ end=+"+
" char-number conversion
syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F
syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F
syn keyword forthConversion D>S DIGIT DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER
syn keyword forthConversion F>S S>F
@@ -225,7 +232,7 @@ syn keyword forthVocs ONLY FORTH ALSO ROOT SEAL VOCS ORDER CONTEXT #VOCS
syn keyword forthVocs VOCABULARY DEFINITIONS
" File keywords
syn keyword forthFileMode R/O R/W W/O BIN
syn keyword forthFileMode R/O R/W W/O BIN
syn keyword forthFileWords OPEN-FILE CREATE-FILE CLOSE-FILE DELETE-FILE
syn keyword forthFileWords RENAME-FILE READ-FILE READ-LINE KEY-FILE
syn keyword forthFileWords KEY?-FILE WRITE-FILE WRITE-LINE EMIT-FILE
@@ -331,4 +338,6 @@ endif
let b:current_syntax = "forth"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:ts=8:sw=4:nocindent:smartindent:

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
" Version: 0.90
" Last Change: 2011 Dec. 28
" Language: Fortran 2008 (and earlier versions including 2003, 95, 90, and 77)
" Version: 0.91
" Last Change: 2012 Jan. 02
" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
@@ -133,6 +133,7 @@ syn match fortranUnitHeader "\<program\>"
syn keyword fortranKeyword return stop
syn keyword fortranConditional else then
syn match fortranConditional "\<if\>"
syn match fortranConditionalOb "\<if\s*(.*)\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*$"
syn match fortranRepeat "\<do\>"
syn keyword fortranTodo contained todo fixme
@@ -144,6 +145,7 @@ syn match fortranParenError ")"
syn match fortranOperator "\.\s*n\=eqv\s*\."
syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\."
syn match fortranOperator "\(+\|-\|/\|\*\)"
syn match fortranTypeOb "\<character\>\@<=\s*\*"
syn match fortranBoolean "\.\s*\(true\|false\)\s*\."
@@ -161,7 +163,7 @@ syn keyword fortranIO access blank direct exist file fmt form formatted iostat
syn keyword fortran66Intrinsic alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl
" Intrinsics provided by some vendors
syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama erf erfc gamma iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh
syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh
syn keyword fortran77Intrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
syn match fortran77Intrinsic "\<len\s*[(,]"me=s+3
@@ -211,10 +213,12 @@ syn keyword fortranTypeEx external
syn keyword fortranIOEx format
syn match fortranKeywordEx "\<continue\>"
syn match fortranKeyword "^\s*\d\+\s\+continue\>"
syn match fortranKeywordEx "\<go\s*to\>"
syn match fortranKeyword "\<go\s*to\>"
syn match fortranKeywordDel "\<go\s*to\ze\s\+.*,\s*(.*$"
syn match fortranKeywordOb "\<go\s*to\ze\s*(\d\+.*$"
syn region fortranStringEx start=+'+ end=+'+ contains=fortranContinueMark,fortranLeftMargin,fortranSerialNumber
syn keyword fortran77IntrinsicEx dim lge lgt lle llt mod
syn keyword fortranKeywordOb assign pause to
syn keyword fortranKeywordDel assign pause
if b:fortran_dialect != "f77"
@@ -273,7 +277,7 @@ syn match fortranConditional "\<end\s*if"
syn match fortranIO contains=fortranOperator "\<e\(nd\|rr\)\s*=\s*\d\+"
syn match fortranConditional "\<else\s*if"
syn keyword fortranUnitHeaderR entry
syn keyword fortranUnitHeaderOb entry
syn match fortranTypeR display "double\s\+precision"
syn match fortranTypeR display "double\s\+complex"
syn match fortranUnitHeaderR display "block\s\+data"
@@ -467,6 +471,20 @@ if version >= 508 || !exists("did_fortran_syn_inits")
HiLink fortran08Intrinsic Function
HiLink fortran03Constant Function
if b:fortran_dialect != "f77"
HiLink fortranUnitHeaderOb Todo
HiLink fortranKeywordOb Todo
HiLink fortranConditionalOb Todo
HiLink fortranTypeOb Todo
HiLink fortranKeywordDel Todo
else
HiLink fortranUnitHeaderOb fortranUnitHeader
HiLink fortranKeywordOb fortranKeyword
HiLink fortranConditionalOb fortranConditional
HiLink fortranTypeOb fortranType
HiLink fortranKeywordDel fortranKeyword
endif
if ( b:fortran_dialect == "elf" || b:fortran_dialect == "F" )
HiLink fortranKeywordOb fortranObsolete
HiLink fortran66Intrinsic fortranObsolete

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: GSP - GNU Server Pages (v. 0.86)
" Created By: Nathaniel Harward nharward@yahoo.com
" Last Changed: Dec. 12, 2000
" Last Changed: 2012 Jan 08 by Thilo Six
" Filenames: *.gsp
" URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim
@@ -34,6 +34,9 @@ else
syn include @gspJava syntax/java.vim
endif
let s:cpo_save = &cpo
set cpo&vim
" Add <java> as an HTML tag name along with its args
syn keyword htmlTagName contained java
syn keyword htmlArg contained type file page
@@ -57,3 +60,6 @@ let b:current_syntax = "gsp"
if main_syntax == 'gsp'
unlet main_syntax
endif
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -2,7 +2,7 @@
" Language: Hyper Builder
" Maintainer: Alejandro Forero Cuervo
" URL: http://bachue.com/hb/vim/syntax/hb.vim
" Last Change: 2001 Sep 02
" Last Change: 2012 Jan 08 by Thilo Six
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -12,6 +12,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Read the HTML syntax to start with
"syn include @HTMLStuff <sfile>:p:h/htmlhb.vim
@@ -94,4 +97,6 @@ syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$"
let b:current_syntax = "hb"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

View File

@@ -1,13 +1,16 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2011 Dec 03
" Last Change: 2012 Jan 08
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1
syn match helpSectionDelim "^=\{3,}.*===$"
syn match helpSectionDelim "^-\{3,}.*--$"
@@ -196,4 +199,6 @@ hi def link helpURL String
let b:current_syntax = "help"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8 sw=2

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Makeindex style file, *.ist
" Maintainer: Peter Meszaros <pmeszaros@effice.hu>
" Last Change: May 4, 2001
" Last Change: 2012 Jan 08 by Thilo Six
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -11,6 +11,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
if version >= 600
setlocal iskeyword=$,@,48-57,_
else
@@ -67,4 +70,6 @@ endif
let b:current_syntax = "ist"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8 sw=2

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: JAM
" Maintainer: Ralf Lemke (ralflemk@t-online.de)
" Last change: 09-10-2000
" Last change: 2012 Jan 08 by Thilo Six
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -11,6 +11,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
if version >= 600
setlocal iskeyword=@,48-57,_,-
else
@@ -249,4 +252,6 @@ endif
let b:current_syntax = "jam"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

63
runtime/syntax/ninja.vim Normal file
View File

@@ -0,0 +1,63 @@
" ninja build file syntax.
" Language: ninja build file as described at
" http://martine.github.com/ninja/manual.html
" Version: 1.0
" Last Change: 2012 Jan 04
" Maintainer: Nicolas Weber <nicolasweber@gmx.de>
" ninja lexer and parser are at
" https://github.com/martine/ninja/blob/master/src/lexer.in.cc
" https://github.com/martine/ninja/blob/master/src/parsers.cc
if exists("b:current_syntax")
finish
endif
syn case match
" Toplevel statements are the ones listed here and
" toplevel variable assignments (ident '=' value).
" lexer.in.cc, ReadToken() and parsers.cc, Parse()
syn match ninjaKeyword "^build\>"
syn match ninjaKeyword "^rule\>"
syn match ninjaKeyword "^default\>"
syn match ninjaKeyword "^include\>"
syn match ninjaKeyword "^subninja\>"
" Both 'build' and 'rule' begin a variable scope that ends
" on the first line without indent. 'rule' allows only a
" limited set of magic variables, 'build' allows general
" let assignments.
" parsers.cc, ParseRule()
syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent
syn keyword ninjaRuleCommand contained command depfile description generator restat
" Strings are parsed as follows:
" lexer.in.cc, ReadEvalString()
" simple_varname = [a-zA-Z0-9_-]+;
" varname = [a-zA-Z0-9_.-]+;
" $$ -> $
" $\n -> line continuation
" '$ ' -> escaped space
" $simple_varname -> variable
" ${varname} -> variable
syn match ninjaWrapLineOperator "\$$"
syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+"
syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}"
" operators are:
" variable assignment =
" rule definition :
" implicit dependency |
" order-only dependency ||
syn match ninjaOperator "\(=\|:\||\|||\)\ze\s"
hi def link ninjaKeyword Keyword
hi def link ninjaRuleCommand Statement
hi def link ninjaWrapLineOperator ninjaOperator
hi def link ninjaOperator Operator
hi def link ninjaSimpleVar ninjaVar
hi def link ninjaVar Identifier
let b:current_syntax = "ninja"