diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim index cc5191fa43..ce3a19369a 100644 --- a/runtime/autoload/ada.vim +++ b/runtime/autoload/ada.vim @@ -2,12 +2,13 @@ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ -" Maintainer: Martin Krischik +" Maintainer: Mathias Brousset +" Martin Krischik " Taylor Venable " Neil Bird " Ned Okie " $Author: krischik $ -" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ @@ -23,6 +24,7 @@ " 09.05.2007 MK Session just won't work no matter how much " tweaking is done " 19.09.2007 NO still some mapleader problems +" 31.01.2017 MB fix more mapleader problems " Help Page: ft-ada-functions "------------------------------------------------------------------------------ @@ -585,11 +587,11 @@ function ada#Map_Menu (Text, Keys, Command) \ " :" . a:Command . "" execute \ "nnoremap " . - \ escape(l:leader . "a" . a:Keys , '\') . + \ " a" . a:Keys . \" :" . a:Command execute \ "inoremap " . - \ escape(l:leader . "a" . a:Keys , '\') . + \ " a" . a:Keys . \" :" . a:Command endif return diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index c669d1792d..98cf459714 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -614,12 +614,14 @@ Directory for temporary files is created in the first suitable directory of: For the {pattern} see |pattern|. {string} can be a literal string, or something special; see |sub-replace-special|. + *E939* When [range] and [count] are omitted, replace in the - current line only. - When [count] is given, replace in [count] lines, - starting with the last line in [range]. When [range] - is omitted start in the current line. - Also see |cmdline-ranges|. + current line only. When [count] is given, replace in + [count] lines, starting with the last line in [range]. + When [range] is omitted start in the current line. + [count] must be a positive number. Also see + |cmdline-ranges|. + See |:s_flags| for [flags]. :[range]s[ubstitute] [flags] [count] diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 12f4563518..e04aa55b5a 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -123,6 +123,8 @@ file for a moment and come back to the same file and be in diff mode again. related options only happens in a window that has 'diff' set, if the current window does not have 'diff' set then no options in it are changed. + Hidden buffers are also removed from the list of diff'ed + buffers. The `:diffoff` command resets the relevant options to the values they had when using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode. @@ -156,7 +158,8 @@ The alignment of text will go wrong when: All the buffers edited in a window where the 'diff' option is set will join in the diff. This is also possible for hidden buffers. They must have been -edited in a window first for this to be possible. +edited in a window first for this to be possible. To get rid of the hidden +buffers use `:diffoff!`. *:DiffOrig* *diff-original-file* Since 'diff' is a window-local option, it's possible to view the same buffer diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index c992430234..a70e400640 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1305,7 +1305,8 @@ b:changedtick The total number of changes to the current buffer. It is : let my_changedtick = b:changedtick : call My_Update() :endif -< +< You cannot change or delete the b:changedtick variable. + *window-variable* *w:var* *w:* A variable name that is preceded with "w:" is local to the current window. It is deleted when the window is closed. @@ -5734,7 +5735,7 @@ printf({fmt}, {expr1} ...) *printf()* %e floating point number as 1.23e3, inf, -inf or nan %E floating point number as 1.23E3, INF, -INF or NAN %g floating point number, as %f or %e depending on value - %G floating point number, as %f or %E depending on value + %G floating point number, as %F or %E depending on value %% the % character itself %p representation of the pointer to the container @@ -8170,6 +8171,7 @@ timers Compiled with |timer_start()| support. title Compiled with window title support |'title'|. toolbar Compiled with support for |gui-toolbar|. unix Unix version of Vim. +unnamedplus Compiled with support for "unnamedplus" in 'clipboard' user_commands User-defined commands. vertsplit Compiled with vertically split windows |:vsplit|. vim_starting True while initial source'ing takes place. |startup| @@ -8664,6 +8666,11 @@ This does NOT work: > value and the global value are changed. Example: > :let &path = &path . ',/usr/local/include' +< This also works for terminal codes in the form t_xx. + But only for alphanumerical names. Example: > + :let &t_k1 = "\[234;" +< When the code does not exist yet it will be created as + a terminal key code, there is no error. :let &{option-name} .= {expr1} For a string option: Append {expr1} to the value. diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 6741efabd8..31a425bdee 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -27,10 +27,16 @@ Help on help files *helphelp* *{subject}* *E149* *E661* :h[elp] {subject} Like ":help", additionally jump to the tag {subject}. - {subject} can include wildcards like "*", "?" and + For example: > + :help options + +< {subject} can include wildcards such as "*", "?" and "[a-z]": :help z? jump to help for any "z" command :help z. jump to the help for "z." + But when a tag exists it is taken literally: + :help :? jump to help for ":?" + If there is no full match for the pattern, or there are several matches, the "best" match will be used. A sophisticated algorithm is used to decide which @@ -67,18 +73,19 @@ Help on help files *helphelp* example to find help for CTRL-V in Insert mode: > :help i^V < - To use a regexp |pattern|, first do ":help" and then + It is also possible to first do ":help" and then use ":tag {pattern}" in the help window. The ":tnext" command can then be used to jump to other matches, "tselect" to list matches and choose one. > - :help index| :tse z. + :help index + :tselect /.*mode < When there is no argument you will see matches for "help", to avoid listing all possible matches (that would be very slow). The number of matches displayed is limited to 300. - This command can be followed by '|' and another + The `:help` command can be followed by '|' and another command, but you don't need to escape the '|' inside a help command. So these both work: > :help | diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 364b0c2ac2..eb79ffc865 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1472,7 +1472,7 @@ algorithm should work in the vast majority of cases. In some cases, such as a file that begins with 500 or more full-line comments, the script may incorrectly decide that the fortran code is in fixed form. If that happens, just add a non-comment statement beginning anywhere in the first five columns -of the first twenty five lines, save (:w) and then reload (:e!) the file. +of the first twenty-five lines, save (:w) and then reload (:e!) the file. Tabs in fortran files ~ Tabs are not recognized by the Fortran standards. Tabs are not a good idea in @@ -2920,6 +2920,13 @@ reduce this, the "sh_maxlines" internal variable can be set. Example: > The default is to use the twice sh_minlines. Set it to a smaller number to speed up displaying. The disadvantage is that highlight errors may appear. +syntax/sh.vim tries to flag certain problems as errors; usually things like +extra ']'s, 'done's, 'fi's, etc. If you find the error handling problematic +for your purposes, you may suppress such error highlighting by putting +the following line in your .vimrc: > + + let g:sh_no_error= 1 +< *sh-embed* *sh-awk* Sh: EMBEDDING LANGUAGES~ @@ -3222,11 +3229,11 @@ syntax highlighting script handles this with the following logic: * If g:tex_stylish exists and is 1 then the file will be treated as a "sty" file, so the "_" will be allowed as part of keywords - (irregardless of g:tex_isk) + (regardless of g:tex_isk) * Else if the file's suffix is sty, cls, clo, dtx, or ltx, then the file will be treated as a "sty" file, so the "_" will be allowed as part of keywords - (irregardless of g:tex_isk) + (regardless of g:tex_isk) * If g:tex_isk exists, then it will be used for the local 'iskeyword' * Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255 diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 5ee71d7aab..60bd864bcc 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -131,10 +131,14 @@ something else. :tabc[lose][!] {count} Close tab page {count}. Fails in the same way as `:tabclose` above. > - :-tabclose " close the previous tab page - :+tabclose " close the next tab page - :1tabclose " close the first tab page - :$tabclose " close the last tab page + :-tabclose " close the previous tab page + :+tabclose " close the next tab page + :1tabclose " close the first tab page + :$tabclose " close the last tab page + :tabclose -2 " close the two previous tab page + :tabclose + " close the next tab page + :tabclose 3 " close the third tab page + :tabclose $ " close the last tab page < *:tabo* *:tabonly* :tabo[nly][!] Close all other tab pages. @@ -147,13 +151,20 @@ something else. never abandoned, so changes cannot get lost. > :tabonly " close all tab pages except the current one -:{count}tabo[nly][!] - Close all tab pages except the {count}th one. > - :.tabonly " as above - :-tabonly " close all tab pages except the previous one - :+tabonly " close all tab pages except the next one - :1tabonly " close all tab pages except the first one - :$tabonly " close all tab pages except the last one. +:tabo[nly][!] {count} + Close all tab pages except {count} one. > + :.tabonly " as above + :-tabonly " close all tab pages except the previous + " one + :+tabonly " close all tab pages except the next one + :1tabonly " close all tab pages except the first one + :$tabonly " close all tab pages except the last one + :tabonly - " close all tab pages except the previous + " one + :tabonly +2 " close all tab pages except the two next + " one + :tabonly 1 " close all tab pages except the first one + :tabonly $ " close all tab pages except the last one SWITCHING TO ANOTHER TAB PAGE: @@ -168,7 +179,20 @@ gt *i_CTRL-* *i_* Go to the next tab page. Wraps around from the last to the first one. +:{count}tabn[ext] :tabn[ext] {count} + Go to tab page {count}. The first tab page has number one. > + :-tabnext " go to the previous tab page + :+tabnext " go to the next tab page + :+2tabnext " go to the two next tab page + :1tabnext " go to the first tab page + :$tabnext " go to the last tab page + :tabnext $ " as above + :tabnext - " go to the previous tab page + :tabnext -1 " as above + :tabnext + " go to the next tab page + :tabnext +1 " as above + {count} {count}gt Go to tab page {count}. The first tab page has number one. diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index f2e523e784..5a7f0cb0e5 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -182,7 +182,7 @@ the following: This tells you that you might want to fix something on line 33. So how do you find line 33? One way is to do "9999k" to go to the top of the file and "32j" -to go down thirty two lines. It is not a good way, but it works. A much +to go down thirty-two lines. It is not a good way, but it works. A much better way of doing things is to use the "G" command. With a count, this command positions you at the given line number. For example, "33G" puts you on line 33. (For a better way of going through a compiler's error list, see diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim new file mode 100644 index 0000000000..dcefc85ec3 --- /dev/null +++ b/runtime/ftplugin/awk.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin +" Language: awk, nawk, gawk, mawk +" Maintainer: Antonio Colombo +" Last Change: 2017 Feb 17 + +" This plugin was prepared by Mark Sikora + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl commentstring<" + +setlocal commentstring=#\ %s diff --git a/runtime/menu.vim b/runtime/menu.vim index 7cb530a331..37e9d8733b 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -2,7 +2,7 @@ " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar -" Last Change: 2016 Jul 27 +" Last Change: 2017 Feb 09 " Note that ":an" (short for ":anoremenu") is often used to make a menu work " in all modes and avoid side effects from mappings defined by the user. @@ -475,7 +475,7 @@ if has("folding") an 40.340.130 &Tools.&Folding.C&lose\ more\ foldszm zm an 40.340.140 &Tools.&Folding.&Close\ all\ foldszM zM an 40.340.150 &Tools.&Folding.O&pen\ more\ foldszr zr - an 40.340.160 &Tools.&Folding.&Open\ all\ foldszR zR + an 40.340.160 &Tools.&Folding.&Open\ All\ FoldszR zR " fold method an 40.340.200 &Tools.&Folding.-SEP1- an 40.340.210 &Tools.&Folding.Fold\ Met&hod.M&anual :set fdm=manual diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 36d1741362..5c883babc1 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2016 Aug 21 +" Last Change: 2017 Jan 28 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 4cdced03b3..f97299cdeb 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell " Previous Maintainer: Lennart Schultz -" Last Change: Jan 03, 2017 -" Version: 167 +" Last Change: Jan 30, 2017 +" Version: 168 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) @@ -346,7 +346,7 @@ syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@ -" Last Change: Dec 07, 2016 -" Version: 102 +" Last Change: Jan 31, 2017 +" Version: 103 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -511,7 +511,7 @@ if !exists("g:tex_no_math") if &ambw == "double" || exists("g:tex_usedblwidth") let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '〈'] , - \ ['\\rangle' , '〉'] , + \ ['\\rangle' , '〉']] else let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '<'] , @@ -594,8 +594,6 @@ endif if s:tex_fast =~# 'v' if exists("g:tex_verbspell") && g:tex_verbspell syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell - " listings package: - syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell if b:tex_stylish syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell else diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim index 2021c3a967..0667ca28ad 100644 --- a/runtime/syntax/xpm.vim +++ b/runtime/syntax/xpm.vim @@ -1,8 +1,9 @@ " Vim syntax file " Language: X Pixmap " Maintainer: Ronald Schild -" Last Change: 2008 May 28 +" Last Change: 2017 Feb 01 " Version: 5.4n.1 +" Jemma Nelson added termguicolors support " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -15,7 +16,7 @@ syn keyword xpmTodo TODO FIXME XXX contained syn region xpmComment start="/\*" end="\*/" contains=xpmTodo syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmColors -if has("gui_running") +if has("gui_running") || has("termguicolors") && &termguicolors let color = "" let chars = "" @@ -120,7 +121,7 @@ endwhile unlet color chars colors cpp n i s -endif " has("gui_running") +endif " has("gui_running") || has("termguicolors") && &termguicolors " Define the default highlighting. " Only when an item doesn't have highlighting yet diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index 1d0eb572fd..dfa6945a31 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: X Pixmap v2 " Maintainer: Steve Wall (hitched97@velnet.com) -" Last Change: 2012 Jun 01 +" Last Change: 2017 Feb 01 " (Dominique Pelle added @Spell) " Version: 5.8 +" Jemma Nelson added termguicolors support " " Made from xpm.vim by Ronald Schild @@ -22,7 +23,7 @@ syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo command -nargs=+ Hi hi def -if has("gui_running") +if has("gui_running") || has("termguicolors") && &termguicolors let color = "" let chars = "" @@ -132,7 +133,7 @@ if has("gui_running") unlet color chars colors cpp n i s -endif " has("gui_running") +endif " has("gui_running") || has("termguicolors") && &termguicolors " Define the default highlighting. " Only when an item doesn't have highlighting yet