diff options
-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 6e5311145..1c8c0eb0d 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 8c464a85c..295fe4a3c 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 24a8dcb61..4f279333f 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 51f936e35..43c435655 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 29b9e9f35..ec21d15ff 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 2a5f0f589..97c452502 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 a367e06b7..6ba21febe 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 c30926715..ff8243a89 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 bee39c1ac..50a1d4db7 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 3adc36cc2..b96f25533 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 c871a777e..dafcbe20f 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 000000000..8a9f02eff --- /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 4e6b95ca9..f9104ad7b 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 91094c797..06306d513 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, + \ readlineKey + +syn match readlineKeyTerminator contained + \ ':' + \ nextgroup=readlineFunction + \ skipwhite -syn match readlineKeymaps contained display - \ 'emacs\(-standard\|-meta\|-ctlx\)\=' -syn match readlineKeymaps contained display - \ 'vi\(-move\|-command\|-insert\)\=' +syn region readlineKeySeq contained display oneline + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + \ contains=readlineKeyEscape + \ nextgroup=readlineKeyTerminator -syn keyword readlineBellStyles contained audible visible none +syn match readlineKeyEscape contained display + \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{2}\)+ -syn match readlineNumber contained display '\<\d\+\>' +syn keyword readlineKeyword contained + \ set + \ nextgroup=readlineVariable + \ skipwhite + +syn keyword readlineVariable contained + \ nextgroup=readlineBellStyle + \ skipwhite + \ bell-style + +syn keyword readlineVariable contained + \ nextgroup=readlineBoolean + \ skipwhite + \ bind-tty-special-chars + \ completion-ignore-case + \ completion-map-case + \ convert-meta + \ disable-completion + \ echo-control-characters + \ enable-keypad + \ enable-meta-key + \ expand-tilde + \ history-preserve-point + \ horizontal-scroll-mode + \ input-meta + \ meta-flag + \ mark-directories + \ mark-modified-lines + \ mark-symlinked-directories + \ match-hidden-files + \ menu-complete-display-prefix + \ output-meta + \ page-completions + \ print-completions-horizontally + \ revert-all-at-newline + \ show-all-if-ambiguous + \ show-all-if-unmodified + \ skip-completed-text + \ visible-stats + +syn keyword readlineVariable contained + \ nextgroup=readlineString + \ skipwhite + \ comment-begin + \ isearch-terminators + +syn keyword readlineVariable contained + \ nextgroup=readlineNumber + \ skipwhite + \ completion-display-width + \ completion-prefix-display-length + \ completion-query-items + \ history-size + +syn keyword readlineVariable contained + \ nextgroup=readlineEditingMode + \ skipwhite + \ editing-mode + +syn keyword readlineVariable contained + \ nextgroup=readlineKeymap + \ skipwhite + \ keymap + +syn keyword readlineBellStyle contained + \ audible + \ visible + \ none syn case ignore -syn keyword readlineBoolean contained on off +syn keyword readlineBoolean contained + \ on + \ off syn case match -syn keyword readlineIfOps contained mode term - -syn region readlineConditional display oneline transparent - \ matchgroup=readlineConditional - \ start='^\s*$if' end="$" - \ contains=readlineIfOps,readlineKeymaps -syn match readlineConditional display '^\s*$\(else\|endif\)\>' - -syn match readlineInclude display '^\s*$include\>' - -syn region readlineSet display oneline transparent - \ matchgroup=readlineKeyword start='^\s*set\>' - \ end="$"me=e-1 contains=readlineNumber, - \ readlineBoolean,readlineKeymaps, - \ readlineBellStyles,readlineSettings - -syn keyword readlineSettings contained bell-style comment-begin - \ completion-ignore-case completion-query-items - \ convert-meta disable-completion editing-mode - \ enable-keypad expand-tilde - \ horizontal-scroll-mode mark-directories - \ keymap mark-modified-lines meta-flag - \ input-meta output-meta - \ print-completions-horizontally - \ show-all-if-ambiguous visible-stats - \ prefer-visible-bell blink-matching-paren - \ match-hidden-files history-preserve-point - \ isearch-terminators - -syn region readlineBinding display oneline transparent - \ matchgroup=readlineKeyword start=':' end='$' - \ contains=readlineKeys,readlineFunctions - -syn keyword readlineFunctions contained display - \ beginning-of-line end-of-line forward-char - \ backward-char forward-word backward-word - \ clear-screen redraw-current-line - \ accept-line previous-history - \ next-history beginning-of-history - \ end-of-history reverse-search-history - \ forward-search-history - \ non-incremental-reverse-search-history - \ non-incremental-forward-search-history - \ history-search-forward - \ history-search-backward - \ yank-nth-arg yank-last-arg - \ delete-char backward-delete-char - \ forward-backward-delete-char quoted-insert - \ tab-insert self-insert transpose-chars - \ transpose-words upcase-word downcase-word - \ capitalize-word overwrite-mode kill-line - \ backward-kill-line unix-line-discard - \ kill-whole-line kill-word backward-kill-word - \ unix-word-rubout unix-filename-rubout - \ delete-horizontal-space kill-region - \ copy-region-as-kill copy-backward-word - \ copy-forward-word yank yank-pop - \ digit-argument universal-argument complete - \ possible-completions insert-completions - \ menu-complete delete-char-or-list - \ start-kbd-macro end-kbd-macro - \ call-last-kbd-macro re-read-init-file - \ abort do-uppercase-version prefix-meta - \ undo revert-line tilde-expand set-mark - \ exchange-point-and-mark character-search - \ character-search-backward insert-comment - \ dump-functions dump-variables dump-macros - \ emacs-editing-mode vi-editing-mode - \ vi-complete vi-char-search vi-redo - \ vi-search vi-arg-digit vi-append-eol - \ vi-prev-word vi-change-to vi-delete-to - \ vi-end-word vi-fetch-history vi-insert-beg - \ vi-search-again vi-put vi-replace - \ vi-subst vi-yank-to vi-first-print - \ vi-yank-arg vi-goto-mark vi-append-mode - \ vi-insertion-mode prev-history vi-set-mark - \ vi-search-again vi-put vi-change-char - \ vi-subst vi-delete vi-yank-to - \ vi-column vi-change-case vi-overstrike - \ vi-overstrike-delete do-lowercase-version - \ delete-char-or-list tty-status - \ arrow-key-prefix vi-back-to-indent vi-bword - \ vi-bWord vi-eword vi-eWord vi-fword vi-fWord - \ vi-next-word - \ vi-movement-mode +syn region readlineString contained display oneline + \ matchgroup=readlineStringDelimiter + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + +syn match readlineNumber contained display + \ '[+-]\d\+\>' + +syn keyword readlineEditingMode contained + \ emacs + \ vi + +syn match readlineKeymap contained display + \ 'emacs\%(-\%(standard\|meta\|ctlx\)\)\=\|vi\%(-\%(move\|command\|insert\)\)\=' + +syn keyword readlineFunction contained + \ beginning-of-line + \ end-of-line + \ forward-char + \ backward-char + \ forward-word + \ backward-word + \ clear-screen + \ redraw-current-line + \ + \ accept-line + \ previous-history + \ next-history + \ beginning-of-history + \ end-of-history + \ reverse-search-history + \ forward-search-history + \ non-incremental-reverse-search-history + \ non-incremental-forward-search-history + \ history-search-forward + \ history-search-backward + \ yank-nth-arg + \ yank-last-arg + \ + \ delete-char + \ backward-delete-char + \ forward-backward-delete-char + \ quoted-insert + \ tab-insert + \ self-insert + \ transpose-chars + \ transpose-words + \ upcase-word + \ downcase-word + \ capitalize-word + \ overwrite-mode + \ + \ kill-line + \ backward-kill-line + \ unix-line-discard + \ kill-whole-line + \ kill-word + \ backward-kill-word + \ unix-word-rubout + \ unix-filename-rubout + \ delete-horizontal-space + \ kill-region + \ copy-region-as-kill + \ copy-backward-word + \ copy-forward-word + \ yank + \ yank-pop + \ + \ digit-argument + \ universal-argument + \ + \ complete + \ possible-completions + \ insert-completions + \ menu-complete + \ menu-complete-or-backward + \ delete-char-or-list + \ + \ start-kbd-macro + \ end-kbd-macro + \ call-last-kbd-macro + \ + \ re-read-init-file + \ abort + \ do-uppercase-version + \ prefix-meta + \ undo + \ revert-line + \ tilde-expand + \ set-mark + \ exchange-point-and-mark + \ character-search + \ character-search-backward + \ skip-csi-sequence + \ insert-comment + \ dump-functions + \ dump-variables + \ dump-macros + \ emacs-editing-mode + \ vi-editing-mode + \ + \ vi-eof-maybe + \ vi-movement-mode + \ vi-undo + \ vi-match + \ vi-tilde-expand + \ vi-complete + \ vi-char-search + \ vi-redo + \ vi-search + \ vi-arg-digit + \ vi-append-eol + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-fetch-history + \ vi-insert-beg + \ vi-search-again + \ vi-put + \ vi-replace + \ vi-subst + \ vi-char-search + \ vi-next-word + \ vi-yank-to + \ vi-first-print + \ vi-yank-arg + \ vi-goto-mark + \ vi-append-mode + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-insert-mode + \ vi-set-mark + \ vi-search-again + \ vi-put + \ vi-change-char + \ vi-subst + \ vi-char-search + \ vi-undo + \ vi-next-word + \ vi-delete + \ vi-yank-to + \ vi-column + \ vi-change-case if exists("readline_has_bash") - syn keyword readlineFunctions contained - \ shell-expand-line history-expand-line - \ magic-space alias-expand-line - \ history-and-alias-expand-line - \ insert-last-argument operate-and-get-next - \ forward-backward-delete-char - \ delete-char-or-list complete-filename - \ possible-filename-completions - \ complete-username - \ possible-username-completions - \ complete-variable - \ possible-variable-completions - \ complete-hostname - \ possible-hostname-completions - \ complete-command - \ possible-command-completions - \ dynamic-complete-history - \ complete-into-braces - \ glob-expand-word glob-list-expansions - \ display-shell-version glob-complete-word - \ edit-and-execute-command + syn keyword readlineFunction contained + \ shell-expand-line + \ history-expand-line + \ magic-space + \ alias-expand-line + \ history-and-alias-expand-line + \ insert-last-argument + \ operate-and-get-next + \ forward-backward-delete-char + \ delete-char-or-list + \ complete-filename + \ possible-filename-completions + \ complete-username + \ possible-username-completions + \ complete-variable + \ possible-variable-completions + \ complete-hostname + \ possible-hostname-completions + \ complete-command + \ possible-command-completions + \ dynamic-complete-history + \ complete-into-braces + \ glob-expand-word + \ glob-list-expansions + \ display-shell-version + \ glob-complete-word + \ edit-and-execute-command endif -hi def link readlineComment Comment -hi def link readlineTodo Todo -hi def link readlineString String -hi def link readlineKeys SpecialChar -hi def link readlineKeysTwo SpecialChar -hi def link readlineKeymaps Constant -hi def link readlineBellStyles Constant -hi def link readlineNumber Number -hi def link readlineBoolean Boolean -hi def link readlineIfOps Type -hi def link readlineConditional Conditional -hi def link readlineInclude Include -hi def link readlineKeyword Keyword -hi def link readlineSettings Type -hi def link readlineFunctions Type - -let b:current_syntax = "readline" +hi def link readlineKey readlineKeySeq +hi def link readlineComment Comment +hi def link readlineTodo Todo +hi def link readlineConditional Conditional +hi def link readlineTest Type +hi def link readlineDelimiter Delimiter +hi def link readlineTestModeEq readlineEq +hi def link readlineTestTermEq readlineEq +hi def link readlineTestTerm readlineString +hi def link readlineTestAppEq readlineEq +hi def link readlineTestApp readlineString +hi def link readlineInclude Include +hi def link readlinePath String +hi def link readlineKeyName SpecialChar +hi def link readlineKeySeparator readlineKeySeq +hi def link readlineKeyTerminator readlineDelimiter +hi def link readlineKeySeq String +hi def link readlineKeyEscape SpecialChar +hi def link readlineKeyword Keyword +hi def link readlineVariable Identifier +hi def link readlineBellStyle Constant +hi def link readlineBoolean Boolean +hi def link readlineString String +hi def link readlineStringDelimiter readlineString +hi def link readlineNumber Number +hi def link readlineEditingMode Constant +hi def link readlineKeymap Constant +hi def link readlineFunction Function + +let b:current_syntax = 'readline' let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/sysctl.vim b/runtime/syntax/sysctl.vim index d16d458a9..748054fd7 100644 --- a/runtime/syntax/sysctl.vim +++ b/runtime/syntax/sysctl.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: sysctl.conf(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2006-04-19 +" Latest Revision: 2011-05-02 if exists("b:current_syntax") finish @@ -13,7 +13,7 @@ set cpo&vim syn match sysctlBegin display '^' \ nextgroup=sysctlToken,sysctlComment skipwhite -syn match sysctlToken contained display '\S\+' +syn match sysctlToken contained display '[^=]\+' \ nextgroup=sysctlTokenEq skipwhite syn match sysctlTokenEq contained display '=' nextgroup=sysctlValue skipwhite |