diff options
-rw-r--r-- | runtime/doc/autocmd.txt | 12 | ||||
-rw-r--r-- | runtime/doc/cmdline.txt | 4 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 4 | ||||
-rw-r--r-- | runtime/doc/motion.txt | 5 | ||||
-rw-r--r-- | runtime/doc/options.txt | 6 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 2 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 33 | ||||
-rw-r--r-- | runtime/doc/tags | 5 | ||||
-rw-r--r-- | runtime/doc/term.txt | 4 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 55 | ||||
-rw-r--r-- | runtime/filetype.vim | 21 | ||||
-rw-r--r-- | runtime/syntax/asciidoc.vim | 183 | ||||
-rw-r--r-- | runtime/syntax/c.vim | 83 | ||||
-rw-r--r-- | runtime/syntax/cpp.vim | 18 | ||||
-rw-r--r-- | runtime/syntax/debchangelog.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/debcontrol.vim | 9 | ||||
-rw-r--r-- | runtime/syntax/debsources.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/dts.vim | 4 | ||||
-rw-r--r-- | runtime/syntax/groovy.vim | 13 | ||||
-rw-r--r-- | runtime/syntax/sh.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/slice.vim | 1 | ||||
-rw-r--r-- | runtime/syntax/tex.vim | 342 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 217 | ||||
-rw-r--r-- | runtime/tutor/tutor.ja.euc | 44 | ||||
-rw-r--r-- | runtime/tutor/tutor.ja.sjis | 44 | ||||
-rw-r--r-- | runtime/tutor/tutor.ja.utf-8 | 44 |
26 files changed, 734 insertions, 433 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 2fae1e2fb6..a0d3b637d7 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.3. Last change: 2012 Sep 05 +*autocmd.txt* For Vim version 7.3. Last change: 2013 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -730,11 +730,11 @@ QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix moving to the first error. See |QuickFixCmdPost-example|. *QuitPre* -QuitPre When using `:quit`, before deciding whether it - closes the current window or quits Vim. Can - be used to close any non-essential window if - the current window is the last ordinary - window. +QuitPre When using `:quit`, `:wq` or `:qall`, before + deciding whether it closes the current window + or quits Vim. Can be used to close any + non-essential window if the current window is + the last ordinary window. *RemoteReply* RemoteReply When a reply from a Vim that functions as server was received |server2client()|. The diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index c3627d4090..4759702e49 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.3. Last change: 2013 Jan 17 +*cmdline.txt* For Vim version 7.3. Last change: 2013 Mar 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -964,7 +964,7 @@ for the file "$home" in the root directory. A few examples: \\$home file "\\", followed by expanded $home ============================================================================== -6. Command-line window *cmdline-window* *cmdwin* +7. Command-line window *cmdline-window* *cmdwin* *command-line-window* In the command-line window the command line can be edited just like editing text in any window. It is a special kind of window, because you cannot leave diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 1a7cbb9bd4..bc729d102c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2013 Feb 20 +*eval.txt* For Vim version 7.3. Last change: 2013 Mar 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2583,6 +2583,8 @@ delete({fname}) *delete()* which is 0 if the file was deleted successfully, and non-zero when the deletion failed. Use |remove()| to delete an item from a |List|. + To delete a line from the buffer use |:delete|. Use |:exe| + when the line number is in a variable. *did_filetype()* did_filetype() Returns non-zero when autocommands are being executed and the diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 522b717945..265d530721 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.3. Last change: 2012 Aug 04 +*motion.txt* For Vim version 7.3. Last change: 2013 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -104,13 +104,14 @@ strokes and has limited redo functionality. See the chapter on Visual mode |Visual-mode|. You can use a ":" command for a motion. For example "d:call FindEnd()". -But this can't be redone with "." if the command is more than one line. +But this can't be repeated with "." if the command is more than one line. This can be repeated: > d:call search("f")<CR> This cannot be repeated: > d:if 1<CR> call search("f")<CR> endif<CR> +Note that when using ":" any motion becomes characterwise exclusive. FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 143656a98f..ac3d394a16 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2013 Feb 28 +*options.txt* For Vim version 7.3. Last change: 2013 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -699,6 +699,10 @@ A jump table for the options with a short description can be found at |Q_op|. when the system locale is set to one of CJK locales. See Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11). + Vim may set this option automatically at startup time when Vim is + compiled with the |+termresponse| feature and if |t_u7| is set to the + sescape sequense to request cursor position report. + *'antialias'* *'anti'* *'noantialias'* *'noanti'* 'antialias' 'anti' boolean (default: off) global diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 4738be0c22..47e110cb01 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.3. Last change: 2011 May 10 +*quickfix.txt* For Vim version 7.3. Last change: 2013 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index b69753ad06..a32a468a1c 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2013 Mar 01 +*syntax.txt* For Vim version 7.3. Last change: 2013 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2928,6 +2928,35 @@ if any, is the text at the top of the screen supposed to be in?). Another cause of slow highlighting is due to syntax-driven folding; see |tex-folding| for a way around this. + *g:tex_fast* + +Finally, if syntax highlighting is still too slow, you may set > + + :let g:tex_fast= "" + +in your .vimrc. Used this way, the g:tex_fast variable causes the syntax +highlighting script to avoid defining any regions and associated +synchronization. The result will be much faster syntax highlighting; the +price: you will no longer have as much highlighting or any syntax-based +folding, and you will be missing syntax-based error checking. + +You may decide that some syntax is acceptable; you may use the following table +selectively to enable just some syntax highlighting: > + + b : allow bold and italic syntax + c : allow texComment syntax + m : allow texMatcher syntax (ie. {...} and [...]) + M : allow texMath syntax + p : allow parts, chapter, section, etc syntax + r : allow texRefZone syntax (nocite, bibliography, label, pageref, eqref) + s : allow superscript/subscript regions + S : allow texStyle syntax + v : allow verbatim syntax + V : allow texNewEnv and texNewCmd syntax +< +As an example, let g:tex_fast= "M" will allow math-associated highlighting +but suppress all the other region-based syntax highlighting. + *tex-morecommands* *tex-package* Tex: Want To Highlight More Commands? ~ @@ -3822,7 +3851,7 @@ s-{nr} start of the matched pattern plus {nr} chars to the left e end of the matched pattern e+{nr} end of the matched pattern plus {nr} chars to the right e-{nr} end of the matched pattern plus {nr} chars to the left -{nr} (for "lc" only): start matching {nr} chars to the left +{nr} (for "lc" only): start matching {nr} chars right of the start Examples: "ms=s+1", "hs=e-2", "lc=3". diff --git a/runtime/doc/tags b/runtime/doc/tags index 89ac4a9915..cb2364aec2 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -964,6 +964,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 't_te' term.txt /*'t_te'* 't_ti' term.txt /*'t_ti'* 't_ts' term.txt /*'t_ts'* +'t_u7' term.txt /*'t_u7'* 't_ue' term.txt /*'t_ue'* 't_us' term.txt /*'t_us'* 't_ut' term.txt /*'t_ut'* @@ -5182,6 +5183,7 @@ cpo-w options.txt /*cpo-w* cpo-x options.txt /*cpo-x* cpo-y options.txt /*cpo-y* cpo-{ options.txt /*cpo-{* +cpp.vim syntax.txt /*cpp.vim* crash-recovery recover.txt /*crash-recovery* creating-menus gui.txt /*creating-menus* credits intro.txt /*credits* @@ -5658,6 +5660,7 @@ ft-chill-syntax syntax.txt /*ft-chill-syntax* ft-clojure-indent indent.txt /*ft-clojure-indent* ft-cobol-syntax syntax.txt /*ft-cobol-syntax* ft-coldfusion-syntax syntax.txt /*ft-coldfusion-syntax* +ft-cpp-syntax syntax.txt /*ft-cpp-syntax* ft-csh-syntax syntax.txt /*ft-csh-syntax* ft-css-omni insert.txt /*ft-css-omni* ft-cweb-syntax syntax.txt /*ft-cweb-syntax* @@ -5958,6 +5961,7 @@ g:tar_readoptions pi_tar.txt /*g:tar_readoptions* g:tar_secure pi_tar.txt /*g:tar_secure* g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions* g:tex_conceal syntax.txt /*g:tex_conceal* +g:tex_fast syntax.txt /*g:tex_fast* g:tex_isk syntax.txt /*g:tex_isk* g:var eval.txt /*g:var* g:vimball_home pi_vimball.txt /*g:vimball_home* @@ -7975,6 +7979,7 @@ t_ti term.txt /*t_ti* t_tp version4.txt /*t_tp* t_ts term.txt /*t_ts* t_ts_old version4.txt /*t_ts_old* +t_u7 term.txt /*t_u7* t_ue term.txt /*t_ue* t_undo version4.txt /*t_undo* t_us term.txt /*t_us* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 362a18944b..de0313cfdf 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 7.3. Last change: 2011 Feb 16 +*term.txt* For Vim version 7.3. Last change: 2013 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -294,6 +294,8 @@ Added by Vim (there are no standard codes for these): |termcap-cursor-shape| t_RV request terminal version string (for xterm) *t_RV* *'t_RV'* |xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes| + t_u7 request cursor position (for xterm) *t_u7* *'t_u7'* + see |'ambiwidth'| KEY CODES Note: Use the <> form if possible diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 7fde2eda98..e8604d9af4 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2013 Mar 07 +*todo.txt* For Vim version 7.3. Last change: 2013 Mar 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -45,38 +45,16 @@ Memory leaks in Lua, uncovered by test 85. Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) -Patch to build with Ruby 2.0 and Ming@ 64. (Ken Takata, 2013 Feb 28) - Checking runtime scripts: Thilo Six, 2012 Jun 6. +Patch to keep serving the selection while waiting for a child process. +(Yukihiro Nakadaira, 2013 March 14) + GTK: problem with 'L' in 'guioptions' changing the window width. (Aaron Cornelius, 2012 Feb 6) -Patch for this problem: (David Bürgin (glts), 2013 Mar 5) -8 ":g//" gives "Pattern not found error" with E486. Should not use the - error number, it's not a regular error message. - -Patch to fix ":vimgrep //". (David Bürgin (glts), 2013 Mar 5) - -Updates for Debian runtime files. (James McCoy, 2013 Mar 3) -Also an update for debcontrol in another message. - Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3. -Patch for ":sort" not properly handling an empty search pattern when there is -no previous search pattern. (David Bürgin, 2013 Mar 4) - -system() breaks clipboard text. (Yukihiro Nakadaira, 2013 Feb 28) -Patch by Christian Brabandt, 2013 Mar 1. - -Patch for replace multi-byte character in multiple lines. (Yasuhiro Matsumoto, -2013 Feb 27) - -Patch to avoid register being changed when yanking. (Christian Brabandt, 2013 -Feb 26) - -Patch to trigger QuitPre in more situations. (Tatsuro Fujii, 2013 Mar 3) - The CompleteDone autocommand needs some info passed to it: - The word that was selected (empty if abandoned complete) - Type of completion: tag, omnifunc, user func. @@ -85,21 +63,17 @@ Win32: When a directory name contains an exclamation mark, completion doesn't complete the contents of the directory. No escaping for the "!"? (Jan Stocker, 2012 Jan 5) -Patch to fix wrong completion entry after using backspace. (reported by -Olivier Teuliere, fixed by Christian Brabandt, 2013 Feb 26) - -Patch to detect value of 'ambiwidth' from the termresponse. -(Hayaki Saito, 2013 Feb 11) - Matchparen does not update match when indenting. (Marc Aldorasi, 2013 Feb 9) Possible patch by Christian Brabandt, 2013 Feb 13. +Remarks about the more message and a patch to change behavior. (cptstubing, +2013 Mar 16) + +Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14) + Problem caused by patch 7.3.638: window->open does not update window correctly. Issue 91. -Patch for this bug: Setting local value of 'number' resets global value. -(Markus Heidelberg, 2013 Feb 17) - Patch to add argument to bufname() to only consider buffers in the current tab. (Alexey Radkov, 2013 Feb 8) Example in later email. Is this right? @@ -135,6 +109,9 @@ Brabandt, 2013 Feb 26. New syntax files for apt. (quidame, 2012 Sep 21) +v:register is not directly reset to " after a delete command that specifies a +register. It is reset after the next command. (Steve Vermeulen, 2013 Mar 16) + 'ff' is wrong for one-line file without EOL. (Issue 77) Patch for if_lua. (Luis Carvalho, 2012 Aug 26, update Aug 29, another Aug 30, @@ -178,6 +155,8 @@ Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27) Patch to use directX to draw text on Windows. Adds the 'directx' option. (Taro Muraoka, 2013 Jan 25) +Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17) + b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan 7) @@ -271,9 +250,6 @@ And one for gui_x11.txt. More recent version: https://retracile.net/wiki/VimBreakIndent Posted to vim-dev by Taylor Hedberg, 2011 Nov 25 -Problem with starting Visual block mode with :norm when 'virtualedit' is set. -(David glts, 2012 Jun 5) - ":cd" doesn't work when current directory path contains "**". finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) Requires a rewrite of the file_file_in_path code. @@ -286,9 +262,6 @@ Update for vim2html.pl. (Tyru, 2013 Feb 22) Issue 48: foldopen error can't be caught by try/catch -"dg_" deletes including the last character, "d:normal! g_" doesn't. -(Nomen Nescio, 2012 Jun 27) - Patch to sort functions starting with '<' after others. Omit dict functions, they can't be called. (Yasuhiro Matsumoto, 2011 Oct 11) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index aee617cbeb..b0387cfc23 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: 2013 Feb 28 +" Last Change: 2013 Mar 16 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -139,6 +139,9 @@ au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch " ART*Enterprise (formerly ART-IM) au BufNewFile,BufRead *.art setf art +" AsciiDoc +au BufNewFile,BufRead *.asciidoc setf asciidoc + " ASN.1 au BufNewFile,BufRead *.asn,*.asn1 setf asn @@ -749,12 +752,12 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom " Git -au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit -au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit +au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit +au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig au BufNewFile,BufRead *.git/modules/**/COMMIT_EDITMSG setf gitcommit -au BufNewFile,BufRead *.git/modules/**/config setf gitconfig -au BufNewFile,BufRead git-rebase-todo setf gitrebase +au BufNewFile,BufRead *.git/modules/**/config setf gitconfig +au BufNewFile,BufRead git-rebase-todo setf gitrebase au BufNewFile,BufRead .msg.[0-9]* \ if getline(1) =~ '^From.*# This line is ignored.$' | \ setf gitsendemail | @@ -781,7 +784,7 @@ au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash " Gitolite au BufNewFile,BufRead gitolite.conf setf gitolite au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') -au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl +au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl " Gnuplot scripts au BufNewFile,BufRead *.gpi setf gnuplot @@ -2412,10 +2415,10 @@ endfunc au BufNewFile,BufRead *.yaml,*.yml setf yaml " yum conf (close enough to dosini) -au BufNewFile,BufRead */etc/yum.conf setf dosini +au BufNewFile,BufRead */etc/yum.conf setf dosini " Zimbu -au BufNewFile,BufRead *.zu setf zimbu +au BufNewFile,BufRead *.zu setf zimbu " Zope " dtml (zope dynamic template markup language), pt (zope page template), @@ -2588,7 +2591,7 @@ au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') " yum conf (close enough to dosini) -au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') +au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') " Z-Shell script au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') diff --git a/runtime/syntax/asciidoc.vim b/runtime/syntax/asciidoc.vim new file mode 100644 index 0000000000..1303db7cf2 --- /dev/null +++ b/runtime/syntax/asciidoc.vim @@ -0,0 +1,183 @@ +" Vim syntax file +" Language: AsciiDoc +" Author: Stuart Rackham <srackham@gmail.com> (inspired by Felix +" Obenhuber's original asciidoc.vim script). +" URL: http://asciidoc.org/ +" Licence: GPL (http://www.gnu.org) +" Remarks: Vim 6 or greater +" Limitations: +" +" - Nested quoted text formatting is highlighted according to the outer +" format. +" - If a closing Example Block delimiter may be mistaken for a title +" underline. A workaround is to insert a blank line before the closing +" delimiter. +" - Lines within a paragraph starting with equals characters are +" highlighted as single-line titles. +" - Lines within a paragraph beginning with a period are highlighted as +" block titles. + + +if exists("b:current_syntax") + finish +endif + +syn clear +syn sync fromstart +syn sync linebreaks=100 + +" Run :help syn-priority to review syntax matching priority. +syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED +syn match asciidocBackslash /\\/ +syn region asciidocIdMarker start=/^\$Id:\s/ end=/\s\$$/ +syn match asciidocCallout /\\\@<!<\d\{1,2}>/ +syn match asciidocOpenBlockDelimiter /^--$/ +syn match asciidocLineBreak /[ \t]+$/ containedin=asciidocList +syn match asciidocRuler /^'\{3,}$/ +syn match asciidocPagebreak /^<\{3,}$/ +syn match asciidocEntityRef /\\\@<!&[#a-zA-Z]\S\{-};/ +syn region asciidocLiteralParagraph start=/\(\%^\|\_^\s*\n\)\@<=\s\+\S\+/ end=/\(^\(+\|--\)\?\s*$\)\@=/ contains=asciidocToDo +syn match asciidocURL /\\\@<!\<\(http\|https\|ftp\|file\|irc\):\/\/[^| \t]*\(\w\|\/\)/ +syn match asciidocEmail /[\\.:]\@<!\(\<\|<\)\w\(\w\|[.-]\)*@\(\w\|[.-]\)*\w>\?[0-9A-Za-z_]\@!/ +syn match asciidocAttributeRef /\\\@<!{\w\(\w\|[-,+]\)*\([=!@#$%?:].*\)\?}/ + +" As a damage control measure quoted patterns always terminate at a blank +" line (see 'Limitations' above). +syn match asciidocQuotedAttributeList /\\\@<!\[[a-zA-Z0-9_-][a-zA-Z0-9 _-]*\][+_'`#*]\@=/ +syn match asciidocQuotedSubscript /\\\@<!\~\S\_.\{-}\(\~\|\n\s*\n\)/ contains=asciidocEntityRef +syn match asciidocQuotedSuperscript /\\\@<!\^\S\_.\{-}\(\^\|\n\s*\n\)/ contains=asciidocEntityRef + +syn match asciidocQuotedMonospaced /\(^\|[| \t([.,=\]]\)\@<=+\([+ \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(+\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef +syn match asciidocQuotedMonospaced2 /\(^\|[| \t([.,=\]]\)\@<=`\([` \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(`\([| \t)[\],.?!;:=]\|$\)\@=\)/ +syn match asciidocQuotedUnconstrainedMonospaced /[\\+]\@<!++\S\_.\{-}\(++\|\n\s*\n\)/ contains=asciidocEntityRef + +syn match asciidocQuotedEmphasized /\(^\|[| \t([.,=\]]\)\@<=_\([_ \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(_\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef +syn match asciidocQuotedEmphasized2 /\(^\|[| \t([.,=\]]\)\@<='\([' \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\('\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef +syn match asciidocQuotedUnconstrainedEmphasized /\\\@<!__\S\_.\{-}\(__\|\n\s*\n\)/ contains=asciidocEntityRef + +syn match asciidocQuotedBold /\(^\|[| \t([.,=\]]\)\@<=\*\([* \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(\*\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef +syn match asciidocQuotedUnconstrainedBold /\\\@<!\*\*\S\_.\{-}\(\*\*\|\n\s*\n\)/ contains=asciidocEntityRef + +" Don't allow ` in single quoted (a kludge to stop confusion with `monospaced`). +syn match asciidocQuotedSingleQuoted /\(^\|[| \t([.,=\]]\)\@<=`\([` \n\t]\)\@!\([^`]\|\n\(\s*\n\)\@!\)\{-}[^` \t]\('\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef + +syn match asciidocQuotedDoubleQuoted /\(^\|[| \t([.,=\]]\)\@<=``\([` \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(''\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef + +syn match asciidocDoubleDollarPassthrough /\\\@<!\(^\|[^0-9a-zA-Z$]\)\@<=\$\$..\{-}\(\$\$\([^0-9a-zA-Z$]\|$\)\@=\|^$\)/ +syn match asciidocTriplePlusPassthrough /\\\@<!\(^\|[^0-9a-zA-Z$]\)\@<=+++..\{-}\(+++\([^0-9a-zA-Z$]\|$\)\@=\|^$\)/ + +syn match asciidocAdmonition /^\u\{3,15}:\(\s\+.*\)\@=/ + +syn region asciidocTable_OLD start=/^\([`.']\d*[-~_]*\)\+[-~_]\+\d*$/ end=/^$/ +syn match asciidocBlockTitle /^\.[^. \t].*[^-~_]$/ contains=asciidocQuoted.*,asciidocAttributeRef +syn match asciidocTitleUnderline /[-=~^+]\{2,}$/ transparent contained contains=NONE +syn match asciidocOneLineTitle /^=\{1,5}\s\+\S.*$/ contains=asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash +syn match asciidocTwoLineTitle /^[^. +/].*[^.]\n[-=~^+]\{3,}$/ contains=asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocTitleUnderline + +syn match asciidocAttributeList /^\[[^[ \t].*\]$/ +syn match asciidocQuoteBlockDelimiter /^_\{4,}$/ +syn match asciidocExampleBlockDelimiter /^=\{4,}$/ +syn match asciidocSidebarDelimiter /^*\{4,}$/ + +" See http://vimdoc.sourceforge.net/htmldoc/usr_44.html for excluding region +" contents from highlighting. +syn match asciidocTablePrefix /\(\S\@<!\(\([0-9.]\+\)\([*+]\)\)\?\([<\^>.]\{,3}\)\?\([a-z]\)\?\)\?|/ containedin=asciidocTableBlock contained +syn region asciidocTableBlock matchgroup=asciidocTableDelimiter start=/^|=\{3,}$/ end=/^|=\{3,}$/ keepend contains=ALL +syn match asciidocTablePrefix /\(\S\@<!\(\([0-9.]\+\)\([*+]\)\)\?\([<\^>.]\{,3}\)\?\([a-z]\)\?\)\?!/ containedin=asciidocTableBlock contained +syn region asciidocTableBlock2 matchgroup=asciidocTableDelimiter2 start=/^!=\{3,}$/ end=/^!=\{3,}$/ keepend contains=ALL + +syn match asciidocListContinuation /^+$/ +syn region asciidocLiteralBlock start=/^\.\{4,}$/ end=/^\.\{4,}$/ contains=asciidocCallout,asciidocToDo keepend +syn region asciidocListingBlock start=/^-\{4,}$/ end=/^-\{4,}$/ contains=asciidocCallout,asciidocToDo keepend +syn region asciidocCommentBlock start="^/\{4,}$" end="^/\{4,}$" contains=asciidocToDo +syn region asciidocPassthroughBlock start="^+\{4,}$" end="^+\{4,}$" + +" Allowing leading \w characters in the filter delimiter is to accomodate +" the pre version 8.2.7 syntax and may be removed in future releases. +syn region asciidocFilterBlock start=/^\w*\~\{4,}$/ end=/^\w*\~\{4,}$/ + +syn region asciidocMacroAttributes matchgroup=asciidocRefMacro start=/\\\@<!<<"\{-}\(\w\|-\|_\|:\|\.\)\+"\?,\?/ end=/\(>>\)\|^$/ contains=asciidocQuoted.* keepend +syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@<!\[\{2}\(\w\|-\|_\|:\|\.\)\+,\?/ end=/\]\{2}/ keepend +syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@<!\[\{3}\(\w\|-\|_\|:\|\.\)\+/ end=/\]\{3}/ keepend +syn region asciidocMacroAttributes matchgroup=asciidocMacro start=/[\\0-9a-zA-Z]\@<!\w\(\w\|-\)*:\S\{-}\[/ skip=/\\\]/ end=/\]\|^$/ contains=asciidocQuoted.*,asciidocAttributeRef,asciidocEntityRef keepend +" Highlight macro that starts with an attribute reference (a common idiom). +syn region asciidocMacroAttributes matchgroup=asciidocMacro start=/\(\\\@<!{\w\(\w\|[-,+]\)*\([=!@#$%?:].*\)\?}\)\@<=\S\{-}\[/ skip=/\\\]/ end=/\]\|^$/ contains=asciidocQuoted.*,asciidocAttributeRef keepend +syn region asciidocMacroAttributes matchgroup=asciidocIndexTerm start=/\\\@<!(\{2,3}/ end=/)\{2,3}/ contains=asciidocQuoted.*,asciidocAttributeRef keepend + +syn match asciidocCommentLine "^//\([^/].*\|\)$" contains=asciidocToDo + +syn region asciidocAttributeEntry start=/^:\w/ end=/:\(\s\|$\)/ oneline + +" Lists. +syn match asciidocListBullet /^\s*\zs\(-\|\*\{1,5}\)\ze\s/ +syn match asciidocListNumber /^\s*\zs\(\(\d\+\.\)\|\.\{1,5}\|\(\a\.\)\|\([ivxIVX]\+)\)\)\ze\s\+/ +syn region asciidocListLabel start=/^\s*/ end=/\(:\{2,4}\|;;\)$/ oneline contains=asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocToDo keepend +" DEPRECATED: Horizontal label. +syn region asciidocHLabel start=/^\s*/ end=/\(::\|;;\)\(\s\+\|\\$\)/ oneline contains=asciidocQuoted.*,asciidocMacroAttributes keepend +" Starts with any of the above. +syn region asciidocList start=/^\s*\(-\|\*\{1,5}\)\s/ start=/^\s*\(\(\d\+\.\)\|\.\{1,5}\|\(\a\.\)\|\([ivxIVX]\+)\)\)\s\+/ start=/.\+\(:\{2,4}\|;;\)$/ end=/\(^[=*]\{4,}$\)\@=/ end=/\(^\(+\|--\)\?\s*$\)\@=/ contains=asciidocList.\+,asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocCommentLine,asciidocAttributeList,asciidocToDo + +hi def link asciidocAdmonition Special +hi def link asciidocAnchorMacro Macro +hi def link asciidocAttributeEntry Special +hi def link asciidocAttributeList Special +hi def link asciidocAttributeMacro Macro +hi def link asciidocAttributeRef Special +hi def link asciidocBackslash Special +hi def link asciidocBlockTitle Title +hi def link asciidocCallout Label +hi def link asciidocCommentBlock Comment +hi def link asciidocCommentLine Comment +hi def link asciidocDoubleDollarPassthrough Special +hi def link asciidocEmail Macro +hi def link asciidocEntityRef Special +hi def link asciidocExampleBlockDelimiter Type +hi def link asciidocFilterBlock Type +hi def link asciidocHLabel Label +hi def link asciidocIdMarker Special +hi def link asciidocIndexTerm Macro +hi def link asciidocLineBreak Special +hi def link asciidocOpenBlockDelimiter Label +hi def link asciidocListBullet Label +hi def link asciidocListContinuation Label +hi def link asciidocListingBlock Identifier +hi def link asciidocListLabel Label +hi def link asciidocListNumber Label +hi def link asciidocLiteralBlock Identifier +hi def link asciidocLiteralParagraph Identifier +hi def link asciidocMacroAttributes Label +hi def link asciidocMacro Macro +hi def link asciidocOneLineTitle Title +hi def link asciidocPagebreak Type +hi def link asciidocPassthroughBlock Identifier +hi def link asciidocQuoteBlockDelimiter Type +hi def link asciidocQuotedAttributeList Special +hi def link asciidocQuotedBold Special +hi def link asciidocQuotedDoubleQuoted Label +hi def link asciidocQuotedEmphasized2 Type +hi def link asciidocQuotedEmphasized Type +hi def link asciidocQuotedMonospaced2 Identifier +hi def link asciidocQuotedMonospaced Identifier +hi def link asciidocQuotedSingleQuoted Label +hi def link asciidocQuotedSubscript Type +hi def link asciidocQuotedSuperscript Type +hi def link asciidocQuotedUnconstrainedBold Special +hi def link asciidocQuotedUnconstrainedEmphasized Type +hi def link asciidocQuotedUnconstrainedMonospaced Identifier +hi def link asciidocRefMacro Macro +hi def link asciidocRuler Type +hi def link asciidocSidebarDelimiter Type +hi def link asciidocTableBlock2 NONE +hi def link asciidocTableBlock NONE +hi def link asciidocTableDelimiter2 Label +hi def link asciidocTableDelimiter Label +hi def link asciidocTable_OLD Type +hi def link asciidocTablePrefix2 Label +hi def link asciidocTablePrefix Label +hi def link asciidocToDo Todo +hi def link asciidocTriplePlusPassthrough Special +hi def link asciidocTwoLineTitle Title +hi def link asciidocURL Macro +let b:current_syntax = "asciidoc" + +" vim: wrap et sw=2 sts=2: diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index c663c4eb5f..a171dfa2b6 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2013 Mar 07 +" Last Change: 2013 Mar 13 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -110,30 +110,57 @@ endif " But avoid matching <::. syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom if exists("c_no_curly_error") - syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell - " cCppParen: same as cParen but ends at end-of-line; used in cDefine - syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell - syn match cParenError display ")" - syn match cErrInParen display contained "^[{}]\|^<%\|^%>" + if &filetype ==# 'cpp' && !exists("cpp_no_cpp11") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "^^<%\|^%>" + else + syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "^[{}]\|^<%\|^%>" + endif elseif exists("c_no_bracket_error") - syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell - " cCppParen: same as cParen but ends at end-of-line; used in cDefine - syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell - syn match cParenError display ")" - syn match cErrInParen display contained "[{}]\|<%\|%>" + if &filetype ==# 'cpp' && !exists("cpp_no_cpp11") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "<%\|%>" + else + syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "[{}]\|<%\|%>" + endif else - syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell - " cCppParen: same as cParen but ends at end-of-line; used in cDefine - syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell - syn match cParenError display "[\])]" - syn match cErrInParen display contained "[\]{}]\|<%\|%>" - syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell + if &filetype ==# 'cpp' && !exists("cpp_no_cpp11") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell + syn match cParenError display "[\])]" + syn match cErrInParen display contained "<%\|%>" + syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup |