summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-08-09 22:33:06 +0200
committerBram Moolenaar <Bram@vim.org>2010-08-09 22:33:06 +0200
commit9de999794999de1ccd3d743a2d5b361e5ce19273 (patch)
tree2cb9aef1ab2dcaa9aff8ebb6b914864db4101f2f
parentbc226b6ded1ede02f0543cc5f24d6e363ba66c0b (diff)
Runtime file updates.
-rw-r--r--runtime/doc/todo.txt9
-rw-r--r--runtime/ftplugin/perl.vim8
-rw-r--r--runtime/ftplugin/perl6.vim68
-rw-r--r--runtime/ftplugin/xs.vim9
-rw-r--r--runtime/indent/perl.vim255
-rw-r--r--runtime/syntax/muttrc.vim645
-rw-r--r--runtime/syntax/perl.vim4
7 files changed, 568 insertions, 430 deletions
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 5a1710312f..61ee4ef5b9 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.3f. Last change: 2010 Aug 08
+*todo.txt* For Vim version 7.3f. Last change: 2010 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,10 +30,13 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+'cursorline' stops too early in a help file, caused by conceal feature.
+
Before release 7.3:
- Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23)
Test 73 fails on MS-Windows when compiled with DJGPP.
+Possibly change WIN3264 to MSWIN || MSDOS.
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
@@ -57,6 +60,10 @@ Results in E670. (Tony Mechelynck, 2010 May 2)
":helpgrep" does not put the cursor in the correct column when preceded by
accented character. (Tony Mechelynck, 2010 Apr 15)
+Echo starts in the wrong column:
+ while 1 | let s = input('A') | echo 'R' | endw
+(Boyko Bantchev, 2010 Aug 9)
+
Patch: Let rare word highlighting overrule good word highlighting.
(Jakson A. Aquino, 2010 Jul 30)
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index 318e70ff97..1d948535aa 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -1,8 +1,8 @@
" Vim filetype plugin file
-" Language: Perl
-" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
-" Last Change: 20 Jan 2009
-" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
+" Language: Perl
+" Maintainer: Andy Lester <andy@petdance.com>
+" URL: http://github.com/petdance/vim-perl
+" Last Change: 2009-08-14
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
diff --git a/runtime/ftplugin/perl6.vim b/runtime/ftplugin/perl6.vim
new file mode 100644
index 0000000000..70339ff6b2
--- /dev/null
+++ b/runtime/ftplugin/perl6.vim
@@ -0,0 +1,68 @@
+" Vim filetype plugin file
+" Language: Perl 6
+" Maintainer: Andy Lester <andy@petdance.com>
+" URL: http://github.com/petdance/vim-perl/tree/master
+" Last Change: 2009-04-18
+" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
+"
+" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
+
+if exists("b:did_ftplugin") | finish | endif
+let b:did_ftplugin = 1
+
+" Make sure the continuation lines below do not cause problems in
+" compatibility mode.
+let s:save_cpo = &cpo
+set cpo-=C
+
+setlocal formatoptions+=crq
+setlocal comments=:#
+setlocal commentstring=#%s
+
+" Change the browse dialog on Win32 to show mainly Perl-related files
+if has("gui_win32")
+ let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
+ \ "Perl Modules (*.pm)\t*.pm\n" .
+ \ "Perl Documentation Files (*.pod)\t*.pod\n" .
+ \ "All Files (*.*)\t*.*\n"
+endif
+
+" Provided by Ned Konz <ned at bike-nomad dot com>
+"---------------------------------------------
+setlocal include=\\<\\(use\\\|require\\)\\>
+setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
+setlocal define=[^A-Za-z_]
+setlocal iskeyword=@,48-57,_,192-255
+
+" The following line changes a global variable but is necessary to make
+" gf and similar commands work. Thanks to Andrew Pimlott for pointing out
+" the problem. If this causes a " problem for you, add an
+" after/ftplugin/perl6.vim file that contains
+" set isfname-=:
+set isfname+=:
+
+" Set this once, globally.
+if !exists("perl6path")
+ if executable("perl6")
+ if &shellxquote != '"'
+ let perl6path = system('perl6 -e "print join(q/,/,@*INC)"')
+ else
+ let perl6path = system("perl6 -e 'print join(q/,/,@*INC)'")
+ endif
+ let perl6path = substitute(perl6path,',.$',',,','')
+ else
+ " If we can't call perl6 to get its path, just default to using the
+ " current directory and the directory of the current file.
+ let perl6path = ".,,"
+ endif
+endif
+
+let &l:path=perl6path
+"---------------------------------------------
+
+" Undo the stuff we changed.
+let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
+ \ " | unlet! b:browsefilter"
+
+" Restore the saved compatibility options.
+let &cpo = s:save_cpo
diff --git a/runtime/ftplugin/xs.vim b/runtime/ftplugin/xs.vim
index cf33182584..24df05d736 100644
--- a/runtime/ftplugin/xs.vim
+++ b/runtime/ftplugin/xs.vim
@@ -1,11 +1,12 @@
" Vim filetype plugin file
-" Language: XS (Perl extension interface language)
-" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2001 Sep 18
+" Language: XS (Perl extension interface language)
+" Maintainer: Andy Lester <andy@petdance.com>
+" URL: http://github.com/petdance/vim-perl
+" Last Change: 2009-08-14
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
- finish
+ finish
endif
" Just use the C plugin for now.
diff --git a/runtime/indent/perl.vim b/runtime/indent/perl.vim
index 0eb95e3afb..1fbc4ded9e 100644
--- a/runtime/indent/perl.vim
+++ b/runtime/indent/perl.vim
@@ -1,13 +1,12 @@
" Vim indent file
-" Language: Perl
-" Author: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
-" URL: http://rgarciasuarez.free.fr/vim/indent/perl.vim
-" Last Change: 2010 Jul 28
+" Language: Perl 5
+" Author: Andy Lester <andy@petdance.com>
+" URL: http://github.com/petdance/vim-perl/tree/master
+" Last Change: June 3, 2009
" Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints)
" Artem Chuprina (play nice with folding)
-" Benjamin R. Haskell (fold syntax group fix)
" TODO things that are not or not properly indented (yet) :
" - Continued statements
@@ -22,7 +21,7 @@
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
- finish
+ finish
endif
let b:did_indent = 1
@@ -30,14 +29,14 @@ let b:did_indent = 1
let b:indent_use_syntax = has("syntax")
setlocal indentexpr=GetPerlIndent()
-setlocal indentkeys+=0=,0),0=or,0=and
+setlocal indentkeys+=0=,0),0],0=or,0=and
if !b:indent_use_syntax
- setlocal indentkeys+=0=EO
+ setlocal indentkeys+=0=EO
endif
" Only define the function once.
if exists("*GetPerlIndent")
- finish
+ finish
endif
let s:cpo_save = &cpo
@@ -45,137 +44,137 @@ set cpo-=C
function GetPerlIndent()
- " Get the line to be indented
- let cline = getline(v:lnum)
-
- " Indent POD markers to column 0
- if cline =~ '^\s*=\L\@!'
- return 0
- endif
-
- " Don't reindent coments on first column
- if cline =~ '^#.'
- return 0
- endif
-
- " Get current syntax item at the line's first char
- let csynid = ''
- if b:indent_use_syntax
- let csynid = synIDattr(synID(v:lnum,1,0),"name")
- endif
-
- " Don't reindent POD and heredocs
- if csynid == "perlPOD" || csynid == "perlHereDoc" || csynid =~ "^pod"
- return indent(v:lnum)
- endif
-
- " Indent end-of-heredocs markers to column 0
- if b:indent_use_syntax
- " Assumes that an end-of-heredoc marker matches \I\i* to avoid
- " confusion with other types of strings
- if csynid == "perlStringStartEnd" && cline =~ '^\I\i*$'
- return 0
+ " Get the line to be indented
+ let cline = getline(v:lnum)
+
+ " Indent POD markers to column 0
+ if cline =~ '^\s*=\L\@!'
+ return 0
+ endif
+
+ " Don't reindent coments on first column
+ if cline =~ '^#.'
+ return 0
+ endif
+
+ " Get current syntax item at the line's first char
+ let csynid = ''
+ if b:indent_use_syntax
+ let csynid = synIDattr(synID(v:lnum,1,0),"name")
endif
- else
- " Without syntax hints, assume that end-of-heredocs markers begin with EO
- if cline =~ '^\s*EO'
- return 0
+
+ " Don't reindent POD and heredocs
+ if csynid == "perlPOD" || csynid == "perlHereDoc" || csynid =~ "^pod"
+ return indent(v:lnum)
endif
- endif
-
- " Now get the indent of the previous perl line.
-
- " Find a non-blank line above the current line.
- let lnum = prevnonblank(v:lnum - 1)
- " Hit the start of the file, use zero indent.
- if lnum == 0
- return 0
- endif
- let line = getline(lnum)
- let ind = indent(lnum)
- " Skip heredocs, POD, and comments on 1st column
- if b:indent_use_syntax
- let skippin = 2
- while skippin
- let synid = synIDattr(synID(lnum,1,0),"name")
- if (synid == "perlStringStartEnd" && line =~ '^\I\i*$')
- \ || (skippin != 2 && synid == "perlPOD")
- \ || (skippin != 2 && synid == "perlHereDoc")
- \ || synid == "perlComment"
- \ || synid =~ "^pod"
- let lnum = prevnonblank(lnum - 1)
- if lnum == 0
- return 0
- endif
- let line = getline(lnum)
- let ind = indent(lnum)
- let skippin = 1
- else
- let skippin = 0
- endif
- endwhile
- else
- if line =~ "^EO"
- let lnum = search("<<[\"']\\=EO", "bW")
- let line = getline(lnum)
- let ind = indent(lnum)
+
+ " Indent end-of-heredocs markers to column 0
+ if b:indent_use_syntax
+ " Assumes that an end-of-heredoc marker matches \I\i* to avoid
+ " confusion with other types of strings
+ if csynid == "perlStringStartEnd" && cline =~ '^\I\i*$'
+ return 0
+ endif
+ else
+ " Without syntax hints, assume that end-of-heredocs markers begin with EO
+ if cline =~ '^\s*EO'
+ return 0
+ endif
endif
- endif
-
- " Indent blocks enclosed by {} or ()
- if b:indent_use_syntax
- " Find a real opening brace
- let bracepos = match(line, '[(){}]', matchend(line, '^\s*[)}]'))
- while bracepos != -1
- let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name")
- " If the brace is highlighted in one of those groups, indent it.
- " 'perlHereDoc' is here only to handle the case '&foo(<<EOF)'.
- if synid == ""
- \ || synid == "perlMatchStartEnd"
- \ || synid == "perlHereDoc"
- \ || synid =~ "^perlFiledescStatement"
- \ || synid =~ '^perl\(Sub\|Block\)Fold'
- let brace = strpart(line, bracepos, 1)
- if brace == '(' || brace == '{'
- let ind = ind + &sw
- else
- let ind = ind - &sw
- endif
- endif
- let bracepos = match(line, '[(){}]', bracepos + 1)
- endwhile
- let bracepos = matchend(cline, '^\s*[)}]')
- if bracepos != -1
- let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
- if synid == ""
- \ || synid == "perlMatchStartEnd"
- \ || synid =~ '^perl\(Sub\|Block\)Fold'
- let ind = ind - &sw
- endif
+
+ " Now get the indent of the previous perl line.
+
+ " Find a non-blank line above the current line.
+ let lnum = prevnonblank(v:lnum - 1)
+ " Hit the start of the file, use zero indent.
+ if lnum == 0
+ return 0
endif
- else
- if line =~ '[{(]\s*\(#[^)}]*\)\=$'
- let ind = ind + &sw
+ let line = getline(lnum)
+ let ind = indent(lnum)
+ " Skip heredocs, POD, and comments on 1st column
+ if b:indent_use_syntax
+ let skippin = 2
+ while skippin
+ let synid = synIDattr(synID(lnum,1,0),"name")
+ if (synid == "perlStringStartEnd" && line =~ '^\I\i*$')
+ \ || (skippin != 2 && synid == "perlPOD")
+ \ || (skippin != 2 && synid == "perlHereDoc")
+ \ || synid == "perlComment"
+ \ || synid =~ "^pod"
+ let lnum = prevnonblank(lnum - 1)
+ if lnum == 0
+ return 0
+ endif
+ let line = getline(lnum)
+ let ind = indent(lnum)
+ let skippin = 1
+ else
+ let skippin = 0
+ endif
+ endwhile
+ else
+ if line =~ "^EO"
+ let lnum = search("<<[\"']\\=EO", "bW")
+ let line = getline(lnum)
+ let ind = indent(lnum)
+ endif
endif
- if cline =~ '^\s*[)}]'
- let ind = ind - &sw
+
+ " Indent blocks enclosed by {}, (), or []
+ if b:indent_use_syntax
+ " Find a real opening brace
+ let bracepos = match(line, '[(){}\[\]]', matchend(line, '^\s*[)}\]]'))
+ while bracepos != -1
+ let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name")
+ " If the brace is highlighted in one of those groups, indent it.
+ " 'perlHereDoc' is here only to handle the case '&foo(<<EOF)'.
+ if synid == ""
+ \ || synid == "perlMatchStartEnd"
+ \ || synid == "perlHereDoc"
+ \ || synid =~ "^perlFiledescStatement"
+ \ || synid =~ '^perl\(Sub\|Block\)Fold'
+ let brace = strpart(line, bracepos, 1)
+ if brace == '(' || brace == '{' || brace == '['
+ let ind = ind + &sw
+ else
+ let ind = ind - &sw
+ endif
+ endif
+ let bracepos = match(line, '[(){}\[\]]', bracepos + 1)
+ endwhile
+ let bracepos = matchend(cline, '^\s*[)}\]]')
+ if bracepos != -1
+ let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
+ if synid == ""
+ \ || synid == "perlMatchStartEnd"
+ \ || synid =~ '^perl\(Sub\|Block\)Fold'
+ let ind = ind - &sw
+ endif
+ endif
+ else
+ if line =~ '[{\[(]\s*\(#[^)}\]]*\)\=$'
+ let ind = ind + &sw
+ endif
+ if cline =~ '^\s*[)}\]]'
+ let ind = ind - &sw
+ endif
endif
- endif
- " Indent lines that begin with 'or' or 'and'
- if cline =~ '^\s*\(or\|and\)\>'
- if line !~ '^\s*\(or\|and\)\>'
- let ind = ind + &sw
+ " Indent lines that begin with 'or' or 'and'
+ if cline =~ '^\s*\(or\|and\)\>'
+ if line !~ '^\s*\(or\|and\)\>'
+ let ind = ind + &sw
+ endif
+ elseif line =~ '^\s*\(or\|and\)\>'
+ let ind = ind - &sw
endif
- elseif line =~ '^\s*\(or\|and\)\>'
- let ind = ind - &sw
- endif
- return ind
+ return ind
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
-" vim:ts=8:sts=2:sw=2
+" vim:ts=8:sts=4:sw=4:expandtab:ft=vim
diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim
index 068609c9a5..0037f8fb1b 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: 12 Jun 2008
+" Last Change: 9 Aug 2010
-" This file covers mutt version 1.5.18 (and most of the mercurial tip)
+" This file covers mutt version 1.5.20 (and most of the mercurial tip)
" Included are also a few features from 1.4.2.1
" For version 5.x: Clear all syntax items
@@ -33,11 +33,12 @@ syn match muttrcEscape +[`|]+
syn match muttrcEscape +\\$+
" The variables takes the following arguments
-syn match muttrcString "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape
-syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction,muttrcShellString
-syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction
+"syn match muttrcString contained "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape
+syn region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString
+syn region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction
+syn match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL
-syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcSet
+syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand
syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1
syn match muttrcRXChars contained /[][|()][.*?+]*/
@@ -45,25 +46,47 @@ syn match muttrcRXChars contained /['"]^/ms=s+1
syn match muttrcRXChars contained /$['"]/me=e-1
syn match muttrcRXChars contained /\\/
" Why does muttrcRXString2 work with one \ when muttrcRXString requires two?
-syn region muttrcRXString contained start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars
-syn region muttrcRXString contained start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars
-syn region muttrcRXString2 contained start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars
-syn region muttrcRXString2 contained start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars
-
-syn region muttrcRXPat contained start=+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat
-syn region muttrcRXPat contained start=+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat
-syn match muttrcRXPat contained /[^-'"#!]\S\+\%(\s\|$\)/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat
+syn region muttrcRXString contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars
+syn region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars
+syn region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars
+" For some reason, skip refuses to match backslashes here...
+syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars
+syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars
+syn region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars
+syn region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars
+
+" these must be kept synchronized with muttrcRXString, but are intended for
+" muttrcRXHooks
+syn region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
+syn region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
+syn region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
+syn region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
+syn region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL
+syn match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL
+
+" these are exclusively for args lists (e.g. -rx pat pat pat ...)
+syn region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat
+syn region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat
+syn match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat
syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat
syn match muttrcSpecial +\(['"]\)!\1+
-" Numbers and Quadoptions may be surrounded by " or '
-syn match muttrcNumber /=\s*\d\+/lc=1
-syn match muttrcNumber /=\s*"\d\+"/lc=1
-syn match muttrcNumber /=\s*'\d\+'/lc=1
-syn match muttrcQuadopt +=\s*\%(ask-\)\=\%(yes\|no\)+lc=1
-syn match muttrcQuadopt +=\s*"\%(ask-\)\=\%(yes\|no\)"+lc=1
-syn match muttrcQuadopt +=\s*'\%(ask-\)\=\%(yes\|no\)'+lc=1
+syn match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
+syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString
+syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString
+syn match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
+syn match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
+syn match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable
+syn match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" Now catch some email addresses and headers (purified version from mail.vim)
syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
@@ -78,170 +101,173 @@ syn match muttrcKeyName contained "\\[trne]"
syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>"
syn match muttrcKeyName contained "<F[0-9]\+>"
-syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc
-syn keyword muttrcVarBool contained askcc attach_split auto_tag autoedit beep beep_new
-syn keyword muttrcVarBool contained bounce_delivered braille_friendly check_new check_mbox_size collapse_unread
-syn keyword muttrcVarBool contained confirmappend confirmcreate crypt_autoencrypt crypt_autopgp
-syn keyword muttrcVarBool contained crypt_autosign crypt_autosmime crypt_replyencrypt
-syn keyword muttrcVarBool contained crypt_replysign crypt_replysignencrypted crypt_timestamp
-syn keyword muttrcVarBool contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads
-syn keyword muttrcVarBool contained edit_hdrs edit_headers encode_from envelope_from fast_reply
-syn keyword muttrcVarBool contained fcc_attach fcc_clear followup_to force_name forw_decode
-syn keyword muttrcVarBool contained forw_decrypt forw_quote forward_decode forward_decrypt
-syn keyword muttrcVarBool contained forward_quote hdrs header help hidden_host hide_limited
-syn keyword muttrcVarBool contained hide_missing hide_thread_subject hide_top_limited
-syn keyword muttrcVarBool contained hide_top_missing ignore_linear_white_space ignore_list_reply_to imap_check_subscribed
-syn keyword muttrcVarBool contained imap_list_subscribed imap_passive imap_peek imap_servernoise
-syn keyword muttrcVarBool contained implicit_autoview include_onlyfirst keep_flagged
-syn keyword muttrcVarBool contained mailcap_sanitize maildir_header_cache_verify maildir_trash
-syn keyword muttrcVarBool contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key
-syn keyword muttrcVarBool contained metoo mh_purge mime_forward_decode narrow_tree pager_stop
-syn keyword muttrcVarBool contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt
-syn keyword muttrcVarBool contained pgp_autoinline pgp_autosign pgp_check_exit
-syn keyword muttrcVarBool contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids
-syn keyword muttrcVarBool contained pgp_replyencrypt pgp_replyinline pgp_replysign
-syn keyword muttrcVarBool contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable
-syn keyword muttrcVarBool contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split
-syn keyword muttrcVarBool contained pop_auth_try_all pop_last print_decode print_split
-syn keyword muttrcVarBool contained prompt_after read_only reply_self resolve reverse_alias
-syn keyword muttrcVarBool contained reverse_name reverse_realname rfc2047_parameters save_address
-syn keyword muttrcVarBool contained save_empty save_name score sig_dashes sig_on_top
-syn keyword muttrcVarBool contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key
-syn keyword muttrcVarBool contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2
-syn keyword muttrcVarBool contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts status_on_top
-syn keyword muttrcVarBool contained strict_mime strict_threads suspend text_flowed thorough_search
-syn keyword muttrcVarBool contained thread_received tilde uncollapse_jump use_8bitmime
-syn keyword muttrcVarBool contained use_domain use_envelope_from use_from use_idn use_ipv6
-syn keyword muttrcVarBool contained user_agent wait_key weed wrap_search write_bcc
-
-syn keyword muttrcVarBool contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc
-syn keyword muttrcVarBool contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new
-syn keyword muttrcVarBool contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread
-syn keyword muttrcVarBool contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp
-syn keyword muttrcVarBool contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt
-syn keyword muttrcVarBool contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp
-syn keyword muttrcVarBool contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads
-syn keyword muttrcVarBool contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply
-syn keyword muttrcVarBool contained nofcc_attach nofcc_clear nofollowup_to noforce_name noforw_decode
-syn keyword muttrcVarBool contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt
-syn keyword muttrcVarBool contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited
-syn keyword muttrcVarBool contained nohide_missing nohide_thread_subject nohide_top_limited
-syn keyword muttrcVarBool contained nohide_top_missing noignore_list_reply_to noimap_check_subscribed
-syn keyword muttrcVarBool contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise
-syn keyword muttrcVarBool contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged
-syn keyword muttrcVarBool contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash
-syn keyword muttrcVarBool contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key
-syn keyword muttrcVarBool contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop
-syn keyword muttrcVarBool contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt
-syn keyword muttrcVarBool contained nopgp_autoinline nopgp_autosign nopgp_check_exit
-syn keyword muttrcVarBool contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids
-syn keyword muttrcVarBool contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign
-syn keyword muttrcVarBool contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable
-syn keyword muttrcVarBool contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split
-syn keyword muttrcVarBool contained nopop_auth_try_all nopop_last noprint_decode noprint_split
-syn keyword muttrcVarBool contained noprompt_after noread_only noreply_self noresolve noreverse_alias
-syn keyword muttrcVarBool contained noreverse_name noreverse_realname norfc2047_parameters nosave_address
-syn keyword muttrcVarBool contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top
-syn keyword muttrcVarBool contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key
-syn keyword muttrcVarBool contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2
-syn keyword muttrcVarBool contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top
-syn keyword muttrcVarBool contained nostrict_threads nosuspend notext_flowed nothorough_search
-syn keyword muttrcVarBool contained nothread_received notilde nouncollapse_jump nouse_8bitmime
-syn keyword muttrcVarBool contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6
-syn keyword muttrcVarBool contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc
-
-syn keyword muttrcVarBool contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc
-syn keyword muttrcVarBool contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new
-syn keyword muttrcVarBool contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread
-syn keyword muttrcVarBool contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp
-syn keyword muttrcVarBool contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt
-syn keyword muttrcVarBool contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp
-syn keyword muttrcVarBool contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads
-syn keyword muttrcVarBool contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply
-syn keyword muttrcVarBool contained invfcc_attach invfcc_clear invfollowup_to invforce_name invforw_decode
-syn keyword muttrcVarBool contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt
-syn keyword muttrcVarBool contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited
-syn keyword muttrcVarBool contained invhide_missing invhide_thread_subject invhide_top_limited
-syn keyword muttrcVarBool contained invhide_top_missing invignore_list_reply_to invimap_check_subscribed
-syn keyword muttrcVarBool contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise
-syn keyword muttrcVarBool contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged
-syn keyword muttrcVarBool contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash
-syn keyword muttrcVarBool contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key
-syn keyword muttrcVarBool contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop
-syn keyword muttrcVarBool contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt
-syn keyword muttrcVarBool contained invpgp_autoinline invpgp_autosign invpgp_check_exit
-syn keyword muttrcVarBool contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids
-syn keyword muttrcVarBool contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign
-syn keyword muttrcVarBool contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable
-syn keyword muttrcVarBool contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split
-syn keyword muttrcVarBool contained invpop_auth_try_all invpop_last invprint_decode invprint_split
-syn keyword muttrcVarBool contained invprompt_after invread_only invreply_self invresolve invreverse_alias
-syn keyword muttrcVarBool contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address
-syn keyword muttrcVarBool contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top
-syn keyword muttrcVarBool contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key
-syn keyword muttrcVarBool contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2
-syn keyword muttrcVarBool contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top
-syn keyword muttrcVarBool contained invstrict_threads invsuspend invtext_flowed invthorough_search
-syn keyword muttrcVarBool contained invthread_received invtilde invuncollapse_jump invuse_8bitmime
-syn keyword muttrcVarBool contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6
-syn keyword muttrcVarBool contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc
-
-syn keyword muttrcVarQuad contained abort_nosubject abort_unmodified bounce copy
-syn keyword muttrcVarQuad contained crypt_verify_sig delete forward_edit honor_followup_to
-syn keyword muttrcVarQuad contained include mime_forward mime_forward_rest mime_fwd move
-syn keyword muttrcVarQuad contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect
-syn keyword muttrcVarQuad contained postpone print quit recall reply_to ssl_starttls
-
-syn keyword muttrcVarQuad contained noabort_nosubject noabort_unmodified nobounce nocopy
-syn keyword muttrcVarQuad contained nocrypt_verify_sig nodelete noforward_edit nohonor_followup_to
-syn keyword muttrcVarQuad contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove
-syn keyword muttrcVarQuad contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect
-syn keyword muttrcVarQuad contained nopostpone noprint noquit norecall noreply_to nossl_starttls
-
-syn keyword muttrcVarQuad contained invabort_nosubject invabort_unmodified invbounce invcopy
-syn keyword muttrcVarQuad contained invcrypt_verify_sig invdelete invforward_edit invhonor_followup_to
-syn keyword muttrcVarQuad contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove
-syn keyword muttrcVarQuad contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect
-syn keyword muttrcVarQuad contained invpostpone invprint invquit invrecall invreply_to invssl_starttls
-
-syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_check menu_context net_inc
-syn keyword muttrcVarNum contained pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc
-syn keyword muttrcVarNum contained save_history score_threshold_delete score_threshold_flag
-syn keyword muttrcVarNum contained score_threshold_read sendmail_wait sleep_time smime_timeout
-syn keyword muttrcVarNum contained ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin write_inc
+syn keyword muttrcVarBool skipwhite contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split auto_tag autoedit beep beep_new nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained bounce_delivered braille_friendly check_new check_mbox_size nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained collapse_unread confirmappend confirmcreate crypt_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained crypt_autopgp crypt_autosign crypt_autosmime crypt_replyencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained crypt_replysign crypt_replysignencrypted crypt_timestamp nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained edit_hdrs edit_headers encode_from envelope_from fast_reply nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained fcc_clear followup_to force_name forw_decode nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained forw_decrypt forw_quote forward_decode forward_decrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained forward_quote hdrs header help hidden_host hide_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained hide_missing hide_thread_subject hide_top_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained hide_top_missing honor_disposition ignore_linear_white_space ignore_list_reply_to imap_check_subscribed nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained imap_list_subscribed imap_passive imap_peek imap_servernoise nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained implicit_autoview include_onlyfirst keep_flagged nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained mailcap_sanitize maildir_header_cache_verify maildir_trash nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained metoo mh_purge mime_forward_decode narrow_tree pager_stop nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained pgp_autoinline pgp_autosign pgp_check_exit nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained pgp_replyencrypt pgp_replyinline pgp_replysign nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+syn keyword muttrcVarBool skipwhite contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split nextgroup=muttrcSetBoolAssignment,muttrcVPre