aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-07-29 02:37:38 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-07-29 20:50:07 +0200
commitc8f34a9a3efa6e260e97c9c064f7e6cb8a099aa9 (patch)
tree913403fe7af24e7c74f9ea9078a51f7d592a03cb
parentab2cfd24e72f6cbcbc4fcea596eead189f690091 (diff)
downloadrneovim-c8f34a9a3efa6e260e97c9c064f7e6cb8a099aa9.tar.gz
rneovim-c8f34a9a3efa6e260e97c9c064f7e6cb8a099aa9.tar.bz2
rneovim-c8f34a9a3efa6e260e97c9c064f7e6cb8a099aa9.zip
vim-patch:d47d52232bf2
Update runtime files. https://github.com/vim/vim/commit/d47d52232bf21036c5c89081458be7eaf2630d24
-rw-r--r--runtime/autoload/xmlformat.vim16
-rw-r--r--runtime/doc/digraph.txt13
-rw-r--r--runtime/doc/eval.txt9
-rw-r--r--runtime/ftplugin/xml.vim8
-rw-r--r--runtime/indent/cs.vim74
-rw-r--r--runtime/indent/html.vim17
-rw-r--r--runtime/indent/tcl.vim50
-rw-r--r--runtime/indent/testdir/html.in26
-rw-r--r--runtime/indent/testdir/html.ok26
-rw-r--r--runtime/indent/testdir/tcl.in19
-rw-r--r--runtime/indent/testdir/tcl.ok19
-rw-r--r--runtime/indent/testdir/xml.in32
-rw-r--r--runtime/indent/testdir/xml.ok32
-rw-r--r--runtime/mswin.vim4
-rw-r--r--runtime/syntax/apache.vim4
-rw-r--r--runtime/syntax/cs.vim39
-rw-r--r--runtime/syntax/tasm.vim4
17 files changed, 322 insertions, 70 deletions
diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim
index f227b5ee25..ea89401977 100644
--- a/runtime/autoload/xmlformat.vim
+++ b/runtime/autoload/xmlformat.vim
@@ -1,9 +1,9 @@
" Vim plugin for formatting XML
-" Last Change: Thu, 22 May 2018 21:26:55 +0100
-" Version: 0.1
-" Author: Christian Brabandt <cb@256bit.org>
-" Repository: https://github.com/chrisbra/vim-xml-ftplugin
-" License: VIM License
+" Last Change: Thu, 07 Dec 2018
+" Version: 0.1
+" Author: Christian Brabandt <cb@256bit.org>
+" Repository: https://github.com/chrisbra/vim-xml-ftplugin
+" License: VIM License
" Documentation: see :h xmlformat.txt (TODO!)
" ---------------------------------------------------------------------
" Load Once: {{{1
@@ -85,7 +85,11 @@ func! s:Trim(item)
endfunc
" Check if tag is a new opening tag <tag> {{{1
func! s:StartTag(tag)
- return a:tag =~? '^\s*<[^/?]'
+ let is_comment = s:IsComment(a:tag)
+ return a:tag =~? '^\s*<[^/?]' && !is_comment
+endfunc
+func! s:IsComment(tag)
+ return a:tag =~? '<!--'
endfunc
" Remove one level of indentation {{{1
func! s:DecreaseIndent()
diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt
index 95bc3722d0..953a65f125 100644
--- a/runtime/doc/digraph.txt
+++ b/runtime/doc/digraph.txt
@@ -91,11 +91,14 @@ this, you will have to type <BS> e again. To avoid this don't set the
You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
-mode. After leaving the Insert mode everything is fine. Note that fmt
-removes all characters with a value above 128 from the text being formatted.
-On some Unix systems this means you have to define the environment-variable
-LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
- setenv LC_CTYPE iso_8859_1
+mode. After leaving the Insert mode everything is fine. On some Unix systems
+this means you have to define the environment-variable LC_CTYPE. If you are
+using csh, then put the following line in your .cshrc: >
+ setenv LC_CTYPE en_US.utf8
+(or similar for a different language or country). The value must be a valid
+locale on your system, i.e. on Unix-like systems it must be present in the
+output of >
+ locale -a
==============================================================================
3. Default digraphs *digraphs-default*
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 70e6895a75..d72b845ecd 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -482,7 +482,7 @@ To loop over the values use the |values()| function: >
:endfor
If you want both the key and the value use the |items()| function. It returns
-a List in which each item is a List with two items, the key and the value: >
+a List in which each item is a List with two items, the key and the value: >
:for [key, value] in items(mydict)
: echo key . ': ' . value
:endfor
@@ -1408,7 +1408,9 @@ Note that this means that filetype plugins don't get a different set of script
variables for each buffer. Use local buffer variables instead |b:var|.
-Predefined Vim variables: *vim-variable* *v:var* *v:*
+PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
+ *E963*
+Some variables can be set by the user, but the type cannot be changed.
*v:beval_col* *beval_col-variable*
v:beval_col The number of the column, over which the mouse pointer is.
@@ -7936,7 +7938,8 @@ str2float({expr}) *str2float()*
as when using a floating point number in an expression, see
|floating-point-format|. But it's a bit more permissive.
E.g., "1e40" is accepted, while in an expression you need to
- write "1.0e40".
+ write "1.0e40". The hexadecimal form "0x123" is also
+ accepted, but not others, like binary or octal.
Text after the number is silently ignored.
The decimal point is always '.', no matter what the locale is
set to. A comma ends the number: "12,345.67" is converted to
diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim
index 573a6ba441..1d43521155 100644
--- a/runtime/ftplugin/xml.vim
+++ b/runtime/ftplugin/xml.vim
@@ -1,8 +1,8 @@
" Vim filetype plugin file
-" Language: xml
-" Maintainer: Christian Brabandt <cb@256bit.org>
-" Last Changed: May 08th, 2018
-" Repository: https://github.com/chrisbra/vim-xml-ftplugin
+" Language: xml
+" Maintainer: Christian Brabandt <cb@256bit.org>
+" Last Changed: Dec 07th, 2018
+" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
diff --git a/runtime/indent/cs.vim b/runtime/indent/cs.vim
index 4a040b6fe2..76c12efecf 100644
--- a/runtime/indent/cs.vim
+++ b/runtime/indent/cs.vim
@@ -1,15 +1,73 @@
" Vim indent file
-" Language: C#
-" Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Fri, 15 Mar 2002 07:53:54 CET
+" Language: C#
+" Maintainer: Nick Jensen <nickspoon@gmail.com>
+" Former Maintainers: Aquila Deus
+" Johannes Zellner <johannes@zellner.org>
+" Last Change: 2018-11-21
+" Filenames: *.cs
+" License: Vim (see :h license)
+" Repository: https://github.com/nickspoons/vim-cs
+"
" Only load this indent file when no other was loaded.
-if exists("b:did_indent")
- finish
+if exists('b:did_indent')
+ finish
endif
let b:did_indent = 1
-" C# is like indenting C
-setlocal cindent
+let s:save_cpo = &cpoptions
+set cpoptions&vim
-let b:undo_indent = "setl cin<"
+
+setlocal indentexpr=GetCSIndent(v:lnum)
+
+function! s:IsCompilerDirective(line)
+ return a:line =~? '^\s*#'
+endf
+
+function! s:IsAttributeLine(line)
+ return a:line =~? '^\s*\[[A-Za-z]' && a:line =~? '\]$'
+endf
+
+function! s:FindPreviousNonCompilerDirectiveLine(start_lnum)
+ for delta in range(0, a:start_lnum)
+ let lnum = a:start_lnum - delta
+ let line = getline(lnum)
+ let is_directive = s:IsCompilerDirective(line)
+ if !is_directive
+ return lnum
+ endif
+ endfor
+ return 0
+endf
+
+function! GetCSIndent(lnum) abort
+ " Hit the start of the file, use zero indent.
+ if a:lnum == 0
+ return 0
+ endif
+
+ let this_line = getline(a:lnum)
+
+ " Compiler directives use zero indent if so configured.
+ let is_first_col_macro = s:IsCompilerDirective(this_line) && stridx(&l:cinkeys, '0#') >= 0
+ if is_first_col_macro
+ return cindent(a:lnum)
+ endif
+
+ let lnum = s:FindPreviousNonCompilerDirectiveLine(a:lnum - 1)
+ let previous_code_line = getline(lnum)
+ if s:IsAttributeLine(previous_code_line)
+ let ind = indent(lnum)
+ return ind
+ else
+ return cindent(a:lnum)
+ endif
+endfunction
+
+let b:undo_indent = 'setlocal indentexpr<'
+
+let &cpoptions = s:save_cpo
+unlet s:save_cpo
+
+" vim:et:sw=2:sts=2
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index bece6614b8..1a8177050a 100644
--- a/runtime/indent/html.vim
+++ b/runtime/indent/html.vim
@@ -216,8 +216,9 @@ endfunc "}}}
" Add known tag pairs.
" Self-closing tags and tags that are sometimes {{{
" self-closing (e.g., <p>) are not here (when encountering </p> we can find
-" the matching <p>, but not the other way around). Known self-closing tags:
-" 'p', 'img', 'source'.
+" the matching <p>, but not the other way around).
+" Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track',
+" 'wbr'.
" Old HTML tags:
call s:AddITags(s:indent_tags, [
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
@@ -232,11 +233,11 @@ call s:AddITags(s:indent_tags, [
" New HTML5 elements:
call s:AddITags(s:indent_tags, [
- \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
- \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption',
- \ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter',
- \ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section',
- \ 'summary', 'svg', 'time', 'track', 'video', 'wbr'])
+ \ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data',
+ \ 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure',
+ \ 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output',
+ \ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary',
+ \ 'svg', 'time', 'video'])
" Tags added for web components:
call s:AddITags(s:indent_tags, [
@@ -934,7 +935,7 @@ func! s:InsideTag(foundHtmlString)
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
endif
if idx == -1
- " after just <tag indent one level more
+ " after just "<tag" indent one level more
let idx = match(text, '<' . s:tagname . '$')
if idx >= 0
call cursor(lnum, idx)
diff --git a/runtime/indent/tcl.vim b/runtime/indent/tcl.vim
index e9d61e4366..d77081841d 100644
--- a/runtime/indent/tcl.vim
+++ b/runtime/indent/tcl.vim
@@ -1,7 +1,8 @@
" Vim indent file
-" Language: Tcl
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-12-20
+" Language: Tcl
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Update: Chris Heithoff <chrisheithoff@gmail.com>
+" Latest Revision: 2018-12-05
if exists("b:did_indent")
finish
@@ -28,6 +29,15 @@ function s:prevnonblanknoncomment(lnum)
return lnum
endfunction
+function s:ends_with_backslash(lnum)
+ let line = getline(a:lnum)
+ if line =~ '\\\s*$'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
function s:count_braces(lnum, count_open)
let n_open = 0
let n_close = 0
@@ -53,23 +63,39 @@ endfunction
function GetTclIndent()
let line = getline(v:lnum)
- if line =~ '^\s*\*'
- return cindent(v:lnum)
- elseif line =~ '^\s*}'
- return indent(v:lnum) - shiftwidth()
- endif
+ " Get the line number of the previous non-blank or non-comment line.
let pnum = s:prevnonblanknoncomment(v:lnum - 1)
if pnum == 0
return 0
endif
- let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
+ " ..and the previous line before the previous line.
+ let pnum2 = s:prevnonblanknoncomment(pnum-1)
- let pline = getline(pnum)
- if pline =~ '}\s*$'
- let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
+ " Default indentation is to preserve the previous indentation.
+ let ind = indent(pnum)
+
+ " ...but if previous line introduces an open brace, then increase current line's indentation
+ if s:count_braces(pnum, 1) > 0
+ let ind += shiftwidth()
+ else
+ " Look for backslash line continuation on the previous two lines.
+ let slash1 = s:ends_with_backslash(pnum)
+ let slash2 = s:ends_with_backslash(pnum2)
+ if slash1 && !slash2
+ " If the previous line begins a line continuation.
+ let ind += shiftwidth()
+ elseif !slash1 && slash2
+ " If two lines ago was the end of a line continuation group of lines.
+ let ind -= shiftwidth()
+ endif
endif
+ " If the current line begins with a closed brace, then decrease the indentation by one.
+ if line =~ '^\s*}'
+ let ind -= shiftwidth()
+ endif
+
return ind
endfunction
diff --git a/runtime/indent/testdir/html.in b/runtime/indent/testdir/html.in
new file mode 100644
index 0000000000..9c776d61c6
--- /dev/null
+++ b/runtime/indent/testdir/html.in
@@ -0,0 +1,26 @@
+" vim: set ft=html sw=4 :
+
+
+" START_INDENT
+<div>
+<div>
+text
+</div>
+</div>
+
+<div
+class="foo bar">
+text
+</div>
+
+<div class="foo bar"
+data="something">
+text
+</div>
+
+<div class="foo
+bar">
+text
+</div>
+
+" END_INDENT
diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok
new file mode 100644
index 0000000000..524d57bb6c
--- /dev/null
+++ b/runtime/indent/testdir/html.ok
@@ -0,0 +1,26 @@
+" vim: set ft=html sw=4 :
+
+
+" START_INDENT
+<div>
+ <div>
+ text
+ </div>
+</div>
+
+<div
+ class="foo bar">
+ text
+</div>
+
+<div class="foo bar"
+ data="something">
+ text
+</div>
+
+<div class="foo
+ bar">
+ text
+</div>
+
+" END_INDENT
diff --git a/runtime/indent/testdir/tcl.in b/runtime/indent/testdir/tcl.in
new file mode 100644
index 0000000000..3ef4ebc0a8
--- /dev/null
+++ b/runtime/indent/testdir/tcl.in
@@ -0,0 +1,19 @@
+# vim: set filetype=tcl shiftwidth=4 tabstop=4:
+
+# START_INDENT
+proc abc {} {
+set a 5
+if {[some_cmd]==1} {
+foreach i [list {1 2 3}] {
+# Does this comment affect anything?
+puts $i
+}
+}
+}
+
+command_with_a_long_time -arg1 "First" \
+-arg2 "Second" \
+-arg3 "Third"
+
+puts "Move indent back after line continuation is complete"
+# END_INDENT \ No newline at end of file
diff --git a/runtime/indent/testdir/tcl.ok b/runtime/indent/testdir/tcl.ok
new file mode 100644
index 0000000000..0fb52e782f
--- /dev/null
+++ b/runtime/indent/testdir/tcl.ok
@@ -0,0 +1,19 @@
+# vim: set filetype=tcl shiftwidth=4 tabstop=4:
+
+# START_INDENT
+proc abc {} {
+ set a 5
+ if {[some_cmd]==1} {
+ foreach i [list {1 2 3}] {
+ # Does this comment affect anything?
+ puts $i
+ }
+ }
+}
+
+command_with_a_long_time -arg1 "First" \
+ -arg2 "Second" \
+ -arg3 "Third"
+
+puts "Move indent back after line continuation is complete"
+# END_INDENT
diff --git a/runtime/indent/testdir/xml.in b/runtime/indent/testdir/xml.in
new file mode 100644
index 0000000000..d184681c86
--- /dev/null
+++ b/runtime/indent/testdir/xml.in
@@ -0,0 +1,32 @@
+<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
+<!-- START_INDENT -->
+<?xml version="1.0" encoding="utf-8"?>
+<tag0>
+ <tag1>
+<!-- comment -->
+<tag2>
+ <tag3/>
+</tag2>
+<!-- text comment -->
+
+<!--
+text comment
+-->
+</tag1>
+<!--
+text comment
+end coment -->
+</tag0>
+<!-- END_INDENT -->
+
+<!-- START_INDENT -->
+<?xml version="1.0" encoding="utf-8"?>
+<tag0>
+ <tag1>
+<!-- comment -->
+<tag2>
+ <tag3/>
+</tag2>
+</tag1>
+</tag0>
+<!-- END_INDENT -->
diff --git a/runtime/indent/testdir/xml.ok b/runtime/indent/testdir/xml.ok
new file mode 100644
index 0000000000..a8e2c92a16
--- /dev/null
+++ b/runtime/indent/testdir/xml.ok
@@ -0,0 +1,32 @@
+<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
+<!-- START_INDENT -->
+<?xml version="1.0" encoding="utf-8"?>
+<tag0>
+ <tag1>
+ <!-- comment -->
+ <tag2>
+ <tag3/>
+ </tag2>
+ <!-- text comment -->
+
+ <!--
+ text comment
+ -->
+ </tag1>
+ <!--
+ text comment
+ end coment -->
+</tag0>
+<!-- END_INDENT -->
+
+<!-- START_INDENT -->
+<?xml version="1.0" encoding="utf-8"?>
+<tag0>
+ <tag1>
+ <!-- comment -->
+ <tag2>
+ <tag3/>
+ </tag2>
+ </tag1>
+</tag0>
+<!-- END_INDENT -->
diff --git a/runtime/mswin.vim b/runtime/mswin.vim
index 5ec21491fe..2b04c1aea3 100644
--- a/runtime/mswin.vim
+++ b/runtime/mswin.vim
@@ -1,9 +1,9 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2017 Oct 28
+" Last Change: 2018 Dec 07
-" bail out if this isn't wanted (mrsvim.vim uses this).
+" Bail out if this isn't wanted.
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
finish
endif
diff --git a/runtime/syntax/apache.vim b/runtime/syntax/apache.vim
index e2315db0d7..71babfba36 100644
--- a/runtime/syntax/apache.vim
+++ b/runtime/syntax/apache.vim
@@ -3,7 +3,7 @@
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
-" Last Change: 2014-03-04
+" Last Change: 2018-12-06
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
" TODO: see particular FIXME's scattered through the file
" make it really linewise?
@@ -159,7 +159,7 @@ syn keyword apacheOption inherit
syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase
syn keyword apacheDeclaration LoadFile LoadModule
syn keyword apacheDeclaration CheckSpelling CheckCaseOnly
-syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCryptoDevice SSLEngine SSLHonorCipherOrder SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLUserName SSLVerifyClient SSLVerifyDepth
+syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCompression SSLCryptoDevice SSLEngine SSLFIPS SSLHonorCipherOrder SSLInsecureRenegotiation SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCheckPeerCN SSLProxyCheckPeerExpire SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateChainFile SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRenegBufferSize SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLSessionTicketKeyFile SSLSessionTickets SSLStrictSNIVHostCheck SSLUserName SSLVerifyClient SSLVerifyDepth
syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>"
syn keyword apacheOption builtin sem
syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):"
diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim
index 116afe0b72..1652cb63c3 100644
--- a/runtime/syntax/cs.vim
+++ b/runtime/syntax/cs.vim
@@ -3,7 +3,7 @@
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Anduin Withers <awithers@anduin.com>
" Johannes Zellner <johannes@zellner.org>
-" Last Change: 2018-06-29
+" Last Change: 2018-11-26
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@@ -11,12 +11,12 @@
" REFERENCES:
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
-if exists("b:current_syntax")
- finish
+if exists('b:current_syntax')
+ finish
endif
-let s:cs_cpo_save = &cpo
-set cpo&vim
+let s:save_cpo = &cpoptions
+set cpoptions&vim
syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
@@ -34,7 +34,7 @@ syn keyword csException try catch finally throw when
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
syn keyword csAsync async await
-syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this typeof unchecked unsafe using
+syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this unchecked unsafe using
syn keyword csUnsupportedStatement add remove value
syn keyword csUnspecifiedKeyword explicit implicit
@@ -44,10 +44,16 @@ syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interf
syn match csContextualStatement /\<\(get\|set\)\(;\|[[:space:]\n]*{\)/me=s+3
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
+" Operators
+syn keyword csTypeOf typeof contained
+syn region csTypeOfStatement start="typeof(" end=")" contains=csType, csTypeOf
+
" Punctuation
syn match csBraces "[{}\[\]]" display
syn match csParens "[()]" display
-syn match csOpSymbols "[+\-><=]\{1,2}" display
+syn match csOpSymbols "[+\-=]\{1,2}" display
+syn match csOpSymbols "[><]\{2}" display
+syn match csOpSymbols "\s\zs[><]\ze\_s" display
syn match csOpSymbols "[!><+\-*/]=" display
syn match csOpSymbols "[!*/^]" display
syn match csOpSymbols "=>" display
@@ -144,17 +150,18 @@ syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStateme
" The default highlighting.
hi def link csType Type
-hi def link csNewType Type
hi def link csClassType Type
hi def link csIsType Type
-hi def link csStorage StorageClass
-hi def link csClass StorageClass
+hi def link csStorage Structure
+hi def link csClass Structure
hi def link csRepeat Repeat
hi def link csConditional Conditional
hi def link csLabel Label
hi def link csModifier StorageClass
hi def link csConstant Constant
hi def link csException Exception
+hi def link csTypeOf Operator
+hi def link csTypeOfStatement Typedef
hi def link csUnspecifiedStatement Statement
hi def link csUnsupportedStatement Statement
hi def link csUnspecifiedKeyword Keyword
@@ -164,16 +171,12 @@ hi def link csIsAs Keyword
hi def link csAsync Keyword
hi def link csContextualStatement Statement
hi def link csOperatorError Error
-hi def link csInterfaceDeclaration Include
hi def link csTodo Todo
hi def link csComment Comment
-hi def link csEndColon Statement
hi def link csOpSymbols Operator
-hi def link csLogicSymbols Boolean
-hi def link csBraces Function
-hi def link csParens Operator
+hi def link csLogicSymbols Operator
hi def link csSpecialError Error
hi def link csSpecialCharError Error
@@ -200,9 +203,9 @@ hi def link csXmlCommentLeader Comment
hi def link csXmlComment Comment
hi def link csXmlTag Statement
-let b:current_syntax = "cs"
+let b:current_syntax = 'cs'
-let &cpo = s:cs_cpo_save
-unlet s:cs_cpo_save
+let &cpoptions = s:save_cpo
+unlet s:save_cpo
" vim: vts=16,28
diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim
index c9fc8186d0..1d6e570752 100644
--- a/runtime/syntax/tasm.vim
+++ b/runtime/syntax/tasm.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: TASM: turbo assembler by Borland
" Maintaner: FooLman of United Force <foolman@bigfoot.com>
-" Last Change: 2012 Feb 03 by Thilo Six
+" Last Change: 2012 Feb 03 by Thilo Six, and 2018 Nov 27.
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -109,7 +109,7 @@ hi def link tasmComment Comment
hi def link tasmLabel Label
-let b:curret_syntax = "tasm"
+let b:current_syntax = "tasm"
let &cpo = s:cpo_save
unlet s:cpo_save