summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-22 21:41:30 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-22 21:41:30 +0200
commit0b0f0992d46ef02fdfc1240744bef91d4299c1df (patch)
tree98e8b08baf3d88d8dac97161796121044037c0d0 /runtime
parent0b6d911e5de1a1c10a23d4c2ee1b0275c474a2dd (diff)
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/xmlformat.vim4
-rw-r--r--runtime/colors/tools/check_colors.vim2
-rw-r--r--runtime/doc/eval.txt8
-rw-r--r--runtime/doc/gui.txt2
-rw-r--r--runtime/doc/indent.txt19
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--runtime/doc/tabpage.txt3
-rw-r--r--runtime/doc/tags3
-rw-r--r--runtime/doc/terminal.txt4
-rw-r--r--runtime/doc/todo.txt21
-rw-r--r--runtime/doc/version8.txt27
-rw-r--r--runtime/indent/php.vim104
-rw-r--r--runtime/syntax/muttrc.vim320
-rw-r--r--runtime/syntax/tmux.vim89
14 files changed, 375 insertions, 233 deletions
diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim
index b21eccd8e3..83ba49a073 100644
--- a/runtime/autoload/xmlformat.vim
+++ b/runtime/autoload/xmlformat.vim
@@ -1,5 +1,5 @@
" Vim plugin for formatting XML
-" Last Change: Thu, 15 Jan 2015 21:26:55 +0100
+" Last Change: Thu, 22 May 2018 21:26:55 +0100
" Version: 0.1
" Author: Christian Brabandt <cb@256bit.org>
" Script: http://www.vim.org/scripts/script.php?script_id=
@@ -30,7 +30,7 @@ func! xmlformat#Format()
let lastitem = prev ? getline(prev) : ''
let is_xml_decl = 0
" split on `<`, but don't split on very first opening <
- for item in split(getline(v:lnum), '.\@<=[>]\zs')
+ for item in split(join(getline(v:lnum, (v:lnum + v:count - 1))), '.\@<=[>]\zs')
if s:EndTag(item)
let s:indent = s:DecreaseIndent()
call add(result, s:Indent(item))
diff --git a/runtime/colors/tools/check_colors.vim b/runtime/colors/tools/check_colors.vim
index 0cfe5ec121..6c5e8f3c0f 100644
--- a/runtime/colors/tools/check_colors.vim
+++ b/runtime/colors/tools/check_colors.vim
@@ -1,5 +1,5 @@
" This script tests a color scheme for some errors. Load the scheme and source
-" this script. e.g. :e colors/desert.vim | :so test_colors.vim
+" this script. e.g. :e colors/desert.vim | :so check_colors.vim
" Will output possible errors.
let s:save_cpo= &cpo
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 905074c8b9..e243ba3788 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -5822,7 +5822,8 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
listing.
When there is no mapping for {name}, an empty String is
- returned.
+ returned. When the mapping for {name} is empty, then "<Nop>"
+ is returned.
The {name} can have special key names, like in the ":map"
command.
@@ -5889,9 +5890,10 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
mapping that matches with {name}, while maparg() only finds a
mapping for {name} exactly.
When there is no mapping that starts with {name}, an empty
- String is returned. If there is one, the rhs of that mapping
+ String is returned. If there is one, the RHS of that mapping
is returned. If there are several mappings that start with
- {name}, the rhs of one of them is returned.
+ {name}, the RHS of one of them is returned. This will be
+ "<Nop>" if the RHS is empty.
The mappings local to the current buffer are checked first,
then the global mappings.
This function can be used to check if a mapping can be added
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index a66d997a92..c30aa33c04 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -999,7 +999,7 @@ it behaves in a strange way.
pointer instead of the cursor.
In the terminal this is the last known
position, which is usually at the last click
- or release (mouse movement is irrelevalt).
+ or release (mouse movement is irrelevant).
Example: >
:popup File
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index ac8bf53805..180d932b3f 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -907,6 +907,25 @@ In PHP braces are not required inside 'case/default' blocks therefore 'case:'
and 'default:' are indented at the same level than the 'switch()' to avoid
meaningless indentation. You can use the above option to return to the
traditional way.
+-------------
+
+ *PHP_noArrowMatching*
+By default the indent script will indent multi-line chained calls by matching
+the position of the '->': >
+
+ $user_name_very_long->name()
+ ->age()
+ ->info();
+
+You can revert to the classic way of indenting by setting this option to 1: >
+ :let g:PHP_noArrowMatching = 1
+
+You will obtain the following result: >
+
+ $user_name_very_long->name()
+ ->age()
+ ->info();
+
PYTHON *ft-python-indent*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 01c2d0e31d..422f100285 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5187,7 +5187,7 @@ A jump table for the options with a short description can be found at |Q_op|.
more depth, set 'maxfuncdepth' to a bigger number. But this will use
more memory, there is the danger of failing when memory is exhausted.
Increasing this limit above 200 also changes the maximum for Ex
- command resursion, see |E169|.
+ command recursion, see |E169|.
See also |:function|.
*'maxmapdepth'* *'mmd'* *E223*
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt
index 20dd1efbd7..31fcc43564 100644
--- a/runtime/doc/tabpage.txt
+++ b/runtime/doc/tabpage.txt
@@ -213,7 +213,8 @@ gT Go to the previous tab page. Wraps around from the first one
:tabN[ext] {count}
{count}<C-PageUp>
{count}gT Go {count} tab pages back. Wraps around from the first one
- to the last one.
+ to the last one. Note that the use of {count} is different
+ from |:tabnext|, where it is used as the tab page number.
:tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind*
:tabfir[st] Go to the first tab page.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index ea0b252f54..9d5af7f2fd 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -4749,6 +4749,7 @@ PEP8 filetype.txt /*PEP8*
PHP_BracesAtCodeLevel indent.txt /*PHP_BracesAtCodeLevel*
PHP_autoformatcomment indent.txt /*PHP_autoformatcomment*
PHP_default_indenting indent.txt /*PHP_default_indenting*
+PHP_noArrowMatching indent.txt /*PHP_noArrowMatching*
PHP_outdentSLComments indent.txt /*PHP_outdentSLComments*
PHP_outdentphpescape indent.txt /*PHP_outdentphpescape*
PHP_removeCRwhenUnix indent.txt /*PHP_removeCRwhenUnix*
@@ -8198,6 +8199,8 @@ redo-register undo.txt /*redo-register*
ref intro.txt /*ref*
reference intro.txt /*reference*
reference_toc help.txt /*reference_toc*
+reg_executing() eval.txt /*reg_executing()*
+reg_recording() eval.txt /*reg_recording()*
regexp pattern.txt /*regexp*
regexp-changes-5.4 version5.txt /*regexp-changes-5.4*
register sponsor.txt /*register*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index 8b8b77c841..b3fe522864 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -204,7 +204,7 @@ Syntax ~
++rows={height} Use {height} for the terminal window
height. If the terminal uses the full
Vim height (no window above or below
- th terminal window) the command line
+ the terminal window) the command line
height will be reduced as needed.
++cols={width} Use {width} for the terminal window
width. If the terminal uses the full
@@ -243,7 +243,7 @@ Trying to close the window with `CTRL-W :close` also fails. Using
You can use `CTRL-W :hide` to close the terminal window and make the buffer
hidden, the job keeps running. The `:buffer` command can be used to turn the
current window into a terminal window. If there are unsaved changes this
-fails, use ! to force, as usual.
+fails, use ! to force, as usual.
To have a background job run without a window, and open the window when it's
done, use options like this: >
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 13ab3551a8..2029c35ee1 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -39,7 +39,7 @@ browser use: https://github.com/vim/vim/issues/1234
-------------------- Known bugs and current work -----------------------
Terminal emulator window:
-- Win32: Termdebug doesn't work, because gdb does not support mi2.
+- Win32: Termdebug doesn't work, because gdb does not support mi2 on a tty.
This plugin: https://github.com/cpiger/NeoDebug runs gdb as a job,
redirecting input and output.
Open new console for for program with: "set new-console on"
@@ -61,13 +61,13 @@ Terminal emulator window:
after "run". Everything else works, including communication channel. Not
initializing mzscheme avoid the problem, thus it's not some #ifdef.
-Patch to refactor efm_to_regpat(). (Yegappan Lakshmanan, 2018 May 16, #2924)
+Does not build with MinGW out of the box:
+- _stat64 is not defined, need to use "struct stat" in vim.h
+- WINVER conflict, should use 0x0600 by default?
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
-Deprecate using has("patch213") always include the version number.
-
On Win32 when not in the console and t_Co >= 256, allow using 'tgc'.
(Nobuhiro Takasaki, #2833) Also check t_Co.
@@ -123,11 +123,8 @@ CreateFile() returns ERROR_SHARING_VIOLATION (Linwei, 2018 May 5)
Should add a test for every command line argument. Check coverage for what is
missing: --nofork, -A , -b, -h, etc.
-Completing a command sometimes results in duplicates, since 7.4.672.
-(Yegappan Lakshmanan, 2018 May 16)
-Duplication of completion suggestions for ":!hom". Issue #539.
-Patch by Christian, 2016 Jan 29
-Another patch in #2733.
+Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
+Update 2018 March 12, #2711
Improve the installer for MS-Windows. There are a few alternatives:
- Add silent install option. (Shane Lee, #751)
@@ -152,6 +149,7 @@ When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994)
Patch to support "xxd -ps". (Erik Auerswald, 2018 May 1)
+Lacks a test.
Column number is wrong when using 'linebreak' and 'wrap'. (Keith Smiley, 2018
Jan 15, #2555)
@@ -160,8 +158,6 @@ Jan 15, #2555)
Check argument of systemlist(). (Pavlov)
-Patch to add reg_executing() and reg_recording(). (Hirohito Higashi, #2745)
-
No maintainer for Vietnamese translations.
No maintainer for Simplified Chinese translations.
@@ -1184,9 +1180,6 @@ Patch for building a 32bit Vim with 64bit MingW compiler.
Patch: On MS-Windows shellescape() may have to triple double quotes.
(Ingo Karkat, 2015 Jan 16)
-Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
-Update 2018 March 12, #2711
-
Redo only remembers the last change. Could use "{count}g." to redo an older
change. How does the user know which change? At least have a way to list
them: ":repeats".
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
index c0910634d5..d927c54d6e 100644
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -14549,12 +14549,37 @@ Changed *changed-8.1*
Internal: A few C99 features are now allowed such as // comments and a
comma after the last enum entry. See |style-compiler|.
+Since patch 8.0.0029 removed support for older MS-Windows systems, only
+MS-Windows XP and later are supported.
+
Added *added-8.1*
-----
Various syntax, indent and other plugins were added.
+Quickfix improvements (by Yegappan Lakshmanan):
+ Added support for modifying any quickfix/location list in the quickfix
+ stack.
+ Added a unique identifier for every quickfix/location list.
+ Added support for associating any Vim type as a context information to
+ a quickfix/location list.
+ Enhanced the getqflist(), getloclist(), setqflist() and setloclist()
+ functions to get and set the various quickfix/location list attributes.
+ Added the QuickFixLine highlight group to highlight the current line
+ in the quickfix window.
+ The quickfix buffer b:changedtick variable is incremented for every
+ change to the contained quickfix list.
+ Added a changedtick variable to a quickfix/location list which is
+ incremented when the list is modified.
+ Added support for parsing text using 'errorformat' without creating a
+ new quickfix list.
+ Added support for the "module" item to a quickfix entry which can be
+ used for display purposes instead of a long file name.
+ Added support for freeing all the lists in the quickfix/location stack.
+ When opening a quickfix window using the :copen/:cwindow commands, the
+ supplied split modifiers are used.
+
Functions:
All the term_ functions.
@@ -21591,7 +21616,7 @@ Files: src/main.c
Patch 8.0.1158
Problem: Still old style tests.
-Solution: Convert serveral tests to new style. (Yegappan Lakshmanan)
+Solution: Convert several tests to new style. (Yegappan Lakshmanan)
Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
src/testdir/main.aap, src/testdir/test33.in,
src/testdir/test33.ok, src/testdir/test41.in,
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index d13a0a1034..5dee6c9f47 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: 2018 May 14
-" Version: 1.62
+" Last Change: 2018 May 18th
+" Version: 1.66
"
"
" Type :help php-indent for available options
@@ -82,6 +82,12 @@ else
let b:PHP_outdentphpescape = 1
endif
+if exists("PHP_noArrowMatching")
+ let b:PHP_noArrowMatching = PHP_noArrowMatching
+else
+ let b:PHP_noArrowMatching = 0
+endif
+
if exists("PHP_vintage_case_default_indent") && PHP_vintage_case_default_indent
let b:PHP_vintage_case_default_indent = 1
@@ -130,7 +136,7 @@ endif
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:functionDecl = '\<function\>\%(\s\+&\='.s:PHP_validVariable.'\)\=\s*(.*'
let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.s:endline
@@ -140,7 +146,6 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\<new\s\+class\>'
-
let s:escapeDebugStops = 0
function! DebugPrintReturn(scriptLine)
@@ -257,7 +262,7 @@ endfun
function! Skippmatch() " {{{
let synname = synIDattr(synID(line("."), col("."), 0), "name")
- if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
+ if synname ==? "Delimiter" || synname ==? "phpRegionDelimiter" || synname =~? "^phpParent" || synname ==? "phpArrayParens" || synname =~? '^php\%(Block\|Brace\)' || synname ==? "javaScriptBraces" || synname =~? '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
return 0
else
return 1
@@ -297,6 +302,48 @@ function! BalanceDirection (str)
return balance
endfun
+function! StripEndlineComments (line)
+ return substitute(a:line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
+endfun
+
+function! FindArrowIndent (lnum) " {{{
+
+ let parrentArrowPos = 0
+ let lnum = a:lnum
+ while lnum > 1
+ let last_line = getline(lnum)
+ if last_line =~ '^\s*->'
+ let parrentArrowPos = indent(a:lnum)
+ break
+ else
+ call cursor(lnum, 1)
+ let cleanedLnum = StripEndlineComments(last_line)
+ if cleanedLnum =~ '->'
+ if ! b:PHP_noArrowMatching
+ let parrentArrowPos = searchpos('->', 'W', lnum)[1] - 1
+ else
+ let parrentArrowPos = indent(lnum) + shiftwidth()
+ endif
+ break
+ elseif cleanedLnum =~ ')'.s:endline && BalanceDirection(last_line) < 0
+ call searchpos(')'.s:endline, 'cW', lnum)
+ let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
+ if openedparent != lnum
+ let lnum = openedparent
+ else
+ let openedparent = -1
+ endif
+
+ else
+ let parrentArrowPos = indent(lnum) + shiftwidth()
+ break
+ endif
+ endif
+ endwhile
+
+ return parrentArrowPos
+endfun "}}}
+
function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>'
@@ -368,7 +415,7 @@ function! FindTheSwitchIndent (lnum) " {{{
endfunction "}}}
-let s:SynPHPMatchGroups = {'phpParent':1, 'Delimiter':1, 'Define':1, 'Storageclass':1, 'StorageClass':1, 'Structure':1, 'Exception':1}
+let s:SynPHPMatchGroups = {'phpparent':1, 'delimiter':1, 'define':1, 'storageclass':1, 'structure':1, 'exception':1}
function! IslinePHP (lnum, tofind) " {{{
let cline = getline(a:lnum)
@@ -384,7 +431,7 @@ function! IslinePHP (lnum, tofind) " {{{
let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
- if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
+ if synname ==? 'phpStringSingle' || synname ==? 'phpStringDouble' || synname ==? 'phpBacktick'
if cline !~ '^\s*[''"`]'
return "SpecStringEntrails"
else
@@ -392,7 +439,7 @@ function! IslinePHP (lnum, tofind) " {{{
end
end
- if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' || synname =~? '^javaScript'
+ if get(s:SynPHPMatchGroups, tolower(synname)) || synname =~ '^php' || synname =~? '^javaScript'
return synname
else
return ""
@@ -423,6 +470,10 @@ endfunc
call ResetPhpOptions()
+function! GetPhpIndentVersion()
+ return "1.66-bundle"
+endfun
+
function! GetPhpIndent()
let b:GetLastRealCodeLNum_ADD = 0
@@ -480,14 +531,14 @@ function! GetPhpIndent()
endif
if synname!=""
- if synname == "SpecStringEntrails"
+ if synname ==? "SpecStringEntrails"
let b:InPHPcode = -1 " thumb down
let b:InPHPcode_tofind = ""
- elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
+ elseif synname !=? "phpHereDoc" && synname !=? "phpHereDocDelimiter"
let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
- if synname =~# '^php\%(Doc\)\?Comment'
+ if synname =~? '^php\%(Doc\)\?Comment'
let b:UserIsTypingComment = 1
let b:InPHPcode_checked = 0
endif
@@ -556,7 +607,7 @@ function! GetPhpIndent()
if 1 == b:InPHPcode
- if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter"
+ if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~?"Delimiter"
if cline !~? s:PHP_startindenttag
let b:InPHPcode = 0
let b:InPHPcode_tofind = s:PHP_startindenttag
@@ -712,7 +763,8 @@ function! GetPhpIndent()
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
let previous_line = getline(last_line_num)
endwhile
-
+ elseif cline =~ '^\s*->'
+ return FindArrowIndent(lnum)
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
let ind = ind + shiftwidth() " we indent one level further when the preceding line is not stated
return ind + addSpecial
@@ -724,7 +776,7 @@ function! GetPhpIndent()
let isSingleLineBlock = 0
while 1
- if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
+ if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
call cursor(last_line_num, 1)
if previous_line !~ '^}'
@@ -793,8 +845,7 @@ function! GetPhpIndent()
let AntepenultimateLine = getline(plinnum)
- let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
-
+ let last_line = StripEndlineComments(last_line)
if ind == b:PHP_default_indenting
if last_line =~ terminated && last_line !~# s:defaultORcase
@@ -804,11 +855,13 @@ function! GetPhpIndent()
if !LastLineClosed
+ let openedparent = -1
+
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:structureHead
+ if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\(\s*:\s*'.s:PHP_validVariable.'\)\=\s*{'.endline && last_line !~ s:structureHead
let dontIndent = 1
endif
@@ -819,18 +872,17 @@ function! GetPhpIndent()
if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1
let b:PHP_CurrentIndentLevel = ind
- return ind + addSpecial
endif
- elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0
+ elseif last_line =~ '),'.endline && BalanceDirection(last_line) < 0
call cursor(lnum, 1)
- call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
+ call searchpos('),'.endline, 'cW')
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)
endif
- elseif last_line =~ '^\s*'.s:blockstart
+ elseif last_line =~ s:structureHead
let ind = ind + shiftwidth()
@@ -838,9 +890,17 @@ function! GetPhpIndent()
let ind = ind + shiftwidth()
endif
+
+ if openedparent >= 0
+ let last_line = StripEndlineComments(getline(openedparent))
+ endif
+ endif
+
+ if cline =~ '^\s*[)\]];\='
+ let ind = ind - shiftwidth()
endif
- if cline =~ '^\s*[)\]];\='
+ if last_line =~ '^\s*->' && last_line !~? s:structureHead && BalanceDirection(last_line) <= 0
let ind = ind - shiftwidth()
endif
diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim
index e4395fdf59..830664e0eb 100644
--- a/runtime/syntax/muttrc.vim
+++ b/runtime/syntax/muttrc.vim
@@ -2,9 +2,9 @@
" Language: Mutt setup files
" Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
" Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net>
-" Last Change: 18 August 2016
+" Last Change: 21 May 2018
-" This file covers mutt version 1.7.0
+" This file covers mutt version 1.10.0
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -104,142 +104,175 @@ syn match muttrcKeyName contained "<F[0-9]\+>"
syn keyword muttrcVarBool skipwhite contained
\ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split
\ auto_tag autoedit beep beep_new bounce_delivered braille_friendly
- \ check_mbox_size check_new collapse_unread confirmappend confirmcreate
- \ crypt_autoencrypt crypt_autopgp crypt_autosign crypt_autosmime
- \ crypt_confirmhook crypt_opportunistic_encrypt crypt_replyencrypt
- \ crypt_replysign crypt_replysignencrypted crypt_timestamp crypt_use_gpgme
- \ crypt_use_pka delete_untag digest_collapse duplicate_threads edit_hdrs
- \ edit_headers encode_from envelope_from fast_reply fcc_clear followup_to
- \ force_name forw_decode forw_decrypt forw_quote forward_decode forward_decrypt
- \ forward_quote hdrs header help hidden_host hide_limited hide_missing
- \ hide_thread_subject hide_top_limited hide_top_missing honor_disposition
- \ idn_decode idn_encode ignore_linear_white_space ignore_list_reply_to
- \ imap_check_subscribed imap_list_subscribed imap_passive imap_peek
- \ imap_servernoise implicit_autoview include_onlyfirst keep_flagged
+ \ browser_abbreviate_mailboxes change_folder_next check_mbox_size check_new
+ \ collapse_unread confirmappend confirmcreate crypt_autoencrypt crypt_autopgp
+ \ crypt_autosign crypt_autosmime crypt_confirmhook crypt_opportunistic_encrypt
+ \ crypt_replyencrypt crypt_replysign crypt_replysignencrypted crypt_timestamp
+ \ crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads
+ \ edit_hdrs edit_headers encode_from envelope_from fast_reply fcc_clear
+ \ flag_safe followup_to force_name forw_decode forw_decrypt forw_quote
+ \ forward_decode forward_decrypt forward_quote hdrs header
+ \ header_color_partial help hidden_host hide_limited hide_missing
+ \ hide_thread_subject hide_top_limited hide_top_missing history_remove_dups
+ \ honor_disposition idn_decode idn_encode ignore_linear_white_space
+ \ ignore_list_reply_to imap_check_subscribed imap_list_subscribed imap_passive
+ \ imap_peek imap_servernoise implicit_autoview include_onlyfirst keep_flagged
\ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur
\ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off
\ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode
- \ narrow_tree pager_stop pgp_auto_decode pgp_auto_traditional pgp_autoencrypt
- \ pgp_autoinline pgp_autosign pgp_check_exit pgp_create_traditional
- \ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline pgp_replysign
- \ pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc
- \ pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all pop_last
- \ postpone_encrypt postpone_encrypt_as print_decode print_split prompt_after
- \ read_only reflow_space_quotes reflow_text reflow_wrap reply_self resolve
- \ resume_draft_files resume_edited_draft_files reverse_alias reverse_name
- \ reverse_realname rfc2047_parameters save_address save_empty save_name score
- \ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap
- \ sidebar_short_path sidebar_sort sidebar_visible sig_dashes sig_on_top
- \ smart_wrap smime_ask_cert_label smime_decrypt_use_default_key smime_is_default
- \ sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1
- \ ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top strict_mime
- \ strict_threads suspend text_flowed thorough_search thread_received tilde
- \ ts_enabled uncollapse_jump use_8bitmime use_domain use_envelope_from use_from
- \ use_idn use_ipv6 user_agent wait_key weed wrap_search write_bcc
+ \ mime_type_query_first narrow_tree pager_stop pgp_auto_decode
+ \ pgp_auto_traditional pgp_autoencrypt pgp_autoinline pgp_autosign
+ \ pgp_check_exit pgp_create_traditional pgp_ignore_subkeys pgp_long_ids
+ \ pgp_replyencrypt pgp_replyinline pgp_replysign pgp_replysignencrypted
+ \ pgp_retainable_sigs pgp_self_encrypt pgp_self_encrypt_as pgp_show_unusable
+ \ pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all
+ \ pop_last postpone_encrypt postpone_encrypt_as print_decode print_split
+ \ prompt_after read_only reflow_space_quotes reflow_text reflow_wrap
+ \ reply_self resolve resume_draft_files resume_edited_draft_files
+ \ reverse_alias reverse_name reverse_realname rfc2047_parameters save_address
+ \ save_empty save_name score sidebar_folder_indent sidebar_new_mail_only
+ \ sidebar_next_new_wrap sidebar_short_path sidebar_sort sidebar_visible
+ \ sig_dashes sig_on_top smart_wrap smime_ask_cert_label
+ \ smime_decrypt_use_default_key smime_is_default smime_self_encrypt
+ \ smime_self_encrypt_as sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3
+ \ ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host
+ \ ssl_verify_partial_chains status_on_top strict_mime strict_threads suspend
+ \ text_flowed thorough_search thread_received tilde ts_enabled uncollapse_jump
+ \ use_8bitmime use_domain use_envelope_from use_from use_idn use_ipv6
+ \ uncollapse_new user_agent wait_key weed wrap_search write_bcc
\ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syn keyword muttrcVarBool skipwhite contained
- \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc noattach_split
- \ noauto_tag noautoedit nobeep nobeep_new nobounce_delivered nobraille_friendly
- \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend noconfirmcreate
- \ nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign nocrypt_autosmime
- \ nocrypt_confirmhook nocrypt_opportunistic_encrypt nocrypt_replyencrypt
- \ nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme
- \ nocrypt_use_pka nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs
- \ noedit_headers noencode_from noenvelope_from nofast_reply nofcc_clear nofollowup_to
- \ noforce_name noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt
- \ noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing
- \ nohide_thread_subject nohide_top_limited nohide_top_missing nohonor_disposition
- \ noidn_decode noidn_encode noignore_linear_white_space noignore_list_reply_to
- \ noimap_check_subscribed noimap_list_subscribed noimap_passive noimap_peek
- \ noimap_servernoise noimplicit_autoview noinclude_onlyfirst nokeep_flagged
- \ nomail_check_recent nomail_check_stats nomailcap_sanitize nomaildir_check_cur
- \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers nomenu_move_off
- \ nomenu_scroll nomessage_cache_clean nometa_key nometoo nomh_purge nomime_forward_decode
- \ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt
+ \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc
+ \ noattach_split noauto_tag noautoedit nobeep nobeep_new nobounce_delivered
+ \ nobraille_friendly nobrowser_abbreviate_mailboxes nochange_folder_next
+ \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend
+ \ noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign
+ \ nocrypt_autosmime nocrypt_confirmhook nocrypt_opportunistic_encrypt
+ \ nocrypt_replyencrypt nocrypt_replysign nocrypt_replysignencrypted
+ \ nocrypt_timestamp nocrypt_use_gpgme nocrypt_use_pka nodelete_untag
+ \ nodigest_collapse noduplicate_threads noedit_hdrs noedit_headers
+ \ noencode_from noenvelope_from nofast_reply nofcc_clear noflag_safe
+ \ nofollowup_to noforce_name noforw_decode noforw_decrypt noforw_quote
+ \ noforward_decode noforward_decrypt noforward_quote nohdrs noheader
+ \ noheader_color_partial nohelp nohidden_host nohide_limited nohide_missing
+ \ nohide_thread_subject nohide_top_limited nohide_top_missing
+ \ nohistory_remove_dups nohonor_disposition noidn_decode noidn_encode
+ \ noignore_linear_white_space noignore_list_reply_to noimap_check_subscribed
+ \ noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise
+ \ noimplicit_autoview noinclude_onlyfirst nokeep_flagged nomail_check_recent
+ \ nomail_check_stats nomailcap_sanitize nomaildir_check_cur
+ \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers
+ \ nomenu_move_off nomenu_scroll nomessage_cache_clean nometa_key nometoo
+ \ nomh_purge nomime_forward_decode nomime_type_query_first nonarrow_tree
+ \ nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt
\ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional
- \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline nopgp_replysign
- \ nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nopgp_strict_enc
- \ nopgp_use_gpg_agent nopipe_decode nopipe_split nopop_auth_try_all nopop_last
- \ nopostpone_encrypt nopostpone_encrypt_as noprint_decode noprint_split noprompt_after
- \ noread_only noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve
- \ noresume_draft_files noresume_edited_draft_files noreverse_alias noreverse_name
- \ noreverse_realname norfc2047_parameters nosave_address nosave_empty nosave_name noscore
- \ nosidebar_folder_indent nosidebar_new_mail_only nosidebar_next_new_wrap
- \ nosidebar_short_path nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top
- \ nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default
- \ nosort_re nossl_force_tls nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1
- \ nossl_usesystemcerts nossl_verify_dates nossl_verify_host nostatus_on_top nostrict_mime
- \ nostrict_threads nosuspend notext_flowed nothorough_search nothread_received notilde
- \ nots_enabled nouncollapse_jump nouse_8bitmime nouse_domain nouse_envelope_from nouse_from
- \ nouse_idn nouse_ipv6 nouser_agent nowait_key noweed nowrap_search nowrite_bcc
+ \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline
+ \ nopgp_replysign nopgp_replysignencrypted nopgp_retainable_sigs
+ \ nopgp_self_encrypt nopgp_self_encrypt_as nopgp_show_unusable
+ \ nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split
+ \ nopop_auth_try_all nopop_last nopostpone_encrypt nopostpone_encrypt_as
+ \ noprint_decode noprint_split noprompt_after noread_only
+ \ noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve
+ \ noresume_draft_files noresume_edited_draft_files noreverse_alias
+ \ noreverse_name noreverse_realname norfc2047_parameters nosave_address
+ \ nosave_empty nosave_name noscore nosidebar_folder_indent
+ \ nosidebar_new_mail_only nosidebar_next_new_wrap nosidebar_short_path
+ \ nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top nosmart_wrap
+ \ nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default
+ \ nosmime_self_encrypt nosmime_self_encrypt_as nosort_re nossl_force_tls
+ \ nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts
+ \ nossl_verify_dates nossl_verify_host nossl_verify_partial_chains
+ \ nostatus_on_top nostrict_mime nostrict_threads nosuspend notext_flowed
+ \ nothorough_search nothread_received notilde nots_enabled nouncollapse_jump
+ \ nouse_8bitmime nouse_domain nouse_envelope_from nouse_from nouse_idn
+ \ nouse_ipv6 nouncollapse_new nouser_agent nowait_key noweed nowrap_search
+ \ nowrite_bcc
\ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syn keyword muttrcVarBool skipwhite contained
- \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc invattach_split
- \ invauto_tag invautoedit invbeep invbeep_new invbounce_delivered invbraille_friendly
- \ invcheck_mbox_size invcheck_new invcollapse_unread invconfirmappend invconfirmcreate
- \ invcrypt_autoencrypt invcrypt_autopgp invcrypt_autosign invcrypt_autosmime
- \ invcrypt_confirmhook invcrypt_opportunistic_encrypt invcrypt_replyencrypt
- \ invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme
- \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads invedit_hdrs
- \ invedit_headers invencode_from invenvelope_from invfast_reply invfcc_clear invfollowup_to
- \ invforce_name invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt
- \ invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited invhide_missing
- \ invhide_thread_subject invhide_top_limited invhide_top_missing invhonor_disposition
- \ invidn_decode invidn_encode invignore_linear_white_space invignore_list_reply_to
- \ invimap_check_subscribed invimap_list_subscribed invimap_passive invimap_peek
- \ invimap_servernoise invimplicit_autoview invinclude_onlyfirst invkeep_flagged
- \ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur
- \ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off
- \ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge invmime_forward_decode
- \ invnarrow_tree invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt
- \ invpgp_autoinline invpgp_autosign invpgp_check_exit invpgp_create_traditional
- \ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline invpgp_replysign
- \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc
- \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all invpop_last