mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 00:22:41 +00:00
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2015 Jun 19
|
||||
" Last Change: 2015 Jul 14
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -51,24 +51,25 @@ set cpo&vim
|
||||
|
||||
" Keep Python keywords in alphabetical order inside groups for easy
|
||||
" comparison with the table in the 'Python Language Reference'
|
||||
" http://docs.python.org/reference/lexical_analysis.html#keywords.
|
||||
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
|
||||
" https://docs.python.org/3/reference/lexical_analysis.html#keywords.
|
||||
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
|
||||
" Exceptions come last at the end of each group (class and def below).
|
||||
"
|
||||
" Keywords 'with' and 'as' are new in Python 2.6
|
||||
" (use 'from __future__ import with_statement' in Python 2.5).
|
||||
"
|
||||
" Some compromises had to be made to support both Python 3.0 and 2.6.
|
||||
" We include Python 3.0 features, but when a definition is duplicated,
|
||||
" Some compromises had to be made to support both Python 3 and 2.
|
||||
" We include Python 3 features, but when a definition is duplicated,
|
||||
" the last definition takes precedence.
|
||||
"
|
||||
" - 'False', 'None', and 'True' are keywords in Python 3.0 but they are
|
||||
" built-ins in 2.6 and will be highlighted as built-ins below.
|
||||
" - 'exec' is a built-in in Python 3.0 and will be highlighted as
|
||||
" - 'False', 'None', and 'True' are keywords in Python 3 but they are
|
||||
" built-ins in 2 and will be highlighted as built-ins below.
|
||||
" - 'exec' is a built-in in Python 3 and will be highlighted as
|
||||
" built-in below.
|
||||
" - 'nonlocal' is a keyword in Python 3.0 and will be highlighted.
|
||||
" - 'print' is a built-in in Python 3.0 and will be highlighted as
|
||||
" built-in below (use 'from __future__ import print_function' in 2.6)
|
||||
" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
|
||||
" - 'print' is a built-in in Python 3 and will be highlighted as
|
||||
" built-in below (use 'from __future__ import print_function' in 2)
|
||||
"
|
||||
syn keyword pythonStatement False, None, True
|
||||
syn keyword pythonStatement as assert break continue del exec global
|
||||
@@ -147,7 +148,8 @@ endif
|
||||
" - 08e0 or 08j are highlighted,
|
||||
"
|
||||
" and so on, as specified in the 'Python Language Reference'.
|
||||
" http://docs.python.org/reference/lexical_analysis.html#numeric-literals
|
||||
" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals
|
||||
" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
|
||||
if !exists("python_no_number_highlight")
|
||||
" numbers (including longs and complex)
|
||||
syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
|
||||
@@ -159,54 +161,58 @@ if !exists("python_no_number_highlight")
|
||||
syn match pythonNumber
|
||||
\ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@="
|
||||
syn match pythonNumber
|
||||
\ "\%(^\|\W\)\@<=\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
|
||||
\ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
|
||||
endif
|
||||
|
||||
" Group the built-ins in the order in the 'Python Library Reference' for
|
||||
" easier comparison.
|
||||
" http://docs.python.org/library/constants.html
|
||||
" http://docs.python.org/library/functions.html
|
||||
" http://docs.python.org/library/functions.html#non-essential-built-in-functions
|
||||
" https://docs.python.org/2/library/constants.html
|
||||
" https://docs.python.org/3/library/constants.html
|
||||
" http://docs.python.org/2/library/functions.html
|
||||
" http://docs.python.org/3/library/functions.html
|
||||
" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions
|
||||
" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions
|
||||
" Python built-in functions are in alphabetical order.
|
||||
if !exists("python_no_builtin_highlight")
|
||||
" built-in constants
|
||||
" 'False', 'True', and 'None' are also reserved words in Python 3.0
|
||||
" 'False', 'True', and 'None' are also reserved words in Python 3
|
||||
syn keyword pythonBuiltin False True None
|
||||
syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
|
||||
" built-in functions
|
||||
syn keyword pythonBuiltin abs all any bin bool chr classmethod
|
||||
syn keyword pythonBuiltin compile complex delattr dict dir divmod
|
||||
syn keyword pythonBuiltin enumerate eval filter float format
|
||||
syn keyword pythonBuiltin abs all any bin bool bytearray callable chr
|
||||
syn keyword pythonBuiltin classmethod compile complex delattr dict dir
|
||||
syn keyword pythonBuiltin divmod enumerate eval filter float format
|
||||
syn keyword pythonBuiltin frozenset getattr globals hasattr hash
|
||||
syn keyword pythonBuiltin help hex id input int isinstance
|
||||
syn keyword pythonBuiltin issubclass iter len list locals map max
|
||||
syn keyword pythonBuiltin min next object oct open ord pow print
|
||||
syn keyword pythonBuiltin property range repr reversed round set
|
||||
syn keyword pythonBuiltin memoryview min next object oct open ord pow
|
||||
syn keyword pythonBuiltin print property range repr reversed round set
|
||||
syn keyword pythonBuiltin setattr slice sorted staticmethod str
|
||||
syn keyword pythonBuiltin sum super tuple type vars zip __import__
|
||||
" Python 2.6 only
|
||||
syn keyword pythonBuiltin basestring callable cmp execfile file
|
||||
" Python 2 only
|
||||
syn keyword pythonBuiltin basestring cmp execfile file
|
||||
syn keyword pythonBuiltin long raw_input reduce reload unichr
|
||||
syn keyword pythonBuiltin unicode xrange
|
||||
" Python 3.0 only
|
||||
syn keyword pythonBuiltin ascii bytearray bytes exec memoryview
|
||||
" non-essential built-in functions; Python 2.6 only
|
||||
" Python 3 only
|
||||
syn keyword pythonBuiltin ascii bytes exec
|
||||
" non-essential built-in functions; Python 2 only
|
||||
syn keyword pythonBuiltin apply buffer coerce intern
|
||||
endif
|
||||
|
||||
" From the 'Python Library Reference' class hierarchy at the bottom.
|
||||
" http://docs.python.org/library/exceptions.html
|
||||
" http://docs.python.org/2/library/exceptions.html
|
||||
" http://docs.python.org/3/library/exceptions.html
|
||||
if !exists("python_no_exception_highlight")
|
||||
" builtin base exceptions (only used as base classes for other exceptions)
|
||||
" builtin base exceptions (used mostly as base classes for other exceptions)
|
||||
syn keyword pythonExceptions BaseException Exception
|
||||
syn keyword pythonExceptions ArithmeticError EnvironmentError
|
||||
syn keyword pythonExceptions ArithmeticError BufferError
|
||||
syn keyword pythonExceptions LookupError
|
||||
" builtin base exception removed in Python 3.0
|
||||
syn keyword pythonExceptions StandardError
|
||||
" builtin base exceptions removed in Python 3
|
||||
syn keyword pythonExceptions EnvironmentError StandardError
|
||||
" builtin exceptions (actually raised)
|
||||
syn keyword pythonExceptions AssertionError AttributeError BufferError
|
||||
syn keyword pythonExceptions AssertionError AttributeError
|
||||
syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
|
||||
syn keyword pythonExceptions IOError ImportError IndentationError
|
||||
syn keyword pythonExceptions ImportError IndentationError
|
||||
syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
|
||||
syn keyword pythonExceptions MemoryError NameError NotImplementedError
|
||||
syn keyword pythonExceptions OSError OverflowError ReferenceError
|
||||
@@ -214,13 +220,26 @@ if !exists("python_no_exception_highlight")
|
||||
syn keyword pythonExceptions SystemError SystemExit TabError TypeError
|
||||
syn keyword pythonExceptions UnboundLocalError UnicodeError
|
||||
syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
|
||||
syn keyword pythonExceptions UnicodeTranslateError ValueError VMSError
|
||||
syn keyword pythonExceptions WindowsError ZeroDivisionError
|
||||
syn keyword pythonExceptions UnicodeTranslateError ValueError
|
||||
syn keyword pythonExceptions ZeroDivisionError
|
||||
" builtin OS exceptions in Python 3
|
||||
syn keyword pythonExceptions BlockingIOError BrokenPipeError
|
||||
syn keyword pythonExceptions ChildProcessError ConnectionAbortedError
|
||||
syn keyword pythonExceptions ConnectionError ConnectionRefusedError
|
||||
syn keyword pythonExceptions ConnectionResetError FileExistsError
|
||||
syn keyword pythonExceptions FileNotFoundError InterruptedError
|
||||
syn keyword pythonExceptions IsADirectoryError NotADirectoryError
|
||||
syn keyword pythonExceptions PermissionError ProcessLookupError
|
||||
syn keyword pythonExceptions TimeoutError
|
||||
" builtin exceptions deprecated/removed in Python 3
|
||||
syn keyword pythonExceptions IOError VMSError WindowsError
|
||||
" builtin warnings
|
||||
syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
|
||||
syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
|
||||
syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
|
||||
syn keyword pythonExceptions UserWarning Warning
|
||||
" builtin warnings in Python 3
|
||||
syn keyword pythonExceptions ResourceWarning
|
||||
endif
|
||||
|
||||
if exists("python_space_error_highlight")
|
||||
|
||||
139
runtime/syntax/teraterm.vim
Normal file
139
runtime/syntax/teraterm.vim
Normal file
@@ -0,0 +1,139 @@
|
||||
" Vim syntax file
|
||||
" Language: Tera Term Language (TTL)
|
||||
" Based on Tera Term Version 4.86
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-teraterm
|
||||
" Last Change: 2015 Jun 24
|
||||
" Filenames: *.ttl
|
||||
" License: VIM License
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn region ttlComment start=";" end="$" contains=@Spell
|
||||
syn region ttlComment start="/\*" end="\*/" contains=@Spell
|
||||
syn region ttlFirstComment start="/\*" end="\*/" contained contains=@Spell
|
||||
\ nextgroup=ttlStatement,ttlFirstComment
|
||||
|
||||
syn match ttlCharacter "#\%(\d\+\|\$\x\+\)\>"
|
||||
syn match ttlNumber "\%(\<\d\+\|\$\x\+\)\>"
|
||||
syn match ttlString "'[^']*'" contains=@Spell
|
||||
syn match ttlString '"[^"]*"' contains=@Spell
|
||||
syn cluster ttlConstant contains=ttlCharacter,ttlNumber,ttlString
|
||||
|
||||
syn match ttlLabel ":\s*\w\{1,32}\>"
|
||||
|
||||
syn keyword ttlOperator and or xor not
|
||||
|
||||
syn match ttlVar "\<groupmatchstr\d\>"
|
||||
syn match ttlVar "\<param\d\>"
|
||||
syn keyword ttlVar inputstr matchstr paramcnt result timeout mtimeout
|
||||
|
||||
|
||||
syn match ttlLine nextgroup=ttlStatement "^"
|
||||
syn match ttlStatement contained "\s*"
|
||||
\ nextgroup=ttlIf,ttlElseIf,ttlConditional,ttlRepeat,
|
||||
\ ttlFirstComment,ttlComment,ttlLabel,@ttlCommand
|
||||
|
||||
syn cluster ttlCommand contains=ttlControlCommand,ttlCommunicationCommand,
|
||||
\ ttlStringCommand,ttlFileCommand,ttlPasswordCommand,
|
||||
\ ttlMiscCommand
|
||||
|
||||
|
||||
syn keyword ttlIf contained nextgroup=ttlIfExpression if
|
||||
syn keyword ttlElseIf contained nextgroup=ttlElseIfExpression elseif
|
||||
|
||||
syn match ttlIfExpression contained "\s.*"
|
||||
\ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen,
|
||||
\ @ttlCommand
|
||||
syn match ttlElseIfExpression contained "\s.*"
|
||||
\ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen
|
||||
|
||||
syn keyword ttlThen contained then
|
||||
syn keyword ttlConditional contained else endif
|
||||
|
||||
syn keyword ttlRepeat contained for next until enduntil while endwhile
|
||||
syn match ttlRepeat contained
|
||||
\ "\<\%(do\|loop\)\%(\s\+\%(while\|until\)\)\?\>"
|
||||
syn keyword ttlControlCommand contained
|
||||
\ break call continue end execcmnd exit goto include
|
||||
\ mpause pause return
|
||||
|
||||
|
||||
syn keyword ttlCommunicationCommand contained
|
||||
\ bplusrecv bplussend callmenu changedir clearscreen
|
||||
\ closett connect cygconnect disconnect dispstr
|
||||
\ enablekeyb flushrecv gethostname getmodemstatus
|
||||
\ gettitle kmtfinish kmtget kmtrecv kmtsend loadkeymap
|
||||
\ logautoclosemode logclose loginfo logopen logpause
|
||||
\ logrotate logstart logwrite quickvanrecv
|
||||
\ quickvansend recvln restoresetup scprecv scpsend
|
||||
\ send sendbreak sendbroadcast sendfile sendkcode
|
||||
\ sendln sendlnbroadcast sendmulticast setbaud
|
||||
\ setdebug setdtr setecho setmulticastname setrts
|
||||
\ setsync settitle showtt testlink unlink wait
|
||||
\ wait4all waitevent waitln waitn waitrecv waitregex
|
||||
\ xmodemrecv xmodemsend ymodemrecv ymodemsend
|
||||
\ zmodemrecv zmodemsend
|
||||
syn keyword ttlStringCommand contained
|
||||
\ code2str expandenv int2str regexoption sprintf
|
||||
\ sprintf2 str2code str2int strcompare strconcat
|
||||
\ strcopy strinsert strjoin strlen strmatch strremove
|
||||
\ strreplace strscan strspecial strsplit strtrim
|
||||
\ tolower toupper
|
||||
syn keyword ttlFileCommand contained
|
||||
\ basename dirname fileclose fileconcat filecopy
|
||||
\ filecreate filedelete filelock filemarkptr fileopen
|
||||
\ filereadln fileread filerename filesearch fileseek
|
||||
\ fileseekback filestat filestrseek filestrseek2
|
||||
\ filetruncate fileunlock filewrite filewriteln
|
||||
\ findfirst findnext findclose foldercreate
|
||||
\ folderdelete foldersearch getdir getfileattr makepath
|
||||
\ setdir setfileattr
|
||||
syn keyword ttlPasswordCommand contained
|
||||
\ delpassword getpassword ispassword passwordbox
|
||||
\ setpassword
|
||||
syn keyword ttlMiscCommand contained
|
||||
\ beep bringupbox checksum8 checksum8file checksum16
|
||||
\ checksum16file checksum32 checksum32file closesbox
|
||||
\ clipb2var crc16 crc16file crc32 crc32file exec
|
||||
\ dirnamebox filenamebox getdate getenv getipv4addr
|
||||
\ getipv6addr getspecialfolder gettime getttdir getver
|
||||
\ ifdefined inputbox intdim listbox messagebox random
|
||||
\ rotateleft rotateright setdate setdlgpos setenv
|
||||
\ setexitcode settime show statusbox strdim uptime
|
||||
\ var2clipb yesnobox
|
||||
|
||||
|
||||
hi def link ttlCharacter Character
|
||||
hi def link ttlNumber Number
|
||||
hi def link ttlComment Comment
|
||||
hi def link ttlFirstComment Comment
|
||||
hi def link ttlString String
|
||||
hi def link ttlLabel Label
|
||||
hi def link ttlIf Conditional
|
||||
hi def link ttlElseIf Conditional
|
||||
hi def link ttlThen Conditional
|
||||
hi def link ttlConditional Conditional
|
||||
hi def link ttlRepeat Repeat
|
||||
hi def link ttlControlCommand Keyword
|
||||
hi def link ttlVar Identifier
|
||||
hi def link ttlOperator Operator
|
||||
hi def link ttlCommunicationCommand Keyword
|
||||
hi def link ttlStringCommand Keyword
|
||||
hi def link ttlFileCommand Keyword
|
||||
hi def link ttlPasswordCommand Keyword
|
||||
hi def link ttlMiscCommand Keyword
|
||||
|
||||
let b:current_syntax = "teraterm"
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: ts=8 sw=2 sts=2
|
||||
@@ -223,7 +223,7 @@ syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub
|
||||
syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput
|
||||
syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open
|
||||
syn keyword vbStatement Option Preserve Private Property Public Put RSet
|
||||
syn keyword vbStatement RaiseEvent Randomize ReDim Redim Rem Reset Resume
|
||||
syn keyword vbStatement RaiseEvent Randomize ReDim Redim Reset Resume
|
||||
syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys
|
||||
syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time
|
||||
syn keyword vbStatement Type Unload Unlock Until Wend While Width With
|
||||
|
||||
Reference in New Issue
Block a user