diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
commit | 446beb48d9795843c94860d7f62bdc7374aae1dd (patch) | |
tree | 20e64deaab382991a99d6d963e3ae22f13dba2d9 | |
parent | 1c2b2c12bb6883c2fbae239b99c8113ec546a855 (diff) |
Updated runtime files.
-rw-r--r-- | runtime/doc/change.txt | 29 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 9 | ||||
-rw-r--r-- | runtime/doc/fold.txt | 2 | ||||
-rw-r--r-- | runtime/doc/if_pyth.txt | 14 | ||||
-rw-r--r-- | runtime/doc/map.txt | 18 | ||||
-rw-r--r-- | runtime/doc/message.txt | 6 | ||||
-rw-r--r-- | runtime/doc/options.txt | 12 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 4 | ||||
-rw-r--r-- | runtime/doc/tags | 2 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 99 | ||||
-rw-r--r-- | runtime/ftplugin/changelog.vim | 11 | ||||
-rw-r--r-- | runtime/syntax/hostsaccess.vim | 27 | ||||
-rw-r--r-- | runtime/syntax/php.vim | 23 | ||||
-rw-r--r-- | runtime/syntax/readline.vim | 503 | ||||
-rw-r--r-- | runtime/syntax/sysctl.vim | 4 |
15 files changed, 514 insertions, 249 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 6e53111454..1c8c0eb0db 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.3. Last change: 2011 Feb 25 +*change.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -919,8 +919,8 @@ inside of strings can change! Also see 'softtabstop' option. > *:y* *:yank* *E850* :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the - "* or "+ registers is possible only in GUI versions or - when the |+xterm_clipboard| feature is included. + "* or "+ registers is possible only when the + |+clipboard| feature is included. :[range]y[ank] [x] {count} Yank {count} lines, starting with last line number @@ -1390,16 +1390,19 @@ before typing anything else on the new line. This will replace the middle-comment leader with the end-comment leader and apply any specified alignment, leaving just " */". There is no need to hit BackSpace first. +When there is a match with a middle part, but there also is a maching end part +which is longer, the end part is used. This makes a C style comment work +without requiring the middle part to end with a space. Here is an example of alignment flags at work to make a comment stand out -(kind of looks like a 1 too). Consider comment string > - sr:/***,m:**,ex2:******/ - - /*** - **<--right aligned from "r" flag - ** -offset 2 spaces from the "2" flag--->** - ******/ +(kind of looks like a 1 too). Consider comment string: > + :set comments=sr:/***,m:**,ex-2:******/ +< + /*** ~ + **<--right aligned from "r" flag ~ + ** ~ +offset 2 spaces for the "-2" flag--->** ~ + ******/ ~ In this case, the first comment was typed, then return was pressed 4 times, then "/" was pressed to end the comment. @@ -1417,8 +1420,8 @@ Reindenting using a different method like |gq| or |=| will not consult alignment flags either. The same behaviour can be defined in those other formatting options. One consideration is that 'cindent' has additional options for context based indenting of comments but cannot replicate many three piece -indent alignments. However, 'indentexpr' is has the ability to work better -with three piece comments. +indent alignments. However, 'indentexpr' has the ability to work better with +three piece comments. Other examples: > "b:*" Includes lines starting with "*", but not if the "*" is diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 8c464a85cb..295fe4a3c6 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2011 Mar 18 +*eval.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1545,7 +1545,9 @@ v:progname Contains the name (with path removed) with which Vim was *v:register* *register-variable* v:register The name of the register in effect for the current normal mode - command. If none is supplied it is the default register. + command. If none is supplied it is the default register '"', + unless 'clipboard' contains "unnamed" or "unnamedplus", then + it is '*' or '+'. Also see |getreg()| and |setreg()| *v:scrollstart* *scrollstart-variable* @@ -6222,7 +6224,8 @@ persistent_undo Compiled with support for persistent undo history. postscript Compiled with PostScript file printing. printer Compiled with |:hardcopy| support. profile Compiled with |:profile| support. -python Compiled with Python interface. +python Compiled with Python 2.x interface. |has-python| +python3 Compiled with Python 3.x interface. |has-python| qnx QNX version of Vim. quickfix Compiled with |quickfix| support. reltime Compiled with |reltime()| support. diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 24a8dcb617..4f279333fb 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -60,7 +60,7 @@ level form a fold, with the lines with a higher level forming a nested fold. The nesting of folds is limited with 'foldnestmax'. Some lines are ignored and get the fold level of the line above or below it, -whatever is the lowest. These are empty or white lines and lines starting +whichever is lower. These are empty or white lines and lines starting with a character in 'foldignore'. White space is skipped before checking for characters in 'foldignore'. For C use "#" to ignore preprocessor lines. diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 51f936e35d..43c435655e 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.3. Last change: 2010 Oct 20 +*if_pyth.txt* For Vim version 7.3. Last change: 2011 May 07 VIM REFERENCE MANUAL by Paul Moore @@ -377,6 +377,18 @@ To work around such problems there are these options: 3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This may crash Vim though. + *has-python* +You can test what Python version is available with: > + if has('python') + echo 'there is Pyton 2.x' + elseif has('python3') + echo 'there is Python 3.x' + endif + +Note however, that when Python 2 and 3 are both available and loaded +dynamically, these has() calls will try to load them. If only one can be +loaded at a time, just checking if Python 2 or 3 are available will prevent +the other one from being available. ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 29b9e9f35e..ec21d15ff0 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.3. Last change: 2011 Apr 13 +*map.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -480,9 +480,9 @@ You can create an empty {rhs} by typing nothing after a single CTRL-V (you have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc file. *<Nop>* -A easier way to get a mapping that doesn't produce anything, is to use "<Nop>" -for the {rhs}. This only works when the |<>| notation is enabled. For -example, to make sure that function key 8 does nothing at all: > +An easier way to get a mapping that doesn't produce anything, is to use +"<Nop>" for the {rhs}. This only works when the |<>| notation is enabled. +For example, to make sure that function key 8 does nothing at all: > :map <F8> <Nop> :map! <F8> <Nop> < @@ -495,7 +495,7 @@ scenario: > :set encoding=utf-8 The mapping for <M-C> is defined with the latin1 encoding, resulting in a 0xc3 byte. If you type the character á (0xe1 <M-a>) in UTF-8 encoding this is the -two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then, +two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or otherwise it would be impossible to type the á character. *<Leader>* *mapleader* @@ -1177,13 +1177,15 @@ reported if any are supplied). However, it is possible to specify that the command can take arguments, using the -nargs attribute. Valid cases are: -nargs=0 No arguments are allowed (the default) - -nargs=1 Exactly one argument is required - -nargs=* Any number of arguments are allowed (0, 1, or many) + -nargs=1 Exactly one argument is require, it includes spaces + -nargs=* Any number of arguments are allowed (0, 1, or many), + separated by white space -nargs=? 0 or 1 arguments are allowed -nargs=+ Arguments must be supplied, but any number are allowed Arguments are considered to be separated by (unescaped) spaces or tabs in this -context. +context, except when there is one argument, then the white space is part of +the argument. Note that arguments are used as text, not as expressions. Specifically, "s:var" will use the script-local variable in the script where the command was diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 2a5f0f589e..97c452502c 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 7.3. Last change: 2011 Jan 30 +*message.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -27,8 +27,8 @@ The "g<" command can be used to see the last page of previous command output. This is especially useful if you accidentally typed <Space> at the hit-enter prompt. You are then back at the hit-enter prompt and can then scroll further back. -Note: when you stopped the output with "q" at the more prompt only up to that -point will be displayed. +Note: If the output has been stopped with "q" at the more prompt, it will only +be displayed up to this point. The previous command output is cleared when another command produces output. If you are using translated messages, the first printed line tells who diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index a367e06b75..6ba21febed 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2011 Apr 15 +*options.txt* For Vim version 7.3. Last change: 2011 Apr 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -815,7 +815,7 @@ A jump table for the options with a short description can be found at |Q_op|. been set. *'background'* *'bg'* -'background' 'bg' string (default "dark" or "light") +'background' 'bg' string (default "dark" or "light", see below) global {not in Vi} When set to "dark", Vim will try to use colors that look good on a @@ -849,6 +849,12 @@ A jump table for the options with a short description can be found at |Q_op|. color). To get around this, force the GUI window to be opened by putting a ":gui" command in the .gvimrc file, before where the value of 'background' is used (e.g., before ":syntax on"). + + For MS-DOS, Windows and OS/2 the default is "dark". + For other systems "dark" is used when 'term' is "linux", + "screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark + background. Otherwise the default is "light". + Normally this option would be set in the .vimrc file. Possibly depending on the terminal name. Example: > :if &term == "pcterm" @@ -3094,7 +3100,7 @@ A jump table for the options with a short description can be found at |Q_op|. closed. Also for manually closed folds. With the default value of one a fold can only be closed if it takes up two or more screen lines. Set to zero to be able to close folds of just one screen line. - Note that this only has an effect of what is displayed. After using + Note that this only has an effect on what is displayed. After using "zc" to close a fold, which is displayed open because it's smaller than 'foldminlines', a following "zc" may close a containing fold. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index c30926715c..ff8243a899 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2011 Apr 06 +*syntax.txt* For Vim version 7.3. Last change: 2011 May 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1102,6 +1102,8 @@ your .vimrc: > FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax* FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com +NOTE: this site currently doesn't work, on Wikipedia is mentioned that +development stopped in 2009. Syntax highlighting is available for the most common elements of FlexWiki syntax. The associated ftplugin script sets some buffer-local options to make diff --git a/runtime/doc/tags b/runtime/doc/tags index bee39c1ac9..50a1d4db7c 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4234,6 +4234,7 @@ E847 syntax.txt /*E847* E848 syntax.txt /*E848* E849 syntax.txt /*E849* E85 options.txt /*E85* +E850 change.txt /*E850* E86 windows.txt /*E86* E87 windows.txt /*E87* E88 windows.txt /*E88* @@ -6057,6 +6058,7 @@ hangul hangulin.txt /*hangul* hangulin.txt hangulin.txt /*hangulin.txt* has() eval.txt /*has()* has-patch eval.txt /*has-patch* +has-python if_pyth.txt /*has-python* has_key() eval.txt /*has_key()* haskell.vim syntax.txt /*haskell.vim* haslocaldir() eval.txt /*haslocaldir()* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 3adc36cc20..b96f255336 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2011 Apr 28 +*todo.txt* For Vim version 7.3. Last change: 2011 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -32,30 +32,18 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. Go through more coverity reports. -Patch for behavior of :cwindow. (Ingo Karkat, 2011 Apr 15) - -Configure fix for finding exctags. (Hong Xu, 2011 Aprl 2) - -When 'colorcolumn' is set locally to a window, ":new" opens a window with the -same highlighting but 'colorcolumn' is empty. (Tyru, 2010 Nov 15) -Patch by Christian Brabandt, 2011 Feb 13 (but move further down). - -Patch for configure related to Ruby on Mac OS X. (Bjorn Winckler, 2011 Jan 14) - -Patch to make mkdir() work properly for different encodings. (Yukihiro -Nakadaira, 2011 Apr 23) - -Updated PHP syntax file. (Jason Woofenden, 2011 Apr 22) - -ASCII Vim logo's (Erling Westenvik, 2011 Apr 19) Add to website. - Crash in autocomplete, valgrind log. (Greg Weber, 2011 Apr 22) -Patch for static code analysis errors in riscOS. (Dominique Pelle, 2010 Dec 3) +Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. (Dominique +Pelle, 2011 May 7). -Patch to set v:register on startup. (Ingo Karkat, 2011 Jan 16) +In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009 +Jun 1) +Patch by Jean-Rene David, 2011 Apr 30. -Risc OS gui has obvious errors. Drop it? +When "b" is a symlink to directory "a", resolve("b/") doesn't result in "a/". +(ZyX, 2011 Feb 12) +Patch by Jean-Rene David, 2011 Apr 30. Patch to set v:register default depending on "unnamed" in 'clipboard'. (Ingo Karkat, 2011 Jan 16) @@ -96,6 +84,9 @@ Patch to improve optwin.vim. (ZyX, 2011 Jan 29) Patch for Python 3 support. (lilydjwg, 2011 Feb 24) +Patch to make putting from clipboard linewise when the text ends in a newline. +(Sung Pae) Do we want this? + Building the MingW version without clipboard but with multi-byte doesn't work. (Bill Lam, 2010 Sep 18) @@ -105,12 +96,26 @@ Patch for handling of NL in substitute() with \= expression. (Motoya Kurotsu, Patch to disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka, 2010 Nov 25) +7 Output for ":scriptnames" and ":breaklist" should shorten the file names: + use "~/" when possible. +Patch by Jean-Rene David, 2011 May 1. + +Patch for better #if 0 syntax highlighting for C code. (Ben Schmidt, 2011 Jan +20) +Change to C syntax folding to make it work much faster, but a bit less +reliable. (Lech Lorens, 2009 Nov 9) Enable with an option? +Most time is spent in in_id_list(). +Updated to merge both patches. (Ben Schmidt, 2011 May 2) + GTK: Patch to fix menu popping down. (Hong Xu, 2010 Dec 4, Dec 5) Update 2011 Feb 3. Patch to use pipes on Win32. (Vincent Berthoux, 2011 Feb 28) Update Mar 1 using 'shelltemp'. +Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1) +Needs more work. + "gh<Del>" deletes the current line, except when it's the last line. Hint by Christian Brabandt, 2011 Mar 22 @@ -150,6 +155,12 @@ The error was 'RenderBadPicture (invalid Picture parameter)'. backtrace from your debugger if you break on the gdk_x_error() function.) Check that number of pixels doesn't go above 65535? +8 Add an event like CursorHold that is triggered repeatedly, not just once + after typing something. +Need for CursorHold that retriggers. Use a key that doesn't do anything, or a +function that resets did_cursorhold. +Patch by Christian Brabandt, 2011 May 6. + CursorHold repeats typed key when it's the start of a mapping. (Will Gray, 2011 Mar 23) @@ -372,11 +383,6 @@ FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2) Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29) Looks like only bash can do it. (Yakov Lerner) -8 Add an event like CursorHold that is triggered repeatedly, not just once - after typing something. -Need for CursorHold that retriggers. Use a key that doesn't do anything, or a -function that resets did_cursorhold. - Cscope "cs add" stopped working somewhat before 7.2.438. (Gary Johnson, 2010 Jun 29) Caused by 7.2.433? @@ -401,8 +407,6 @@ Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3) Find tail? Might have a / in argument. Find space? Might have space in path. -":sort n" treats empty line as higher than zero. (Beeyawned, 2010 Oct 13) - Test 51 fails when language set to German. (Marco, 2011 Jan 9) Dominique can't reproduc it. @@ -440,13 +444,6 @@ Undo problem: line not removed as expected when using setline() from Insert mode. (Israel Chauca, 2010 May 13, more in second msg) Break undo when CTRL-R = changes the text? Or save more lines? -Patch for better #if 0 syntax highlighting for C code. (Ben Schmidt, 2011 Jan -20) - -Change to C syntax folding to make it work much faster, but a bit less -reliable. (Lech Lorens, 2009 Nov 9) Enable with an option? -Most time is spent in in_id_list(). - Slow combination of folding and PHP syntax highlighting. Script to reproduce it. Caused by "syntax sync fromstart" in combination with patch 7.2.274. (Christian Brabandt, 2010 May 27) @@ -459,9 +456,6 @@ Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9) Using ":call foo#d.f()" doesn't autoload the "foo.vim" file. Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 17) -In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009 -Jun 1) - Cannot use getchar() inside :normal and using an expression mapping. Is this supposed to work? (XyX, 2010 Sep 22) @@ -585,9 +579,6 @@ Ignore window options when not in the right window? Perhaps we need to use a hidden window for applying autocommands to a buffer that doesn't have a window. -When "b" is a symlink to directory "a", resolve("b/") doesn't result in "a/". -(ZyX, 2011 Feb 12) - When using "ab foo bar" and mapping <Tab> to <Esc>, pressing <Tab> after foo doesn't trigger the abbreviation like <Esc> would. (Ramana Kumar, 2009 Sep 6) @@ -1857,7 +1848,7 @@ GUI: 8 When translating menus ignore the part after the Tab, the shortcut. So that the same menu item with a different shortcut (e.g., for the Mac) are still translated. -8 Add menu separators for Amiga, RISCOS. +8 Add menu separators for Amiga. 8 Add way to specify the file filter for the browse dialog. At least for browse(). 8 Add dialog for search/replace to other GUIs? Tk has something for this, @@ -2102,8 +2093,6 @@ Macintosh: 6 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) 8 Command line completion: buffers "foo.txt" and "../b/foo.txt", completing ":buf foo<Tab>" doesn't find the second one. (George V. Reilly) -7 Output for ":scriptnames" and ":breaklist" should shorten the file names: - use "~/" when possible. 7 mb_off2cells() doesn't work correctly on the tail byte of a double-byte character. (Yasuhiro Matsumoto) It should return 1 when used on a tail byte, like for utf-8. Store second byte of double-byte in ScreenLines2[] @@ -2130,8 +2119,6 @@ Macintosh: works. 8 A very long message in confirm() can't be quit. Make this possible with CTRL-C. -8 When the clipboard isn't supported: ":yank*" gives a confusing error - message. Specifically mention that the register name is invalid. 8 "gf" always excludes trailing punctuation characters. file_name_in_line() is currently fixed to use ".,:;!". Add an option to make this configurable? @@ -2145,8 +2132,6 @@ Macintosh: is a multi-byte character. 8 When appending to a file and 'patchmode' isn't empty, a backup file is always written, even when the original file already exists. -7 When using "daw" on the last word in a file and this is a single letter, - nothing is deleted. Should delete the letter and preceding white space. 9 When getting focus while writing a large file, could warn for this file being changed outside of Vim. Avoid checking this while the file is being written. @@ -2797,7 +2782,7 @@ Multi-byte characters: For Windows, the charset_pairs[] table could be used. But how do we know if a font exists? - Do keyboard conversion from 'termencoding' to 'encoding' with - convert_input() for Mac GUI and RiscOS GUI. + convert_input() for Mac GUI. - Add mnemonics from RFC1345 longer than two characters. Support CTRL-K _{mnemonic}_ 7 In "-- INSERT (lang) --" show the name of the keymap used instead of @@ -3060,6 +3045,10 @@ Built-in script language: Patch by Ilya Sher, 2004 Mar 4. Return a list instead. char2hex() convert char string to hex string. + crypt() encrypt string + decrypt() decrypt string + base64enc() base 64 encoding + base64dec() base 64 decoding attributes() return file protection flags "drwxrwxrwx" filecopy(from, to) Copy a file shorten(fname) shorten a file name, like home_replace() @@ -3441,7 +3430,7 @@ Win32 GUI: GUI: -8 Make inputdialog() work for Photon, Amiga, RiscOS. +8 Make inputdialog() work for Photon, Amiga. - <C--> cannot be mapped. Should be possible to recognize this as a normal "-" with the Ctrl modifier. 7 Implement ":popup" for other systems than Windows. @@ -3552,9 +3541,9 @@ Autocommands: handled (e.g., other font) (Ron Aaron) 7 When trying to open a directory, trigger an OpenDirectory event. 7 Add file type in front of file pattern: <d> for directory, <l> for link, - <x> for executable, etc. <&xxx> for Risc OS. With commas to separate - alternatives. The autocommand is only executed when both the file type - AND the file pattern match. (Leonard) + <x> for executable, etc. With commas to separate alternatives. The + autocommand is only executed when both the file type AND the file pattern + match. (Leonard) 5 Add option that specifies extensions which are to be discarded from the file name. E.g. 'ausuffix', with ".gz,.orig". Such that file.c.gz will trigger the "*.c" autocommands. (Belabas) @@ -3812,10 +3801,6 @@ Insert mode: 'cindent', 'smartindent': -9 ") :" confuses continuation line: (Colin Bennett, 2007 Dec 14) - cout << "a" - << ") :" - << "y"; 9 "} else" causes following lines to be indented too much. (Rouben Rostamian, 2008 Aug 30) 9 Wrapping a variable initialization should have extra indent: diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim index c871a777eb..dafcbe20ff 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 <now@bitwi.se> -" Latest Revision: 2010-08-17 +" Latest Revision: 2011-05-02 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. @@ -99,8 +99,9 @@ if &filetype == 'changelog' function! s:try_reading_file(path) try return readfile(a:path) + catch + return [] endtry - return [] endfunction function! s:passwd_field(line, field) @@ -170,7 +171,7 @@ if &filetype == 'changelog' endfunction " Internal function to create a new entry in the ChangeLog. - function! s:new_changelog_entry(...) + function! s:new_changelog_entry() " Deal with 'paste' option. let save_paste = &paste let &paste = 1 @@ -178,7 +179,7 @@ if &filetype == 'changelog' " Look for an entry for today by our user. let date = strftime(g:changelog_dateformat) let search = s:substitute_items(g:changelog_date_entry_search, date, - \ g:changelog_username) + \ s:username()) if search(search) > 0 " Ok, now we look for the end of the date entry, and add an entry. call cursor(nextnonblank(line('.') + 1), 1) @@ -197,7 +198,7 @@ if &filetype == 'changelog' " No entry today, so create a date-user header and insert an entry. let todays_entry = s:substitute_items(g:changelog_new_date_format, - \ date, g:changelog_username) + \ date, s:username()) " Make sure we have a cursor positioning. if stridx(todays_entry, '{cursor}') == -1 let todays_entry = todays_entry . '{cursor}' diff --git a/runtime/syntax/hostsaccess.vim b/runtime/syntax/hostsaccess.vim new file mode 100644 index 0000000000..8a9f02eff5 --- /dev/null +++ b/runtime/syntax/hostsaccess.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: hosts.deny, hosts.allow configuration files +" Maintainer: Thilo Six <T.Six@gmx.de> +" Last Change: 2011 May 01 +" Derived From: conf.vim +" Credits: Bram Moolenaar +" +" This file is there to get at least a minimal highlighting. +" A later version may be improved. + + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" For a starter we just use conf.vim for highlighting +if version < 600 + so <sfile>:p:h/conf.vim +else + runtime! syntax/conf.vim + unlet b:current_syntax +endif + + +let b:current_syntax = "hostsaccess" +" vim: ts=8 sw=2 diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 4e6b95ca9f..f9104ad7bc 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,11 +1,10 @@ " Vim syntax file " Language: php PHP 3/4/5 -" Maintainer: Peter Hodge <toomuchphp-vim@yahoo.com> -" Last Change: June 9, 2006 -" URL: http://www.vim.org/scripts/script.php?script_id=1571 -" -" Former Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> -" Former URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 +" Maintainer: Jason Woofenden <jason@jasonwoof.com> +" Last Change: April 28, 2011 +" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim +" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com> +" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " " Note: If you are using a colour terminal with dark background, you will probably find " the 'elflord' colorscheme is much better for PHP's syntax than the default @@ -327,6 +326,8 @@ syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display syn match phpSpecialChar "\\x\x\{2}" contained display +syn match phpDoubleSpecialChar "\\\"" contained display +syn match phpSingleSpecialChar "\\[\\']" contained display " Error syn match phpOctalError "[89]" contained display @@ -355,13 +356,13 @@ endif " String if exists("php_parent_error_open") - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained keepend syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend else - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained extend keepend syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend extend endif " HereDoc @@ -613,6 +614,8 @@ if version >= 508 || !exists("did_php_syn_inits") HiLink phpInclude Include HiLink phpDefine Define HiLink phpSpecialChar SpecialChar + HiLink phpDoubleSpecialChar SpecialChar + HiLink phpSingleSpecialChar SpecialChar HiLink phpParent Delimiter HiLink phpIdentifierConst Delimiter HiLink phpParentError Error diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim index 91094c7978..06306d513e 100644 --- a/runtime/syntax/readline.vim +++ b/runtime/syntax/readline.vim @@ -1,11 +1,11 @@ " Vim syntax file " Language: readline(3) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2009-05-25 +" Latest Revision: 2011-05-02 " readline_has_bash - if defined add support for bash specific " settings/functions -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -14,163 +14,382 @@ set cpo&vim setlocal iskeyword+=- -syn keyword readlineTodo contained TODO FIXME XXX NOTE +syn match readlineKey contained + \ '\S' + \ nextgroup=readlineKeyTerminator -syn region readlineComment display oneline start='^\s*#' end='$' - \ contains=readlineTodo,@Spell +syn match readlineBegin display '^' + \ nextgroup=readlineComment, + \ readlineConditional, + \ readlineInclude, + \ readlineKeyName, + \ readlineKey, + \ readlineKeySeq, + \ readlineKeyword + \ skipwhite -syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys -syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ - \ end=+"+ contains=readlineKeysTwo +syn region readlineComment contained display oneline + \ start='#' + \ end='$' + \ contains=readlineTodo, + \ @Spell + +syn keyword readlineTodo contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn match readlineConditional contained + \ '$if\>' + \ nextgroup=readlineTest, + \ readlineTestApp + \ skipwhite + +syn keyword readlineTest contained + \ mode + \ nextgroup=readlineTestModeEq + +syn match readlineTestModeEq contained + \ '=' + \ nextgroup=readlineEditingMode + +syn keyword readlineTest contained + \ term + \ nextgroup=readlineTestTermEq + +syn match readlineTestTermEq contained + \ '=' + \ nextgroup=readlineTestTerm + +syn match readlineTestTerm contained + \ '\S\+' + +syn match readlineTestApp contained + \ '\S\+' + +syn match readlineConditional contained display + \ '$\%(else\|endif\)\>' + +syn match readlineInclude contained display + \ '$include\>' + \ nextgroup=readlinePath + +syn match readlinePath contained display + \ '.\+' syn case ignore -syn keyword readlineKeys contained Control Meta Del Esc Escape LFD - \ Newline Ret Return Rubout Space Spc Tab +syn match readlineKeyName contained display + \ nextgroup=readlineKeySeparator, + \ readlineKeyTerminator + \ '\%(Control\|Del\|Esc\|Escape\|LFD\|Meta\|Newline\|Ret\|Return\|Rubout\|Space\|Spc\|Tab\)' syn case match -syn match readlineKeysTwo contained display - \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ +syn match readlineKeySeparator contained + \ '-' + \ nextgroup=readlineKeyName, |