From d09acef44bcfa5871d6e9a2eea21c911dfbeef13 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 21 Sep 2012 14:54:30 +0200 Subject: Updated runtime files. --- runtime/doc/autocmd.txt | 5 +- runtime/doc/diff.txt | 12 +- runtime/doc/eval.txt | 13 +- runtime/doc/hebrew.txt | 2 +- runtime/doc/if_pyth.txt | 20 + runtime/doc/indent.txt | 4 +- runtime/doc/intro.txt | 4 +- runtime/doc/todo.txt | 75 +++- runtime/doc/usr_41.txt | 2 +- runtime/doc/visual.txt | 2 +- runtime/filetype.vim | 6 +- runtime/ftplugin/changelog.vim | 6 +- runtime/ftplugin/zimbu.vim | 49 +-- runtime/indent/zimbu.vim | 4 +- runtime/scripts.vim | 5 +- runtime/syntax/cl.vim | 136 +++---- runtime/syntax/css.vim | 362 ++++++++++++----- runtime/syntax/hgcommit.vim | 14 +- runtime/syntax/progress.vim | 116 +++--- runtime/tutor/tutor.vim | 10 +- runtime/tutor/tutor.zh_cn.utf-8 | 851 +++++++++++++++++++++++++++++++++++++++ runtime/tutor/tutor.zh_tw.utf-8 | 852 ++++++++++++++++++++++++++++++++++++++++ 22 files changed, 2261 insertions(+), 289 deletions(-) create mode 100644 runtime/tutor/tutor.zh_cn.utf-8 create mode 100644 runtime/tutor/tutor.zh_tw.utf-8 (limited to 'runtime') diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index a8bff07c56..32cad6764b 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 Jul 10 +*autocmd.txt* For Vim version 7.3. Last change: 2012 Sep 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -263,8 +263,10 @@ Name triggered by ~ Startup and exit |VimEnter| after doing all the startup stuff |GUIEnter| after starting the GUI successfully +|GUIFailed| after starting the GUI failed |TermResponse| after the terminal response to |t_RV| is received +|QuitPre| when using `:quit`, before deciding whether to quit |VimLeavePre| before exiting Vim, before writing the viminfo file |VimLeave| before exiting Vim, after writing the viminfo file @@ -312,6 +314,7 @@ Name triggered by ~ |SessionLoadPost| after loading a session file |MenuPopup| just before showing the popup menu +|CompleteDone| after Insert mode completion is done |User| to be used in combination with ":doautocmd" diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 0e03a57fe1..036dc5e136 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 7.3. Last change: 2012 Aug 08 +*diff.txt* For Vim version 7.3. Last change: 2012 Sep 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -86,16 +86,16 @@ diff mode. You could use a construct like this: > While already in Vim you can start diff mode in three ways. *E98* -:diffsplit {filename} *:diffs* *:diffsplit* +:diffs[plit] {filename} *:diffs* *:diffsplit* Open a new window on the file {filename}. The options are set as for "vimdiff" for the current and the newly opened window. Also see 'diffexpr'. *:difft* *:diffthis* -:diffthis Make the current window part of the diff windows. This sets +:difft[his] Make the current window part of the diff windows. This sets the options like for "vimdiff". -:diffpatch {patchfile} *E816* *:diffp* *:diffpatch* +:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch* Use the current buffer, patch it with the diff found in {patchfile} and open a buffer on the result. The options are set as for "vimdiff". @@ -123,9 +123,9 @@ Since the option values are remembered with the buffer, you can edit another file for a moment and come back to the same file and be in diff mode again. *:diffo* *:diffoff* -:diffoff Switch off diff mode for the current window. +:diffo[ff] Switch off diff mode for the current window. -:diffoff! Switch off diff mode for the current window and in all windows +:diffo[ff]! Switch off diff mode for the current window and in all windows in the current tab page where 'diff' is set. The ":diffoff" command resets the relevant options to their default value. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2ae65ff82b..12ea9c897e 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2012 Aug 02 +*eval.txt* For Vim version 7.3. Last change: 2012 Sep 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -759,7 +759,7 @@ of a |List| is different from the original |List|. When using "is" without a |List| or a |Dictionary| it is equivalent to using "equal", using "isnot" equivalent to using "not equal". Except that a different type means the values are different: "4 == '4'" is true, "4 is '4'" is false and "0 is []" is -false and not a error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match +false and not an error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match and ignore case. When comparing a String with a Number, the String is converted to a Number, @@ -4635,8 +4635,8 @@ pyeval({expr}) *pyeval()* Numbers and strings are returned as they are (strings are copied though). Lists are represented as Vim |List| type. - Dictionaries are represented as Vim |Dictionary| type with - keys converted to strings. + Dictionaries are represented as Vim |Dictionary| type, + non-string keys result in error. {only available when compiled with the |+python| feature} *E726* *E727* @@ -5253,8 +5253,9 @@ setreg({regname}, {value} [,{options}]) If {options} contains no register settings, then the default is to use character mode unless {value} ends in a . - Setting the '=' register is not possible. - Returns zero for success, non-zero for failure. + Setting the '=' register is not possible, but you can use > + :let @= = var_expr +< Returns zero for success, non-zero for failure. Examples: > :call setreg(v:register, @*) diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index 589d12c33f..8f264e67e2 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -93,7 +93,7 @@ Details This is also the keymap when 'keymap=hebrew' is set. The advantage of 'keymap' is that it works properly when using UTF8, e.g. it inserts the correct characters; 'hkmap' does not. The 'keymap' keyboard can also - insert niqud and te`amim. To see what those mappings are,look at the + insert niqud and te`amim. To see what those mappings are, look at the keymap file 'hebrew.vim' etc. diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 4bdacf66f2..92840d40ec 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -159,6 +159,26 @@ vim.bindeval(str) *python-bindeval* vimlist or vimdictionary python type that are connected to original list or dictionary. Thus modifications to these objects imply modifications of the original. + + Additionally, vimlist and vimdictionary type have read-write + `.locked` attribute that returns + Value Meaning ~ + zero Variable is not locked + vim.VAR_LOCKED Variable is locked, but can be unlocked + vim.VAR_FIXED Variable is locked and can’t be unlocked + integer constants. If variable is not fixed, you can do + `var.locked=True` to lock it and `var.locked=False` to unlock. + There is no recursive locking like |:lockvar|! does. There is also + no way to lock a specific key or check whether it is locked (in any + case these locks are ignored by anything except |:let|: |extend()| + does not care, neither does python interface). + + Vimdictionary type also supports `.scope` attribute which is one of + Value Meaning ~ + zero Dictionary is not a scope one + vim.VAR_DEF_SCOPE Function-local or global scope dictionary + vim.VAR_SCOPE Other scope dictionary + 2. if expression evaluates to a function reference, then it returns callable vimfunction object. Use self keyword argument to assign |self| object for dictionary functions. diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index ce02178d70..6a43896c00 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1,4 +1,4 @@ -*indent.txt* For Vim version 7.3. Last change: 2011 Sep 02 +*indent.txt* For Vim version 7.3. Last change: 2012 Aug 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -540,7 +540,7 @@ The examples below assume a 'shiftwidth' of 4. *cino-star* *N Vim searches for unclosed comments at most N lines away. This limits the time needed to search for the start of a comment. - If your /* */ comments stop indenting afer N lines this is the + If your /* */ comments stop indenting after N lines this is the value you will want to change. (default 70 lines). diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 6682ba6aa7..c643ab8dbf 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 7.3. Last change: 2011 May 15 +*intro.txt* For Vim version 7.3. Last change: 2012 Sep 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -394,6 +394,8 @@ CTRL-{char} {char} typed as a control character; that is, typing {char} *quotecommandquote* "command" A reference to a command that you can type is enclosed in double quotes. +`command` New style command, this distinguishes it from other + quoted text and strings. *key-notation* *key-codes* *keycodes* These names for keys are used in the documentation. They can also be used diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index e1efea17a5..e3e6bbbffc 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2012 Aug 15 +*todo.txt* For Vim version 7.3. Last change: 2012 Sep 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -36,6 +36,9 @@ not be repeated below, unless there is extra information. Go through more coverity reports. +Ruby problem, patch in issue 49. (Sep 19) +Also in email from Ondruch? + Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) GTK: problem with 'L' in 'guioptions' changing the window width. @@ -43,12 +46,35 @@ GTK: problem with 'L' in 'guioptions' changing the window width. Checking runtime scripts: Thilo Six, 2012 Jun 6. +Crash with 1023 byte directory name. (Danek Duvall, 2012 Sep 19) + +Patch for SGR mouse with older xterm. (Hayaki Saito, 2012 Sep 19) + +Patch for crash with an autocommand. (ZyX, 2012 Sep 6, second one) +Also patch for garbage, but use vim_strncpy() instead. + +Patch to fix crash on Win32 when setting 'encoding'. (Jiri Sedlak, 2012 Sep +12) + +Patch to update example using empty(). (ZyX, 2012 Sep 13) + Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3. +Updated French and Esperanto files. (Dominique Pelle, 2012 Aug 19) + +When showing diffs filler lines may be hidden at first. +Patch by Christian Brabandt, 2012 Sep 6. + +Patch for memory leaks on exception. (ZyX, 2012 Sep 9) + 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. +mouse_sgr is not ordered alphabetically in :version output. +Docs list mouse_urxvt as normal feature, should be big. (Hayaki Saito, 2012 +Aug 16) + ":gundo" command: global undo. Undoes changes spread over multiple files in the order they were made. Also ":gredo". Both with a count. Useful when tests fail after making changes and you forgot in which files. @@ -57,27 +83,45 @@ 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 for IME handling, adds 'imactivatefunc' and 'imstatusfunc' option. +(Yukihiro Nakadaira, 2012 Aug 16) +Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18) + Issue 54: document behavior of -complete, also expands arg. +Patch for if_lua. (Luis Carvalho, 2012 Aug 26, update Aug 29, another Aug 30, +then Sep 1) + Issue 72: 'autochdir' causes problems for :vimgrep. MS-Windows: Crash opening very long file name starting with "\\". (Christian Brock, 2012 Jun 29) +Win32: patch for current directory, "loading iof conv". (Ken Takata, 2012 Sep +15) + Syntax update problem in one buffer opened in two windows, bottom window is not correctly updated. (Paul Harris, 2012 Feb 27) +Patch to add assignments in cscope. (Uli Meis, Estabrooks, 2012 Sep 1) +Alternate patch by Gary Johnson, Sep 4. + Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4. Or use expand('')? -Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18) - Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers, 2012 Aug 4) +Patch for Tab behavior with 'conceal'. (Dominique Pelle, 2012 Mar 18) +Patch to test functionality of 'conceal' with tabs. (Simon Ruderich, 2012 Sep +5) Update with screencol() and screenrow() functions: Sep 7. + Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott, 2012 Aug 11) Disallow :new when BufUnload is being handled? +MS-Windows ACL support doesn't work well. Patch from Ken Takata, 2012 Aug 29. +Update Aug 31. + MS-Windows resizing problems: - Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun 20. Uses getWindowRect() instead of GetWindowPlacement() @@ -94,6 +138,9 @@ The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O. Suggestion for another map. (Philip Mat, 2012 Jun 18) But use "gi" instead of "a". Or use CTRL-\ CTRL-O. +Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012 +Aug 16) + URXVT: - will get stuck if byte sequence does not containe expected semicolon. - Use urxvt mouse support also in xterm. Explanations: @@ -108,17 +155,23 @@ Do give the prompt? Quit with an error? Patch for 'backupcopy' default behavior for symlinks on Windows. (David Pope, 2012 Mar 21, update Mar 31) +With fix for memory leak: Ken Takata, 2012 Aug 24 Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14) Patch for input method status. (Hirohito Higashi, 2012 Apr 18) +Patch to print the result of a :python command. (Maxim Philippov +, 2012 Aug 16) Update Aug 17. + Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17) Patch Sep 18. Patch for IME problems. Remove hacking code for old IM. (Yukihiro Nakadaira, 2012 Jul 20) +/[^\n] does match at a line break. Expected to do the same as /. + Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27) And one for gui_x11.txt. @@ -162,9 +215,6 @@ Patch to add ":py3do". (Lilydjwg, 2012 Apr 7) Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29) -When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May -31) - Updated syntax file for ssh_config, maintainer doesn't respond. (Leonard Ehrenfried, 2011 Sep 26) @@ -725,10 +775,6 @@ Support a 'systemencoding' option (for Unix). It specifies the encoding of file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian system when 'encoding' is "utf-8". -Win32: A --remote command that has a directory name starting with a ( doesn't -work, the backslash is removed, assuming that it escapes the (. (Valery -Kondakoff, 2009 May 13) - Win32 GUI: Changing manifest helps for dpi changes (Joe Castro, 2009 Mar 27) Win32 GUI: last message from startup doesn't show up when there is an echoerr @@ -914,6 +960,15 @@ escaping characters where the backslash is not removed later. Asked Chris for an alternate solution, also for src/ex_getln.c. This also fails when the file or directory name contains "%". (Thoml, 2008 July 7) +Using --remote-silent while the current directory has a # in the name does not +work, the # needs to be escaped. (Tramblay Bruno, 2012 Sep 15) + +When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May +31) + +Win32: A --remote command that has a directory name starting with a ( doesn't +work, the backslash is removed, assuming that it escapes the (. (Valery +Kondakoff, 2009 May 13) Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull, 2008 May 14) diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 77f7d1c350..1a4ae3d1b3 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1681,7 +1681,7 @@ in your plugin file! HEADER You will probably add new corrections to the plugin and soon have several -versions laying around. And when distributing this file, people will want to +versions lying around. And when distributing this file, people will want to know who wrote this wonderful plugin and where they can send remarks. Therefore, put a header at the top of your plugin: > diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 6d85075efa..6905c21803 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -66,7 +66,7 @@ position. lines as used for the last Visual operation, but at the current cursor position, multiplied by [count]. When the previous Visual operation was on a block both - the width and height of the block are multipiled by + the width and height of the block are multiplied by [count]. When there was no previous Visual operation [count] characters are selected. This is like moving the diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 45cf6309a4..6f6bc812ad 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2012 Aug 02 +" Last Change: 2012 Sep 06 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1772,6 +1772,10 @@ func! SetFileTypeSH(name) " Some .sh scripts contain #!/bin/tcsh. call SetFileTypeShell("tcsh") return + elseif a:name =~ '\' + " Some .sh scripts contain #!/bin/zsh. + call SetFileTypeShell("zsh") + return elseif a:name =~ '\' let b:is_kornshell = 1 if exists("b:is_bash") diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim index dafcbe20ff..ee83c79175 100644 --- a/runtime/ftplugin/changelog.vim +++ b/runtime/ftplugin/changelog.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: generic Changelog file " Maintainer: Nikolai Weibull -" Latest Revision: 2011-05-02 +" Latest Revision: 2012-08-23 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. @@ -106,10 +106,10 @@ if &filetype == 'changelog' function! s:passwd_field(line, field) let fields = split(a:line, ':', 1) - if len(fields) < field + if len(fields) < a:field return "" endif - return fields[field - 1] + return fields[a:field - 1] endfunction function! s:capitalize(word) diff --git a/runtime/ftplugin/zimbu.vim b/runtime/ftplugin/zimbu.vim index 85b57f464f..ff281202e0 100644 --- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar -" Last Change: 2012 May 18 +" Last Change: 2012 Sep 08 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -34,7 +34,7 @@ setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. -let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=}\|\' +let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\\)' let b:match_skip = 's:comment\|string\|zimbuchar' @@ -43,35 +43,22 @@ setlocal et sts=2 sw=2 " Does replace when a dot, space or closing brace is typed. func! GCUpperDot(what) - let col = col(".") - strlen(a:what) - if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' + if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' && v:char != ',' " no space or dot after the typed text let g:got_char = v:char return a:what endif - if col > 1 && getline('.')[col - 2] != ' ' - " no space before the typed text - let g:got_char = 999 - return a:what - endif - let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name") - if synName =~ 'Comment\|String\|zimbuCregion\|\ 1 && getline('.')[col - 2] != ' ' + " no space before the typed text + let g:got_char = 999 + return a:what + endif + let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name") + if synName =~ 'Comment\|String\|zimbuCregion\|\ alias GCUpperSpace("alias") iabbr arg GCUpperDot("arg") -iabbr bad GCUpper("bad") iabbr break GCUpper("break") iabbr case GCUpperSpace("case") iabbr catch GCUpperSpace("catch") iabbr check GCUpperDot("check") iabbr class GCUpperSpace("class") +iabbr interface GCUpperSpace("interface") +iabbr implements GCUpperSpace("implements") iabbr shared GCUpperSpace("shared") iabbr continue GCUpper("continue") iabbr default GCUpper("default") diff --git a/runtime/indent/zimbu.vim b/runtime/indent/zimbu.vim index 8df0eebe6f..9565b10843 100644 --- a/runtime/indent/zimbu.vim +++ b/runtime/indent/zimbu.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Zimbu " Maintainer: Bram Moolenaar -" Last Change: 2011 Jun 19 +" Last Change: 2012 Sep 08 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -101,7 +101,7 @@ func GetZimbuIndent(lnum) endwhile endif - if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|BITS\|MODULE\|SHARED\)\>' + if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>' let plindent += &sw endif if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)' diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 75275785fb..bb5a492512 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar -" Last change: 2010 Sep 22 +" Last change: 2012 Aug 30 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -198,7 +198,8 @@ else " - "=== ", line of "=", "---", "+++ " (SVK diff) " - "=== ", "--- ", "+++ " (bzr diff, common case) " - "=== (removed|added|renamed|modified)" (bzr diff, alternative) - elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)' + " - "# HG changeset patch" in first line (Mercurial export format) + elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)' \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ') \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ') \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ') diff --git a/runtime/syntax/cl.vim b/runtime/syntax/cl.vim index 343d2601d1..ccea2ee5ce 100644 --- a/runtime/syntax/cl.vim +++ b/runtime/syntax/cl.vim @@ -1,25 +1,25 @@ " Vim syntax file -" Language: CL -" (pronounced alphabetically, and NOT known as Clever) -" (CL was created by Multibase, http://www.mbase.com.au) +" Language: CL +" (pronounced alphabetically, and NOT known as Clever) +" (CL was created by Multibase, http://www.mbase.com.au) " Filename extensions: *.ent -" *.eni +" *.eni " Maintainer: Philip Uren Remove SPAX spam block -" Version: 4 -" Last Change: May 11 2012 +" Version: 5 +" Last Change: Aug 16 2012 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 - syntax clear + syntax clear elseif exists("b:current_syntax") - finish + finish endif if version >= 600 - setlocal iskeyword=@,48-57,_,-, + setlocal iskeyword=@,48-57,_,-, else - set iskeyword=@,48-57,_,-, + set iskeyword=@,48-57,_,-, endif syn case ignore @@ -27,87 +27,87 @@ syn case ignore syn sync lines=300 "If/else/elsif/endif and while/wend mismatch errors -syn match clifError "\" -syn match clifError "\" -syn match clifError "\" -syn match clifError "\" +syn match clifError "\" +syn match clifError "\" +syn match clifError "\" +syn match clifError "\" -syn match clSpaceError "\s\+$" +syn match clSpaceError "\s\+$" " If and while regions -syn region clLoop transparent matchgroup=clWhile start="\" matchgroup=clWhile end="\" contains=ALLBUT,clBreak,clProcedure -syn region clIf transparent matchgroup=clConditional start="\" matchgroup=clConditional end="\" contains=ALLBUT,clBreak,clProcedure +syn region clLoop transparent matchgroup=clWhile start="\" matchgroup=clWhile end="\" contains=ALLBUT,clBreak,clProcedure +syn region clIf transparent matchgroup=clConditional start="\" matchgroup=clConditional end="\" contains=ALLBUT,clBreak,clProcedure " Make those TODO notes and debugging stand out! -syn keyword clTodo contained TODO BUG DEBUG FIX -syn match clNeedsWork contained "NEED[S]*\s\s*WORK" -syn keyword clDebug contained debug +syn keyword clTodo contained TODO BUG DEBUG FIX +syn match clNeedsWork contained "NEED[S]*\s\s*WORK" +syn keyword clDebug contained debug -syn match clComment "#.*$" contains=clTodo,clNeedsWork -syn region clProcedure oneline start="^\s*[{}]" end="$" -syn match clInclude "^\s*include\s.*" +syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell +syn region clProcedure oneline start="^\s*[{}]" end="$" +syn match clInclude "^\s*include\s.*" " We don't put "debug" in the clSetOptions; " we contain it in clSet so we can make it stand out. -syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim -syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug +syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim +syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug -syn match clPreProc "^\s*#P.*" +syn match clPreProc "^\s*#P.*" -syn keyword clConditional else elsif -syn keyword clWhile continue endloop +syn keyword clConditional else elsif +syn keyword clWhile continue endloop " 'break' needs to be a region so we can sync on it above. -syn region clBreak oneline start="^\s*break" end="$" +syn region clBreak oneline start="^\s*break" end="$" -syn match clOperator "[!;|)(:.><+*=-]" +syn match clOperator "[!;|)(:.><+*=-]" -syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" -syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ -syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ +syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell +syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell -syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH +syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH -syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match +syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match -syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do +syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_cl_syntax_inits") - if version < 508 - let did_cl_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink clifError Error - HiLink clSpaceError Error - HiLink clWhile Repeat - HiLink clConditional Conditional - HiLink clDebug Debug - HiLink clNeedsWork Todo - HiLink clTodo Todo - HiLink clComment Comment - HiLink clProcedure Procedure - HiLink clBreak Procedure - HiLink clInclude Include - HiLink clSetOption Statement - HiLink clSet Identifier - HiLink clPreProc PreProc - HiLink clOperator Operator - HiLink clNumber Number - HiLink clString String - HiLink clQuote Delimiter - HiLink clReserved Identifier - HiLink clFunction Function - HiLink clStatement Statement - - delcommand HiLink +if version >= 508 || !exists("did_cl_syntax_inits") + if version < 508 + let did_cl_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink clifError Error + HiLink clSpaceError Error + HiLink clWhile Repeat + HiLink clConditional Conditional + HiLink clDebug Debug + HiLink clNeedsWork Todo + HiLink clTodo Todo + HiLink clComment Comment + HiLink clProcedure Procedure + HiLink clBreak Procedure + HiLink clInclude Include + HiLink clSetOption Statement + HiLink clSet Identifier + HiLink clPreProc PreProc + HiLink clOperator Operator + HiLink clNumber Number + HiLink clString String + HiLink clQuote Delimiter + HiLink clReserved Identifier + HiLink clFunction Function + HiLink clStatement Statement + + delcommand HiLink endif let b:current_syntax = "cl" -" vim: ts=8 sw=4 +" vim: ts=8 sw=8 diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index c2c83570ab..324dce3cc8 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -1,10 +1,11 @@ " Vim syntax file -" Language: Cascading Style Sheets -" Maintainer: Claudio Fleiner -" URL: http://www.fleiner.com/vim/syntax/css.vim -" Last Change: 2011 Dec 14 -" CSS2 by Nikolai Weibull -" Full CSS2, HTML4 support by Yeti +" Language: Cascading Style Sheets +" Previous Contributor List: +" Claudio Fleiner (Maintainer) +" Yeti (Add full CSS2, HTML4 support) +" Nikolai Weibull (Add CSS2 support) +" Maintainer: Jules Wang +" Last Change: 2012 Aug 21 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -19,6 +20,7 @@ endif syn case ignore +" All HTML4 tags syn keyword cssTagName abbr acronym address applet area a b base syn keyword cssTagName basefont bdo big blockquote body br button syn keyword cssTagName caption center cite code col colgroup dd del @@ -27,32 +29,51 @@ syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i syn keyword cssTagName iframe img input ins isindex kbd label legend li syn keyword cssTagName link map menu meta noframes noscript ol optgroup syn keyword cssTagName option p param pre q s samp script select small -syn keyword cssTagName span strike strong style sub sup tbody td +syn keyword cssTagName span strike strong style sub sup table tbody td syn keyword cssTagName textarea tfoot th thead title tr tt ul u var -syn match cssTagName "\" -syn match cssTagName "\*" +syn keyword cssTagName object -syn match cssTagName "@page\>" nextgroup=cssDefinition +" HTML5 new tags 5*6=30 +syn keyword cssTagName article aside audio bdi canvas command +syn keyword cssTagName datalist details embed figcaption figure footer +syn keyword cssTagName header hgroup keygen mark meter nav +syn keyword cssTagName output progress rt rp ruby section +syn keyword cssTagName source summary time track video wbr + +" Tags not supported in HTML5 +syn keyword cssDeprecated acronym applet basefont big center dir +syn keyword cssDeprecated font frame frameset noframes strike tt -syn match cssSelectorOp "[+>.]" -syn match cssSelectorOp2 "[~|]\?=" contained +"syn match cssTagName "\" +syn match cssTagName "\*" + +" selectors +syn match cssSelectorOp "[,>+]" +syn match cssSelectorOp2 "[~|^$*]\?=" contained +" FIXME: add HTML5 attribute syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ +" .class and #id +syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" + try syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*" catch /^.*/ syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*" endtry +syn match cssTagName "@page\>" nextgroup=cssDefinition +" FIXME: use cssVendor here +syn match cssTagName "@\(-\(webkit\|moz\|o\|ms\)-\)\=keyframes\>" nextgroup=cssDefinition syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl -syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl +"syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier syn match cssValueInteger contained "[-+]\=\d\+" syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" -syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)" +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\)" syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)" syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)" syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)" @@ -73,20 +94,78 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na syn case match syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background syn case ignore + +syn match cssImportant contained "!\s*important\>" + syn match cssColor contained "\" syn match cssColor contained "\" syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" -"syn match cssColor contained "\" - -syn keyword cssCommonAttr contained auto none inherit +syn region cssURL contained matchgroup=cssFunctionName start="\" + + +syn keyword cssAnimationAttr contained infinite alternate paused running +" bugfix: escape linear-gradient +syn match cssAnimationAttr contained "\" +syn match cssAnimationAttr contained "\" + +syn match cssBackgroundProp contained "\" +syn keyword cssBackgroundAttr contained center fixed over contain +syn match cssBackgroundAttr contained "\" +syn match cssBackgroundAttr contained "\" +syn match cssBackgroundAttr contained "\<\(border\|content\|padding\)-box\>" + + +syn match cssBorderOutlineProp contained "\" +syn match cssBorderOutlineProp contained "\" +syn match cssBorderOutlineProp contained "\" +syn match cssBorderOutlineProp contained "\" +syn match cssBorderOutlineProp contained "\" +syn keyword cssBorderOutlineAttr contained thin thick medium +syn keyword cssBorderOutlineAttr contained dotted dashed solid double groove ridge inset outset +syn keyword cssBorderOutlineAttr contained hidden visible scroll collapse +syn keyword cssBorderOutlineAttr contained stretch round + + +syn match cssBoxProp contained "\" +syn match cssBoxProp contained "\" +syn keyword cssBoxAttr contained visible hidden scroll auto +syn match cssBoxAttr contained "\" + +syn keyword cssColorProp contained opacity +syn match cssColorProp contained "\" +syn match cssColorProp contained "\" + + +syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>" +syn keyword cssDimensionProp contained height +syn keyword cssDimensionProp contained width + +" shadow and sizing are in other property groups +syn match cssFlexibleBoxProp contained "\" +syn keyword cssFlexibleBoxAttr contained start end center baseline stretch +syn keyword cssFlexibleBoxAttr contained normal reverse +syn keyword cssFlexibleBoxAttr contained single mulitple +syn keyword cssFlexibleBoxAttr contained horizontal +" bugfix: escape vertial-align +syn match cssFlexibleBoxAttr contained "\" +syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>" + + syn match cssFontProp contained "\" syn match cssFontAttr contained "\<\(sans-\)\=\" syn match cssFontAttr contained "\" @@ -95,67 +174,92 @@ syn match cssFontAttr contained "\" syn match cssFontAttr contained "\" syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>" syn keyword cssFontAttr contained cursive fantasy monospace italic oblique -syn keyword cssFontAttr contained bold bolder lighter larger smaller -syn keyword cssFontAttr contained icon menu -syn match cssFontAttr contained "\" -syn keyword cssFontAttr contained large smaller larger -syn keyword cssFontAttr contained narrower wider - -syn keyword cssColorProp contained color -syn match cssColorProp contained "\" -syn keyword cssColorAttr contained center scroll fixed -syn match cssColorAttr contained "\" -syn match cssColorAttr contained "\" +syn keyword cssFontAttr contained bold bolder light lighter larger smaller +syn keyword cssFontAttr contained icon menu caption +syn keyword cssFontAttr contained large smaller larger narrower wider +syn keyword cssFontAttr contained Courier Arial Georgia Times -syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" -syn match cssTextAttr contained "\" -syn match cssTextAttr contained "\" -syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" -syn keyword cssTextAttr contained underline overline blink sub super middle -syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super - -syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>" -syn match cssBoxProp contained "\" -syn match cssBoxProp contained "\<\(width\|z-index\)\>" -syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>" -syn keyword cssBoxProp contained width height float clear overflow clip visibility -syn keyword cssBoxAttr contained thin thick both -syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset -syn keyword cssBoxAttr contained hidden visible scroll collapse - -syn keyword cssGeneratedContentProp contained content quotes + +syn keyword cssGeneratedContentProp contained content quotes crop syn match cssGeneratedContentProp contained "\" -syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentProp contained "\" syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" -syn match cssAuralAttr contained "\" -syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" -syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" -syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" -syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian -syn keyword cssGeneratedContentAttr contained inside outside -syn match cssPagingProp contained "\" -syn keyword cssPagingProp contained size marks inside orphans widows -syn keyword cssPagingAttr contained landscape portrait crop cross always avoid -syn keyword cssUIProp contained cursor -syn match cssUIProp contained "\" -syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>" -syn keyword cssUIAttr contained default crosshair pointer move wait help -syn keyword cssUIAttr contained thin thick -syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset -syn keyword cssUIAttr contained invert - -syn match cssRenderAttr contained "\" -syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>" -syn keyword cssRenderProp contained position top bottom direction -syn match cssRenderProp contained "\<\(left\|right\)\>" -syn keyword cssRenderAttr contained block inline compact -syn match cssRenderAttr contained "\" -syn keyword cssRenderAttr contained static relative absolute fixed -syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap -syn match cssRenderAttr contained "\" +syn match cssGridProp contained "\" + +syn match cssHyerlinkProp contained "\" + +syn match cssListProp contained "\" +syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" +syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" +syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" +syn keyword cssListAttr contained disc circle square hebrew armenian georgian +syn keyword cssListAttr contained inside outside + + +syn match cssMarginProp contained "\" + +syn match cssMultiColumnProp contained "\" + +syn match cssPaddingProp contained "\" + +syn keyword cssPositioningProp contained bottom clear clip display float left +syn keyword cssPositioningProp contained position right top visibility +syn match cssPositioningProp contained "\" +syn keyword cssPositioningAttr contained block inline compact +syn match cssPositioningAttr contained "\" +syn keyword cssPositioningAttr contained left right both +syn match cssPositioningAttr contained "\" +syn match cssPositioningAttr contained "\" +syn keyword cssPositioningAttr contained static relative absolute fixed + +syn match cssPrintProp contained "\" +syn keyword cssPrintProp contained orphans widows +syn keyword cssPrintAttr contained landscape portrait crop cross always avoid + +syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" +syn keyword cssTableAttr contained fixed collapse separate show hide once always + + +syn keyword cssTextProp contained color direction +syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" +syn keyword cssTextAttr contained ltr rtl embed nowrap +syn keyword cssTextAttr contained underline overline blink sub super middle +syn keyword cssTextAttr contained capitalize uppercase lowercase +syn keyword cssTextAttr contained center justify baseline sub super +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\<\(allow\|force\)-end\>" +syn keyword cssTextAttr contained start end adjacent +syn match cssTextAttr contained "\" +syn keyword cssTextAttr contained distribute kashida first last +syn keyword cssTextAttr contained clip ellipsis unrestricted suppress +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\" +syn keyword cssTextAttr contained hyphenate + + +syn match cssTransformProp contained "\" +syn match cssTransformProp contained "\" +syn match cssTransformProp contained "\" + +syn match cssTransitionProp contained "\" + +syn match cssUIProp contained "\" +syn match cssUIProp contained "\" +syn match cssUIProp contained "\" +syn keyword cssUIProp contained appearance icon resize +syn keyword cssUIAttr contained window button menu field syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>" syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>" @@ -171,30 +275,54 @@ syn keyword cssAuralAttr contained below level above higher syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>" syn keyword cssAuralAttr contained faster slower syn keyword cssAuralAttr contained male female child code digits continuous +syn match cssAuralAttr contained "\" + +" cursor +syn keyword cssUIProp contained cursor +syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>" +syn keyword cssUIAttr contained crosshair default help move pointer +syn keyword cssUIAttr contained progress wait + +" FIXME: I could not find them in reference +syn keyword cssUIAttr contained invert maker size zoom +syn match cssRenderAttr contained "\" +syn match cssRenderAttr contained "\" +syn match cssRenderAttr contained "\" +syn match cssRenderProp contained "\" +syn match cssRenderAttr contained "\" -syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>" -syn keyword cssTableAttr contained fixed collapse separate show hide once always " FIXME: This allows cssMediaBlock before the semicolon, which is wrong. syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType syn match cssBraces contained "[{}]" syn match cssError contained "{@<>" -syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape +syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition syn match cssBraceError "}" +" Pseudo class syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssPseudoClassId,cssUnicodeEscape -syn keyword cssPseudoClassId contained link visited active hover focus before after left right +syn keyword cssPseudoClassId link visited active hover focus before after left right lang syn match cssPseudoClassId contained "\" -syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline - +" FIXME: handle functions. +"syn region cssPseudoClassLang matchgroup=cssPseudoClassId start="lang(" end=")" +syn match cssPseudoClassId contained "\<\(last\|only\|nth\|nth-last\)-child\>" +syn match cssPseudoClassId contained "\<\(first\|last\|only\|nth\|nth-last\)-of-type\>" +syn keyword cssPseudoClassId root empty target enable disabled checked not invalid +syn match cssPseudoClassId contained "::\(-moz-\)\=selection" + +" Comment syn region cssComment start="/\*" end="\*/" contains=@Spell +syn region cssComment start="//" skip="\\$" end="$" keepend contains=@Spell syn match cssUnicodeEscape "\\\x\{1,6}\s\?" syn match cssSpecialCharQQ +\\"+ contained syn match cssSpecialCharQ +\\'+ contained syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ -syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" + +" Vendor Prefix +syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)" + if main_syntax == "css" syn sync minlines=10 @@ -212,31 +340,75 @@ if version >= 508 || !exists("did_css_syn_inits") endif HiLink cssComment Comment + HiLink cssVendor Comment HiLink cssTagName Statement + HiLink cssDeprecated Error HiLink cssSelectorOp Special HiLink cssSelectorOp2 Special - HiLink cssFontProp StorageClass - HiLink cssColorProp StorageClass - HiLink cssTextProp StorageClass + + HiLink cssAnimationProp StorageClass + HiLink cssBackgroundProp StorageClass + HiLink cssBorderOutlineProp StorageClass HiLink cssBoxProp StorageClass - HiLink cssRenderProp StorageClass - HiLink cssAuralProp StorageClass - HiLink cssRenderProp StorageClass + HiLink cssColorProp StorageClass + HiLink cssContentForPagedMediaProp StorageClass + HiLink cssDimensionProp StorageClass + HiLink cssFlexibleBoxProp StorageClass + HiLink cssFontProp StorageClass HiLink cssGeneratedContentProp StorageClass - HiLink cssPagingProp StorageClass + HiLink cssGridProp StorageClass + HiLink cssHyerlinkProp StorageClass + HiLink cssLineboxProp StorageClass + HiLink cssListProp StorageClass + HiLink cssMarginProp StorageClass + HiLink cssMarqueeProp StorageClass + HiLink cssMultiColumnProp StorageClass + HiLink cssPaddingProp StorageClass + HiLink cssPagedMediaProp StorageClass + HiLink cssPositioningProp StorageClass + HiLink cssPrintProp StorageClass + HiLink cssRubyProp StorageClass + HiLink cssSpeechProp StorageClass HiLink cssTableProp StorageClass + HiLink cssTextProp StorageClass + HiLink cssTransformProp StorageClass + HiLink cssTransitionProp StorageClass HiLink cssUIProp StorageClass - HiLink cssFontAttr Type - HiLink cssColorAttr Type - HiLink cssTextAttr Type + HiLink cssAuralProp StorageClass + HiLink cssRenderProp StorageClass + + HiLink cssAnimationAttr Type + HiLink cssBackgroundAttr Type + HiLink cssBorderOutlineAttr Type HiLink cssBoxAttr Type - HiLink cssRenderAttr Type - HiLink cssAuralAttr Type + HiLink cssColorAttr Type + HiLink cssContentForPagedMediaAttr Type + HiLink cssDimensionAttr Type + HiLink cssFlexibleBoxAttr Type + HiLink cssFontAttr Type HiLink cssGeneratedContentAttr Type - HiLink cssPagingAttr Type + HiLink cssGridAttr Type + HiLink cssHyerlinkAttr Type + HiLink cssLineboxAttr Type + HiLink cssListAttr Type + HiLink cssMarginAttr Type + HiLink cssMarqueeAttr Type + HiLink cssMultiColumnAttr Type + HiLink cssPaddingAttr Type + HiLink cssPagedMediaAttr Type + HiLink cssPositioningAttr Type + HiLink cssPrintAttr Type + HiLink cssRubyAttr Type + HiLink cssSpeechAttr Type HiLink cssTableAttr Type + HiLink cssTextAttr Type + HiLink cssTransformAttr Type + HiLink cssTransitionAttr Type HiLink cssUIAttr Type + HiLink cssAuralAttr Type + HiLink cssRenderAttr Type HiLink cssCommonAttr Type + HiLink cssPseudoClassId PreProc HiLink cssPseudoClassLang Constant HiLink cssValueLength Number diff --git a/runtime/syntax/hgcommit.vim b/runtime/syntax/hgcommit.vim index e4c8b6ed44..37fe9db8bf 100644 --- a/runtime/syntax/hgcommit.vim +++ b/runtime/syntax/hgcommit.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: hg (Mercurial) commit file " Maintainer: Ken Takata -" Last Change: 2012 Aug 2 +" Last Change: 2012 Aug 23 " Filenames: hg-editor-*.txt " License: VIM License " URL: https://github.com/k-takata/hg-vim @@ -10,12 +10,12 @@ if exists("b:current_syntax") finish endif -syn match hgcommitComment "^HG:.*$" -syn match hgcommitUser "^HG: user: \zs.*$" contained containedin=hgcommitComment -syn match hgcommitBranch "^HG: branch \zs.*$" contained containedin=hgcommitComment -syn match hgcommitAdded "^HG: \zsadded .*$" contained containedin=hgcommitComment -syn match hgcommitChanged "^HG: \zschanged .*$" contained containedin=hgcommitComment -syn match hgcommitRemoved "^HG: \zsremoved .*$" contained containedin=hgcommitComment +syn match hgcommitComment "^HG:.*$" contains=@NoSpell +syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment hi def link hgcommitComment Comment hi def link hgcommitUser String diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index 3ff7723453..190a0f381b 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -3,20 +3,20 @@ " Filename extensions: *.p (collides with Pascal), " *.i (collides with assembler) " *.w (collides with cweb) -" Maintainer: Philip Uren Remove SPAX spam block -" Contributors: Chris Ruprecht -" Philip Uren -" Mikhail Kuperblum -" John Florian -" Version: 11 -" Last Change: May 11 2012 +" Maintainer: Philip Uren Remove SPAX spam block +" Contributors: Chris Ruprecht +" Philip Uren +" Mikhail Kuperblum +" John Florian +" Version: 12 +" Last Change: Aug 16 2012 " For version 5.x: Clear all syntax item " For version 6.x: Quit when a syntax file was already loaded if version < 600 - syntax clear + syntax clear elseif exists("b:current_syntax") - finish + finish endif let s:cpo_save = &cpo @@ -34,7 +34,7 @@ set expandtab syn case ignore " Progress Blocks of code and mismatched "end." errors. -syn match ProgressEndError "\" +syn match ProgressEndError "\" syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\" matchgroup=ProgressDo end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressForBlock transparent matchgroup=ProgressFor start="\" matchgroup=ProgressFor end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\" matchgroup=ProgressRepeat end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction @@ -44,20 +44,20 @@ syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\ " and they could go in ProgressReserved, " but I found it more helpful to highlight them in a different color. syn keyword ProgressConditional if else then when otherwise -syn keyword ProgressFor each where +syn keyword ProgressFor each where " Make those TODO and debugging notes stand out! -syn keyword ProgressTodo contained TODO BUG FIX -syn keyword ProgressDebug contained DEBUG +syn keyword ProgressTodo contained TODO BUG FIX +syn keyword ProgressDebug contained DEBUG syn keyword ProgressDebug debugger " If you like to highlight the whole line of " the start and end of procedures " to make the whole block of code stand out: -syn match ProgressProcedure "^\s*procedure.*" -syn match ProgressProcedure "^\s*end\s\s*procedure.*" -syn match ProgressFunction "^\s*function.*" -syn match ProgressFunction "^\s*end\s\s*function.*" +syn match ProgressProcedure "^\s*procedure.*" +syn match ProgressProcedure "^\s*end\s\s*procedure.*" +syn match ProgressFunction "^\s*function.*" +syn match ProgressFunction "^\s*end\s\s*function.*" " ... otherwise use this: " syn keyword ProgressFunction procedure function @@ -99,14 +99,14 @@ syn keyword ProgressReserved window-maxim[ized] window-minim[ized] window-normal " Strings. Handles embedded quotes. " Note that, for some reason, Progress doesn't use the backslash, "\" " as the escape character; it uses tilde, "~". -syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+ -syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+ +syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+ contains=@Spell +syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+ contains=@Spell syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()" " syn match ProgressDelimiter "()" -syn match ProgressMatrixDelimiter "[][]" +syn match ProgressMatrixDelimiter "[][]" " If you prefer you can highlight the range: "syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]" @@ -114,7 +114,7 @@ syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>" syn match ProgressByte "\$[0-9a-fA-F]\+" " More values: Logicals, and Progress's unknown value, ?. -syn match ProgressNumber "?" +syn match ProgressNumber "?" syn keyword ProgressNumber true false yes no " If you don't like tabs: @@ -123,9 +123,9 @@ syn match ProgressShowTab "\t" " If you don't like white space on the end of lines, uncomment this: " syn match ProgressSpaceError "\s\+$" -syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug -syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment -syn region ProgressPreProc star