summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/eval.txt3
-rw-r--r--runtime/doc/filetype.txt6
-rw-r--r--runtime/doc/ft_rust.txt2
-rw-r--r--runtime/doc/message.txt9
-rw-r--r--runtime/doc/options.txt5
-rw-r--r--runtime/doc/os_mac.txt30
-rw-r--r--runtime/doc/os_win32.txt2
-rw-r--r--runtime/doc/tags8
-rw-r--r--runtime/doc/todo.txt24
-rw-r--r--runtime/doc/usr_41.txt6
-rw-r--r--runtime/filetype.vim5
-rw-r--r--runtime/indent/php.vim73
-rw-r--r--runtime/pack/dist/opt/matchit/plugin/matchit.vim24
-rw-r--r--runtime/syntax/sas.vim508
14 files changed, 385 insertions, 320 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index db0a7561fe..25873f8022 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.0. Last change: 2017 Mar 21
+*eval.txt* For Vim version 8.0. Last change: 2017 Mar 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7874,6 +7874,7 @@ test_override({name}, {val}) *test_override()*
name effect when {val} is non-zero ~
redraw disable the redrawing() function
+ silent_mode enable silent mode (like using |-s| after |-e|)
char_avail disable the char_avail() function
ALL clear all overrides ({val} is not used)
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 8f58d76d9c..795b2590ff 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 8.0. Last change: 2017 Mar 21
+*filetype.txt* For Vim version 8.0. Last change: 2017 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -353,12 +353,12 @@ define yourself. There are a few ways to avoid this:
You need to define your own mapping before the plugin is loaded (before
editing a file of that type). The plugin will then skip installing the
default mapping.
-
+ *no_mail_maps*
3. Disable defining mappings for a specific filetype by setting a variable,
which contains the name of the filetype. For the "mail" filetype this
would be: >
:let no_mail_maps = 1
-
+< *no_plugin_maps*
4. Disable defining mappings for all filetypes by setting a variable: >
:let no_plugin_maps = 1
<
diff --git a/runtime/doc/ft_rust.txt b/runtime/doc/ft_rust.txt
index b6e974e371..c2e21e40bb 100644
--- a/runtime/doc/ft_rust.txt
+++ b/runtime/doc/ft_rust.txt
@@ -1,7 +1,7 @@
*ft_rust.txt* Filetype plugin for Rust
==============================================================================
-CONTENTS *rust* *ft-rust*
+CONTENTS *rust*
1. Introduction |rust-intro|
2. Settings |rust-settings|
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index b2d057825b..5eeba0cf4a 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 8.0. Last change: 2017 Jan 02
+*message.txt* For Vim version 8.0. Last change: 2017 Mar 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -768,6 +768,13 @@ Example: >
You tried to execute a command that is neither an Ex command nor
a user-defined command.
+ *E943* >
+ Command table needs to be updated, run 'make cmdidxs'
+
+This can only happen when changing the source code, when adding a command in
+src/ex_cmds.h. The lookup table then needs to be updated, by running: >
+ make cmdidxs
+
==============================================================================
3. Messages *messages*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9a88edb1a9..b4ee717514 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 8.0. Last change: 2017 Mar 09
+*options.txt* For Vim version 8.0. Last change: 2017 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6489,8 +6489,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
"bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
systems, the default is set according to the value of 'shell', to
- reduce the need to set this option by the user. It's not used for
- OS/2 (EMX figures this out itself).
+ reduce the need to set this option by the user.
On Unix it can have more than one flag. Each white space separated
part is passed as an argument to the shell command.
See |option-backslash| about including spaces and backslashes.
diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt
index 82e4d75da2..53010b17c2 100644
--- a/runtime/doc/os_mac.txt
+++ b/runtime/doc/os_mac.txt
@@ -12,11 +12,12 @@ NOTE: This file is a bit outdated. You might find more useful info here:
http://macvim.org/
1. Filename Convention |mac-filename|
-2. .vimrc an .vim files |mac-vimfile|
-3. FAQ |mac-faq|
-4. Known Lack |mac-lack|
-5. Mac Bug Report |mac-bug|
-6. Compiling Vim |mac-compile|
+2. .vimrc and .vim files |mac-vimfile|
+3. Standard mappings |mac-standard-mappings|
+4. FAQ |mac-faq|
+5. Known Lack |mac-lack|
+6. Mac Bug Report |mac-bug|
+7. Compiling Vim |mac-compile|
There was a Mac port for version 3.0 of Vim. Here are the first few lines
from the old file:
@@ -72,7 +73,18 @@ the |'nocompatible'| option is set, otherwise it will only handle mac format
files.
==============================================================================
-3. Mac FAQ *mac-faq*
+3. Standard mappings *mac-standard-mappings*
+
+The following mappings are available for cut/copy/paste from/to clipboard.
+
+key Normal Visual Insert Description ~
+Command-v "*P "-d"*P <C-R>* paste text *<D-v>*
+Command-c "*y copy Visual text *<D-c>*
+Command-x "*d cut Visual text *<D-x>*
+Backspace "*d cut Visual text
+
+==============================================================================
+4. Mac FAQ *mac-faq*
On the internet: http://macvim.org/OSX/index.php#FAQ
@@ -95,13 +107,13 @@ A: The following trick works with most shells. Put it in your vimrc file.
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
==============================================================================
-4. Mac Lack *mac-lack*
+5. Mac Lack *mac-lack*
In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as
Shift-Control-2.
==============================================================================
-5. Mac Bug Report *mac-bug*
+6. Mac Bug Report *mac-bug*
When reporting any Mac specific bug or feature change, please use the vim-mac
maillist |vim-mac|. However, you need to be subscribed. An alternative is to
@@ -110,7 +122,7 @@ send a message to the current MacVim maintainers:
mac@vim.org
==============================================================================
-6. Compiling Vim *mac-compile*
+7. Compiling Vim *mac-compile*
See the file "src/INSTALLmac.txt" that comes with the source files.
diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt
index 663087b96c..98b37d0ab8 100644
--- a/runtime/doc/os_win32.txt
+++ b/runtime/doc/os_win32.txt
@@ -1,4 +1,4 @@
-*os_win32.txt* For Vim version 8.0. Last change: 2016 Oct 12
+*os_win32.txt* For Vim version 8.0. Last change: 2017 Mar 21
VIM REFERENCE MANUAL by George Reilly
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 6e74c66f00..4f449e40dd 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3277,6 +3277,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<Char> map.txt /*<Char>*
<CursorHold> autocmd.txt /*<CursorHold>*
<D- intro.txt /*<D-*
+<D-c> os_mac.txt /*<D-c>*
+<D-v> os_mac.txt /*<D-v>*
+<D-x> os_mac.txt /*<D-x>*
<Del> change.txt /*<Del>*
<Down> motion.txt /*<Down>*
<Drop> change.txt /*<Drop>*
@@ -4514,6 +4517,7 @@ E94 windows.txt /*E94*
E940 eval.txt /*E940*
E941 eval.txt /*E941*
E942 eval.txt /*E942*
+E943 message.txt /*E943*
E95 message.txt /*E95*
E96 diff.txt /*E96*
E97 diff.txt /*E97*
@@ -6139,7 +6143,6 @@ ft-rst-syntax syntax.txt /*ft-rst-syntax*
ft-ruby-omni insert.txt /*ft-ruby-omni*
ft-ruby-syntax syntax.txt /*ft-ruby-syntax*
ft-rust filetype.txt /*ft-rust*
-ft-rust ft_rust.txt /*ft-rust*
ft-scheme-syntax syntax.txt /*ft-scheme-syntax*
ft-sdl-syntax syntax.txt /*ft-sdl-syntax*
ft-sed-syntax syntax.txt /*ft-sed-syntax*
@@ -7179,6 +7182,7 @@ mac-compile os_mac.txt /*mac-compile*
mac-faq os_mac.txt /*mac-faq*
mac-filename os_mac.txt /*mac-filename*
mac-lack os_mac.txt /*mac-lack*
+mac-standard-mappings os_mac.txt /*mac-standard-mappings*
mac-vimfile os_mac.txt /*mac-vimfile*
macintosh os_mac.txt /*macintosh*
macro map.txt /*macro*
@@ -7689,6 +7693,8 @@ nice todo.txt /*nice*
no-eval-feature eval.txt /*no-eval-feature*
no-type-checking eval.txt /*no-type-checking*
no_buffers_menu gui.txt /*no_buffers_menu*
+no_mail_maps filetype.txt /*no_mail_maps*
+no_plugin_maps filetype.txt /*no_plugin_maps*
non-greedy pattern.txt /*non-greedy*
non-zero-arg eval.txt /*non-zero-arg*
none-variable eval.txt /*none-variable*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 281cbc0e93..6f917d1f0f 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.0. Last change: 2017 Mar 21
+*todo.txt* For Vim version 8.0. Last change: 2017 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -110,8 +110,8 @@ manager. Problem with Motif?
Memory leak in test97? The string is actually freed. Weird.
-Patch to make "start" work better: Use ShellExecute in !start (Katsuya Hino,
-#1570)
+Patch for deleting the quickfix lists and a test for it. (Yegappan, 2017 Mar
+21)
Add a toolbar in the terminal. Can be global, above all windows, or specific
for one window.
@@ -122,6 +122,8 @@ Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
What if there is an invalid character?
+Patch for broken foldtext. (Christian 2017 Mar 22, #1567, 2nd one)
+
Json string with trailing \u should be an error. (Lcd)
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
@@ -148,6 +150,9 @@ Another example in #1309
Patch to change all use of &sw to shiftwidth(). (Tyru, 2017 Feb 19)
Wait until maintainers integrate it.
+Patch to change mb_char2len() to utf_char2len(c) when known to use UTF.
+(Dominique, 2017 Mar 21, #1582)
+
Completion for user-defined commands does not work if a few characters were
already typed. (Dominique, 2017 Jan 26)
@@ -157,6 +162,9 @@ when writing viminfo (and the delete was the most recent action). #1339
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
#1330)
+Patch to Modernize GtkForm Implmentation. (Kazuki Kuriyama, 2017 Mar 26)
+Any objections?
+
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
Completion for :!cmd shows each match twice. #1435
@@ -341,14 +349,6 @@ Jul 25, #948)
Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
(Ken Takata, 2016 Oct 4)
-Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
-Better help Aug 19.
-Problem: applies to too many commands, such as :cbuffer.
-Updated patch with three options, 2016 Sep 8.
- Win32: When running ":make" and 'encoding' differs from the system locale,
- the output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei
- Wu) Should we use 'termencoding' for this?
-
Patch to add 'systemencoding', convert between 'encoding' and this for file
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
Assume the system converts between the actual encoding of the filesystem to
@@ -421,7 +421,7 @@ When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
Because of using the initial buffer? (Dun Peal, 2016 May 12)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
-Updated 2016 Jun 10, #858
+Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>
Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 5bf855cde5..d675c5e0b1 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 18
+*usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 28
VIM USER MANUAL - by Bram Moolenaar
@@ -2277,8 +2277,8 @@ plugin for the mail filetype: >
endif
Two global variables are used:
-no_plugin_maps disables mappings for all filetype plugins
-no_mail_maps disables mappings for a specific filetype
+|no_plugin_maps| disables mappings for all filetype plugins
+|no_mail_maps| disables mappings for the "mail" filetype
USER COMMANDS
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 4bdfeb2204..fce45d9b65 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Mar 13
+" Last Change: 2017 Mar 27
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -288,7 +288,8 @@ au BufNewFile,BufRead *.bib setf bib
au BufNewFile,BufRead *.bst setf bst
" BIND configuration
-au BufNewFile,BufRead named.conf,rndc.conf setf named
+" sudoedit uses namedXXXX.conf
+au BufNewFile,BufRead named*.conf,rndc*.conf setf named
" BIND zone
au BufNewFile,BufRead named.root setf bindzone
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index 07ecd8f141..06b49f3cb6 100644
--- a/runtime/indent/php.vim
+++ b/runtime/indent/php.vim
@@ -3,8 +3,8 @@
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
-" Last Change: 2015 September 8th
-" Version: 1.60
+" Last Change: 2017 March 12th
+" Version: 1.62
"
"
" Type :help php-indent for available options
@@ -141,11 +141,13 @@ let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
-let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
+let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
+let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.s:endline
-let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
+let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
+let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\<new\s\+class\>'
@@ -214,10 +216,28 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum = lnum - 1
endwhile
elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline
- let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$', '')
- while getline(lnum) !~? tofind && lnum > 1
- let lnum = lnum - 1
+
+ let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$\\|^[^\1]\\+[=([]\\s*[\1]', '')
+ let trylnum = lnum
+ while getline(trylnum) !~? tofind && trylnum > 1
+ let trylnum = trylnum - 1
endwhile
+
+ if trylnum == 1
+ break
+ else
+ if lastline =~ ';'.s:endline
+ while getline(trylnum) !~? s:terminated && getline(trylnum) !~? '{'.s:endline && trylnum > 1
+ let trylnum = prevnonblank(trylnum - 1)
+ endwhile
+
+
+ if trylnum == 1
+ break
+ end
+ end
+ let lnum = trylnum
+ end
else
break
endif
@@ -262,7 +282,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
while line > 1
let linec = getline(line)
- if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
+ if linec =~ s:terminated || linec =~ s:structureHead
break
endif
@@ -273,6 +293,20 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
return line
endfun " }}}
+let s:blockChars = {'{':1, '[': 1, '(': 1, ')':-1, ']':-1, '}':-1}
+function! BalanceDirection (str)
+
+ let balance = 0
+
+ for c in split(a:str, '\zs')
+ if has_key(s:blockChars, c)
+ let balance += s:blockChars[c]
+ endif
+ endfor
+
+ return balance
+endfun
+
function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>'
@@ -457,7 +491,7 @@ function! GetPhpIndent()
if synname!=""
if synname == "SpecStringEntrails"
- let b:InPHPcode = -1
+ let b:InPHPcode = -1 " thumb down
let b:InPHPcode_tofind = ""
elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
let b:InPHPcode = 1
@@ -540,7 +574,7 @@ function! GetPhpIndent()
let b:InPHPcode_and_script = 1
endif
- elseif last_line =~ '^[^''"`]\+[''"`]$'
+ elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
let b:InPHPcode = -1
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<\s*[''"]\=\a\w*[''"]\=$'
@@ -660,7 +694,8 @@ function! GetPhpIndent()
let terminated = s:terminated
- let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
+ let unstated = s:unstated
+
if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>'
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
@@ -673,7 +708,7 @@ function! GetPhpIndent()
while last_line_num > 1
- if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline
+ if previous_line =~ terminated || previous_line =~ s:structureHead
let ind = indent(last_line_num)
@@ -689,7 +724,7 @@ function! GetPhpIndent()
endwhile
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
- let ind = ind + s:sw()
+ let ind = ind + s:sw() " we indent one level further when the preceding line is not stated
return ind + addSpecial
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
@@ -699,7 +734,7 @@ function! GetPhpIndent()
let isSingleLineBlock = 0
while 1
- if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
+ if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
call cursor(last_line_num, 1)
if previous_line !~ '^}'
@@ -780,10 +815,10 @@ function! GetPhpIndent()
if !LastLineClosed
- if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline
+ if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline && BalanceDirection(last_line) > 0
let dontIndent = 0
- if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*)\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
+ if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\s*{'.endline && last_line !~ s:structureHead
let dontIndent = 1
endif
@@ -797,9 +832,9 @@ function! GetPhpIndent()
return ind + addSpecial
endif
- elseif last_line =~ '\S\+\s*),'.endline
+ elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0
call cursor(lnum, 1)
- call search('),'.endline, 'W')
+ call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)
@@ -809,7 +844,7 @@ function! GetPhpIndent()
let ind = ind + s:sw()
- elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
+ elseif AntepenultimateLine =~ '{'.endline && AntepenultimateLine !~? '^\s*use\>' || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
let ind = ind + s:sw()
endif
diff --git a/runtime/pack/dist/opt/matchit/plugin/matchit.vim b/runtime/pack/dist/opt/matchit/plugin/matchit.vim
index 22acb06130..4c9b84592c 100644
--- a/runtime/pack/dist/opt/matchit/plugin/matchit.vim
+++ b/runtime/pack/dist/opt/matchit/plugin/matchit.vim
@@ -1,7 +1,7 @@
" matchit.vim: (global plugin) Extended "%" matching
-" Last Change: 2016 Aug 21
+" Last Change: 2017 March 26
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
-" Version: 1.13.2, for Vim 6.3+
+" Version: 1.13.3, for Vim 6.3+
" Fix from Fernando Torres included.
" Improvement from Ken Takata included.
" URL: http://www.vim.org/script.php?script_id=39
@@ -89,12 +89,15 @@ let s:notslash = '\\\@<!\%(\\\\\)*'
function! s:Match_wrapper(word, forward, mode) range
" In s:CleanUp(), :execute "set" restore_options .
- let restore_options = (&ic ? " " : " no") . "ignorecase"
- if exists("b:match_ignorecase")
+ let restore_options = ""
+ if exists("b:match_ignorecase") && b:match_ignorecase != &ic
+ let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
- let restore_options = " ve=" . &ve . restore_options
- set ve=
+ if &ve != ''
+ let restore_options = " ve=" . &ve . restore_options
+ set ve=
+ endif
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
if a:mode == "v"
@@ -287,7 +290,9 @@ endfun
" Restore options and do some special handling for Operator-pending mode.
" The optional argument is the tail of the matching group.
fun! s:CleanUp(options, mode, startline, startcol, ...)
- execute "set" a:options
+ if strlen(a:options)
+ execute "set" a:options
+ endif
" Open folds, if appropriate.
if a:mode != "o"
if &foldopen =~ "percent"
@@ -639,8 +644,9 @@ fun! s:MultiMatch(spflag, mode)
if !exists("b:match_words") || b:match_words == ""
return ""
end
- let restore_options = (&ic ? "" : "no") . "ignorecase"
- if exists("b:match_ignorecase")
+ let restore_options = ""
+ if exists("b:match_ignorecase") && b:match_ignorecase != &ic
+ let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
let startline = line(".")
diff --git a/runtime/syntax/sas.vim b/runtime/syntax/sas.vim
index 90d411dc8b..82ffe605ce 100644
--- a/runtime/syntax/sas.vim
+++ b/runtime/syntax/sas.vim
@@ -1,262 +1,259 @@
" Vim syntax file
-" Language: SAS
-" Maintainer: James Kidd <james.kidd@covance.com>
-" Last Change: 2012 Apr 20
-" Corrected bug causing some keywords to appear as strings instead
-" 18 Jul 2008 by Paulo Tanimoto <ptanimoto@gmail.com>
-" Fixed comments with * taking multiple lines.
-" Fixed highlighting of macro keywords.
-" Added words to cases that didn't fit anywhere.
-" 02 Jun 2003
-" Added highlighting for additional keywords and such;
-" Attempted to match SAS default syntax colors;
-" Changed syncing so it doesn't lose colors on large blocks;
-" Much thanks to Bob Heckel for knowledgeable tweaking.
-" quit when a syntax file was already loaded
-if exists("b:current_syntax")
- finish
+" Language: SAS
+" Maintainer: Zhen-Huan Hu <wildkeny@gmail.com>
+" Original Maintainer: James Kidd <james.kidd@covance.com>
+" Version: 3.0.0
+" Last Change: Mar 10, 2017
+"
+" 2017 Mar 7
+"
+" Upgrade version number to 3.0. Improvements include:
+" - Improve sync speed
+" - Largely enhance precision
+" - Update keywords in the latest SAS (as of Mar 2017)
+" - Add syntaxes for date/time constants
+" - Add syntax for data lines
+" - Add (back) syntax for TODO in comments
+"
+" 2017 Feb 9
+"
+" Add syntax folding
+"
+" 2016 Oct 10
+"
+" Add highlighting for functions
+"
+" 2016 Sep 14
+"
+" Change the implementation of syntaxing
+" macro function names so that macro parameters same
+" as SAS keywords won't be highlighted
+" (Thank Joug Raw for the suggestion)
+" Add section highlighting:
+" - Use /** and **/ to define a section
+" - It functions the same as a comment but
+" with different highlighting
+"
+" 2016 Jun 14
+"
+" Major changes so upgrade version number to 2.0
+" Overhaul the entire script (again). Improvements include:
+" - Higher precision
+" - Faster synchronization
+" - Separate color for control statements
+" - Highlight hash and java objects
+" - Highlight macro variables in double quoted strings
+" - Update all syntaxes based on SAS 9.4
+" - Add complete SAS/GRAPH and SAS/STAT procedure syntaxes
+" - Add Proc TEMPLATE and GTL syntaxes
+" - Add complete DS2 syntaxes
+" - Add basic IML syntaxes
+" - Many other improvements and bug fixes
+" Drop support for VIM version < 600
+
+if version < 600
+ syntax clear
+elseif exists('b:current_syntax')
+ finish
endif
-syn case ignore
-
-syn region sasString start=+"+ skip=+\\\\\|\\"+ end=+"+
-syn region sasString start=+'+ skip=+\\\\\|\\"+ end=+'+
-
-" Want region from 'cards;' to ';' to be captured (Bob Heckel)
-syn region sasCards start="^\s*CARDS.*" end="^\s*;\s*$"
-syn region sasCards start="^\s*DATALINES.*" end="^\s*;\s*$"
-
-syn match sasNumber "-\=\<\d*\.\=[0-9_]\>"
-
-" Block comment
-syn region sasComment start="/\*" end="\*/" contains=sasTodo
-
-" Ignore misleading //JCL SYNTAX... (Bob Heckel)
-syn region sasComment start="[^/][^/]/\*" end="\*/" contains=sasTodo
-
-" Previous code for comments was written by Bob Heckel
-" Comments with * may take multiple lines (Paulo Tanimoto)
-syn region sasComment start=";\s*\*"hs=s+1 end=";" contains=sasTodo
-
-" Comments with * starting after a semicolon (Paulo Tanimoto)
-syn region sasComment start="^\s*\*" end=";" contains=sasTodo
-
-" This line defines macro variables in code. "hi def link" at end of file
-" defines the color scheme. Begin region with ampersand and end with
-" any non-word character offset by -1; put ampersand in the skip list
-" just in case it is used to concatenate macro variable values.
-
-" Thanks to ronald höllwarth for this fix to an intra-versioning
-" problem with this little feature
-
-syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1
-
-
-" I dont think specific PROCs need to be listed if use this line (Bob Heckel).
-syn match sasProc "^\s*PROC \w\+"
-syn keyword sasStep RUN QUIT DATA
-
-
-" Base SAS Procs - version 8.1
-
-syn keyword sasConditional DO ELSE END IF THEN UNTIL WHILE
-
-syn keyword sasStatement ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME
-syn keyword sasStatement CONTINUE DATALINES DATALINES4 DELETE DISPLAY
-syn keyword sasStatement DM DROP ENDSAS ERROR FILE FILENAME FOOTNOTE
-syn keyword sasStatement FORMAT GOTO INFILE INFORMAT INPUT KEEP
-syn keyword sasStatement LABEL LEAVE LENGTH LIBNAME LINK LIST LOSTCARD
-syn keyword sasStatement MERGE MISSING MODIFY OPTIONS OUTPUT PAGE
-syn keyword sasStatement PUT REDIRECT REMOVE RENAME REPLACE RETAIN
-syn keyword sasStatement RETURN SELECT SET SKIP STARTSAS STOP TITLE
-syn keyword sasStatement UPDATE WAITSAS WHERE WINDOW X SYSTASK
+let s:cpo_save = &cpo
+set cpo&vim
-" Keywords that are used in Proc SQL
-" I left them as statements because SAS's enhanced editor highlights
-" them the same as normal statements used in data steps (Jim Kidd)
-
-syn keyword sasStatement ADD AND ALTER AS CASCADE CHECK CREATE
-syn keyword sasStatement DELETE DESCRIBE DISTINCT DROP FOREIGN
-syn keyword sasStatement FROM GROUP HAVING INDEX INSERT INTO IN
-syn keyword sasStatement KEY LIKE MESSAGE MODIFY MSGTYPE NOT
-syn keyword sasStatement NULL ON OR ORDER PRIMARY REFERENCES
-syn keyword sasStatement RESET RESTRICT SELECT SET TABLE
-syn keyword sasStatement UNIQUE UPDATE VALIDATE VIEW WHERE
-
-" Match declarations have to appear one per line (Paulo Tanimoto)
-syn match sasStatement "FOOTNOTE\d"
-syn match sasStatement "TITLE\d"
-
-" Match declarations have to appear one per line (Paulo Tanimoto)
-syn match sasMacro "%BQUOTE"
-syn match sasMacro "%NRBQUOTE"
-syn match sasMacro "%CMPRES"
-syn match sasMacro "%QCMPRES"
-syn match sasMacro "%COMPSTOR"
-syn match sasMacro "%DATATYP"
-syn match sasMacro "%DISPLAY"
-syn match sasMacro "%DO"
-syn match sasMacro "%ELSE"
-syn match sasMacro "%END"
-syn match sasMacro "%EVAL"
-syn match sasMacro "%GLOBAL"
-syn match sasMacro "%GOTO"
-syn match sasMacro "%IF"
-syn match sasMacro "%INDEX"
-syn match sasMacro "%INPUT"
-syn match sasMacro "%KEYDEF"
-syn match sasMacro "%LABEL"
-syn match sasMacro "%LEFT"
-syn match sasMacro "%LENGTH"
-syn match sasMacro "%LET"
-syn match sasMacro "%LOCAL"
-syn match sasMacro "%LOWCASE"
-syn match sasMacro "%MACRO"
-syn match sasMacro "%MEND"
-syn match sasMacro "%NRBQUOTE"
-syn match sasMacro "%NRQUOTE"
-syn match sasMacro "%NRSTR"
-syn match sasMacro "%PUT"
-syn match sasMacro "%QCMPRES"
-syn match sasMacro "%QLEFT"
-syn match sasMacro "%QLOWCASE"
-syn match sasMacro "%QSCAN"
-syn match sasMacro "%QSUBSTR"
-syn match sasMacro "%QSYSFUNC"
-syn match sasMacro "%QTRIM"
-syn match sasMacro "%QUOTE"
-syn match sasMacro "%QUPCASE"
-syn match sasMacro "%SCAN"
-syn match sasMacro "%STR"
-syn match sasMacro "%SUBSTR"
-syn match sasMacro "%SUPERQ"
-syn match sasMacro "%SYSCALL"
-syn match sasMacro "%SYSEVALF"
-syn match sasMacro "%SYSEXEC"
-syn match sasMacro "%SYSFUNC"
-syn match sasMacro "%SYSGET"
-syn match sasMacro "%SYSLPUT"
-syn match sasMacro "%SYSPROD"
-syn match sasMacro "%SYSRC"
-syn match sasMacro "%SYSRPUT"
-syn match sasMacro "%THEN"
-syn match sasMacro "%TO"
-syn match sasMacro "%TRIM"
-syn match sasMacro "%UNQUOTE"
-syn match sasMacro "%UNTIL"
-syn match sasMacro "%UPCASE"
-syn match sasMacro "%VERIFY"
-syn match sasMacro "%WHILE"
-syn match sasMacro "%WINDOW"
-
-" SAS Functions
-
-syn keyword sasFunction ABS ADDR AIRY ARCOS ARSIN ATAN ATTRC ATTRN
-syn keyword sasFunction BAND BETAINV BLSHIFT BNOT BOR BRSHIFT BXOR
-syn keyword sasFunction BYTE CDF CEIL CEXIST CINV CLOSE CNONCT COLLATE
-syn keyword sasFunction COMPBL COMPOUND COMPRESS COS COSH CSS CUROBS
-syn keyword sasFunction CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB
-syn keyword sasFunction DAIRY DATE DATEJUL DATEPART DATETIME DAY
-syn keyword sasFunction DCLOSE DEPDB DEPDBSL DEPDBSL DEPSL DEPSL
-syn keyword sasFunction DEPSYD DEPSYD DEPTAB DEPTAB DEQUOTE DHMS
-syn keyword sasFunction DIF DIGAMMA DIM DINFO DNUM DOPEN DOPTNAME
-syn keyword sasFunction DOPTNUM DREAD DROPNOTE DSNAME ERF ERFC EXIST
-syn keyword sasFunction EXP FAPPEND FCLOSE FCOL FDELETE FETCH FETCHOBS
-syn keyword sasFunction FEXIST FGET FILEEXIST FILENAME FILEREF FINFO
-syn keyword sasFunction FINV FIPNAME FIPNAMEL FIPSTATE FLOOR FNONCT
-syn keyword sasFunction FNOTE FOPEN FOPTNAME FOPTNUM FPOINT FPOS
-syn keyword sasFunction FPUT FREAD FREWIND FRLEN FSEP FUZZ FWRITE
-syn keyword sasFunction GAMINV GAMMA GETOPTION GETVARC GETVARN HBOUND
-syn keyword sasFunction HMS HOSTHELP HOUR IBESSEL INDEX INDEXC
-syn keyword sasFunction INDEXW INPUT INPUTC INPUTN INT INTCK INTNX
-syn keyword sasFunction INTRR IRR JBESSEL JULDATE KURTOSIS LAG LBOUND
-syn keyword sasFunction LEFT LENGTH LGAMMA LIBNAME LIBREF LOG LOG10
-syn keyword sasFunction LOG2 LOGPDF LOGPMF LOGSDF LOWCASE MAX MDY
-syn keyword sasFunction MEAN MIN MINUTE MOD MONTH MOPEN MORT N
-syn keyword sasFunction NETPV NMISS NORMAL NOTE NPV OPEN ORDINAL
-syn keyword sasFunction PATHNAME PDF PEEK PEEKC PMF POINT POISSON POKE
-syn keyword sasFunction PROBBETA PROBBNML PROBCHI PROBF PROBGAM
-syn keyword sasFunction PROBHYPR PROBIT PROBNEGB PROBNORM PROBT PUT
-syn keyword sasFunction PUTC PUTN QTR QUOTE RANBIN RANCAU RANEXP
-syn keyword sasFunction RANGAM RANGE RANK RANNOR RANPOI RANTBL RANTRI
-syn keyword sasFunction RANUNI REPEAT RESOLVE REVERSE REWIND RIGHT
-syn keyword sasFunction ROUND SAVING SCAN SDF SECOND SIGN SIN SINH
-syn keyword sasFunction SKEWNESS SOUNDEX SPEDIS SQRT STD STDERR STFIPS
-syn keyword sasFunction STNAME STNAMEL SUBSTR SUM SYMGET SYSGET SYSMSG
-syn keyword sasFunction SYSPROD SYSRC SYSTEM TAN TANH TIME TIMEPART
-syn keyword sasFunction TINV TNONCT TODAY TRANSLATE TRANWRD TRIGAMMA
-syn keyword sasFunction TRIM TRIMN TRUNC UNIFORM UPCASE USS VAR
-syn keyword sasFunction VARFMT VARINFMT VARLABEL VARLEN VARNAME
-syn keyword sasFunction VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT
-syn keyword sasFunction VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW
-syn keyword sasFunction VFORMATWX VFORMATX VINARRAY VINARRAYX VINFORMAT
-syn keyword sasFunction VINFORMATD VINFORMATDX VINFORMATN VINFORMATNX
-syn keyword sasFunction VINFORMATW VINFORMATWX VINFORMATX VLABEL
-syn keyword sasFunction VLABELX VLENGTH VLENGTHX VNAME VNAMEX VTYPE
-syn keyword sasFunction VTYPEX WEEKDAY YEAR YYQ ZIPFIPS ZIPNAME ZIPNAMEL
-syn keyword sasFunction ZIPSTATE
-
-" Handy settings for using vim with log files
-syn keyword sasLogMsg NOTE
-syn keyword sasWarnMsg WARNING
-syn keyword sasErrMsg ERROR
-
-" Always contained in a comment (Bob Heckel)
-syn keyword sasTodo TODO TBD FIXME contained
-
-" These don't fit anywhere else (Bob Heckel).
-" Added others that were missing.
-syn keyword sasUnderscore _ALL_ _AUTOMATIC_ _CHARACTER_ _INFILE_ _N_ _NAME_ _NULL_ _NUMERIC_ _USER_ _WEBOUT_
-
-" End of SAS Functions
-
-" Define the default highlighting.
-" Only when an item doesn't have highlighting yet
-
-
-" Default sas enhanced editor color syntax
-hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White
-hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow
-hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White
-hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White
-hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White
-hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White
-hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
-hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui