From 3df0173fa6d0418e89ef4e9c1d04a97c92eec27c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 17 Feb 2017 22:47:16 +0100 Subject: Updated runtime files. --- runtime/autoload/ada.vim | 12 +- runtime/doc/change.txt | 14 +- runtime/doc/diff.txt | 7 +- runtime/doc/eval.txt | 19 +- runtime/doc/helphelp.txt | 17 +- runtime/doc/if_pyth.txt | 10 +- runtime/doc/options.txt | 34 ++-- runtime/doc/repeat.txt | 7 +- runtime/doc/syntax.txt | 15 +- runtime/doc/tabpage.txt | 26 ++- runtime/doc/tags | 3 +- runtime/doc/todo.txt | 102 ++++++++-- runtime/doc/usr_03.txt | 2 +- runtime/doc/version6.txt | 6 +- runtime/doc/version7.txt | 6 +- runtime/ftplugin/awk.vim | 18 ++ runtime/menu.vim | 4 +- runtime/optwin.vim | 2 +- runtime/syntax/sh.vim | 6 +- runtime/syntax/tex.vim | 8 +- runtime/syntax/xpm.vim | 7 +- runtime/syntax/xpm2.vim | 7 +- runtime/tutor/tutor.es | 2 +- runtime/tutor/tutor.it | 4 +- runtime/tutor/tutor.it.utf-8 | 4 +- runtime/tutor/tutor.pt | 472 ++++++++++++++++++++++--------------------- runtime/tutor/tutor.pt.utf-8 | 472 ++++++++++++++++++++++--------------------- 27 files changed, 741 insertions(+), 545 deletions(-) create mode 100644 runtime/ftplugin/awk.vim (limited to 'runtime') diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim index 1f8234a575..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 "------------------------------------------------------------------------------ @@ -447,7 +449,7 @@ function ada#Switch_Session (New_Session) if a:New_Session != v:this_session " - " We actualy got a new session - otherwise there + " We actually got a new session - otherwise there " is nothing to do. " if strlen (v:this_session) > 0 @@ -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 e40805ea9e..8cca76382e 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 8.0. Last change: 2016 Nov 19 +*change.txt* For Vim version 8.0. Last change: 2017 Feb 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -635,12 +635,14 @@ For other systems the tmpnam() library function is used. 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 378874f3e3..7361d420f7 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 8.0. Last change: 2016 Aug 24 +*diff.txt* For Vim version 8.0. Last change: 2017 Feb 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -131,6 +131,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. @@ -164,7 +166,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 1b3f1128f0..bdc4b6388b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 Jan 28 +*eval.txt* For Vim version 8.0. Last change: 2017 Feb 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1329,7 +1329,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. @@ -4371,8 +4372,8 @@ getfontname([{name}]) *getfontname()* Only works when the GUI is running, thus not in your vimrc or gvimrc file. Use the |GUIEnter| autocommand to use this function just after the GUI has started. - Note that the GTK 2 GUI accepts any font name, thus checking - for a valid name does not work. + Note that the GTK GUI accepts any font name, thus checking for + a valid name does not work. getfperm({fname}) *getfperm()* The result is a String, which is the read, write, and execute @@ -5978,7 +5979,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 Conversion specifications start with '%' and end with the @@ -7807,6 +7808,8 @@ test_settime({expr}) *test_settime()* Set the time Vim uses internally. Currently only used for timestamps in the history, as they are used in viminfo, and for undo. + Using a value of 1 makes Vim not sleep after a warning or + error message. {expr} must evaluate to a number. When the value is zero the normal behavior is restored. @@ -8463,6 +8466,7 @@ toolbar Compiled with support for |gui-toolbar|. ttyin input is a terminal (tty) ttyout output is a terminal (tty) 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| @@ -8966,6 +8970,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 b51fe78eb3..32051d4963 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 8.0. Last change: 2016 Apr 01 +*helphelp.txt* For Vim version 8.0. Last change: 2017 Feb 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -28,10 +28,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 @@ -68,18 +74,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/if_pyth.txt b/runtime/doc/if_pyth.txt index 2016e33c7c..71bbb13f89 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 8.0. Last change: 2017 Jan 28 +*if_pyth.txt* For Vim version 8.0. Last change: 2017 Feb 17 VIM REFERENCE MANUAL by Paul Moore @@ -731,9 +731,11 @@ To use the Python interface the Python DLL must be in your search path. In a console window type "path" to see what directories are used. The 'pythondll' or 'pythonthreedll' option can be also used to specify the Python DLL. -The name of the DLL must match the Python version Vim was compiled with. -Currently the name is "python24.dll". That is for Python 2.4. To know for -sure edit "gvim.exe" and search for "python\d*.dll\c". +The name of the DLL should match the Python version Vim was compiled with. +Currently the name for Python 2 is "python27.dll", that is for Python 2.7. +That is the default value for 'pythondll'. For Python 3 it is python35.dll +(Python 3.5). To know for sure edit "gvim.exe" and search for +"python\d*.dll\c". Unix ~ diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 385f0bbfe2..215215fd0a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.0. Last change: 2017 Jan 28 +*options.txt* For Vim version 8.0. Last change: 2017 Feb 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2684,8 +2684,8 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline|. It would most likely corrupt the text. - NOTE: For GTK+ 2 it is highly recommended to set 'encoding' to - "utf-8". Although care has been taken to allow different values of + NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding' + to "utf-8". Although care has been taken to allow different values of 'encoding', "utf-8" is the natural choice for the environment and avoids unnecessary conversion overhead. "utf-8" has not been made the default to prevent different behavior of the GUI and terminal @@ -3596,6 +3596,14 @@ A jump table for the options with a short description can be found at |Q_op|. On systems where 'guifontset' is supported (X11) and 'guifontset' is not empty, then 'guifont' is not used. + Note: As to the GTK GUIs, no error is given against any invalid names, + and the first element of the list is always picked up and made use of. + This is because, instead of identifying a given name with a font, the + GTK GUIs use it to construct a pattern and try to look up a font which + best matches the pattern among available fonts, and this way, the + matching never fails. An invalid name doesn't matter because a number + of font properties other than name will do to get the matching done. + Spaces after a comma are ignored. To include a comma in a font name precede it with a backslash. Setting an option requires an extra backslash before a space and a backslash. See also @@ -3618,7 +3626,7 @@ A jump table for the options with a short description can be found at |Q_op|. The font name depends on the GUI used. See |setting-guifont| for a way to set 'guifont' for various systems. - For the GTK+ 2 GUI the font name looks like this: > + For the GTK+ 2 and 3 GUIs, the font name looks like this: > :set guifont=Andale\ Mono\ 11 < That's all. XLFDs are not used. For Chinese this is reported to work well: > @@ -3627,13 +3635,15 @@ A jump table for the options with a short description can be found at |Q_op|. set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12 endif < + (Replace gui_gtk2 with gui_gtk3 for the GTK+ 3 GUI) + For Mac OSX you can use something like this: > :set guifont=Monaco:h10 < Also see 'macatsui', it can help fix display problems. *E236* Note that the fonts must be mono-spaced (all characters have the same - width). An exception is GTK 2: all fonts are accepted, but - mono-spaced fonts look best. + width). An exception is GTK: all fonts are accepted, but mono-spaced + fonts look best. To preview a font on X11, you might be able to use the "xfontsel" program. The "xlsfonts" program gives a list of all available fonts. @@ -3671,7 +3681,7 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} {only available when compiled with GUI enabled and with the |+xfontset| feature} - {not available in the GTK+ 2 GUI} + {not available in the GTK+ GUI} When not empty, specifies two (or more) fonts to be used. The first one for normal English, the second one for your special language. See |xfontset|. @@ -3700,7 +3710,7 @@ A jump table for the options with a short description can be found at |Q_op|. Note: The size of these fonts must be exactly twice as wide as the one specified with 'guifont' and the same height. - All GUI versions but GTK+ 2: + All GUI versions but GTK+: 'guifontwide' is only used when 'encoding' is set to "utf-8" and 'guifontset' is empty or invalid. @@ -3708,7 +3718,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'guifontwide' is empty Vim will attempt to find a matching double-width font and set 'guifontwide' to it. - GTK+ 2 GUI only: *guifontwide_gtk2* + GTK+ GUI only: *guifontwide_gtk* If set and valid, 'guifontwide' is always used for double width characters, even if 'encoding' is not set to "utf-8". @@ -7606,7 +7616,7 @@ A jump table for the options with a short description can be found at |Q_op|. For further details see |arabic.txt|. *'termencoding'* *'tenc'* -'termencoding' 'tenc' string (default ""; with GTK+ 2 GUI: "utf-8"; with +'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8"; with Macintosh GUI: "macroman") global {only available when compiled with the |+multi_byte| @@ -7618,7 +7628,7 @@ A jump table for the options with a short description can be found at |Q_op|. display). Except for the Mac when 'macatsui' is off, then 'termencoding' should be "macroman". *E617* - Note: This does not apply to the GTK+ 2 GUI. After the GUI has been + Note: This does not apply to the GTK+ GUI. After the GUI has been successfully initialized, 'termencoding' is forcibly set to "utf-8". Any attempts to set a different value will be rejected, and an error message is shown. @@ -7901,7 +7911,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'toolbariconsize' 'tbis' string (default "small") global {not in Vi} - {only in the GTK+ 2 GUI} + {only in the GTK+ GUI} Controls the size of toolbar icons. The possible values are: tiny Use tiny icons. small Use small icons (default). diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index e704681a4e..8f810536b1 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 8.0. Last change: 2016 Sep 11 +*repeat.txt* For Vim version 8.0. Last change: 2017 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -305,6 +305,11 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Mark) in utf-8 format Vim will recognize it, no need to use ":scriptencoding utf-8" then. + If you set the 'encoding' option in your |.vimrc|, + `:scriptencoding` must be placed after that. E.g.: > + set encoding=utf-8 + scriptencoding utf-8 +< When compiled without the |+multi_byte| feature this command is ignored. {not in Vi} diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index e300983f08..7aaea9dc89 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.0. Last change: 2017 Jan 17 +*syntax.txt* For Vim version 8.0. Last change: 2017 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1476,7 +1476,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 @@ -2933,6 +2933,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~ @@ -3235,11 +3242,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 bc40981094..e72388cbf7 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -139,6 +139,10 @@ something else. :+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. @@ -153,13 +157,20 @@ something else. " one :{count}tabo[nly][!] - Close all tab pages except the {count}th 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: @@ -174,7 +185,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/tags b/runtime/doc/tags index f5a77ad638..025b298588 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4498,6 +4498,7 @@ E935 eval.txt /*E935* E936 autocmd.txt /*E936* E937 autocmd.txt /*E937* E938 eval.txt /*E938* +E939 change.txt /*E939* E94 windows.txt /*E94* E95 message.txt /*E95* E96 diff.txt /*E96* @@ -6588,7 +6589,7 @@ gui-x11-various gui_x11.txt /*gui-x11-various* gui.txt gui.txt /*gui.txt* gui_w32.txt gui_w32.txt /*gui_w32.txt* gui_x11.txt gui_x11.txt /*gui_x11.txt* -guifontwide_gtk2 options.txt /*guifontwide_gtk2* +guifontwide_gtk options.txt /*guifontwide_gtk* guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte* guioptions_a options.txt /*guioptions_a* guu change.txt /*guu* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 56d858f0e5..5d12904b0d 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2017 Jan 28 +*todo.txt* For Vim version 8.0. Last change: 2017 Feb 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,6 +35,17 @@ entered there will not be repeated below, unless there is extra information. *known-bugs* -------------------- Known bugs and current work ----------------------- +Patch 195 introduced a regression in tag priority. (Charles Campbell, 2017 Feb +10) + +Memory leak in test97? + +exists('&t_k1') returns false even when t_k1 was set. +Use in test_assign.vim to only get value of &t_k1 if it exists. #1459 + +test_gui fails with Athena: + Caught exception in Test_1_set_secure(): Vim(gui):E285: Failed to create input context @ function RunTheTest[21]..Test_1_set_secure, line 2 + +channel: - Try out background make plugin: https://github.com/AndrewVos/vim-make-background @@ -105,51 +116,77 @@ Regexp problems: - Difference between two engines: ".*\zs\/\@>\/" on text "///" (Chris Paul, 2016 Nov 13) New engine not greedy enough? -'] mark invalid after undoing insert "hello". - -When using symbolic links, a package path will not be inserted at the right -position in 'runtimepath'. (Dugan Chen, 2016 Nov 18) +Add a toolbar in the terminal. Can be global, above all windows, or specific +for one window. +Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}]) + tb_highlight(winid, 'ToolBar') + tb_get(winid) json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23) What if there is an invalid character? -Allow using json with empty key? Dict already has it. - Json string with trailing \u should be an error. (Lcd) +Patch for double free setting 'ttytype' (Dominique, 2017 Feb 10, #1461) + +Patch for using uninitialized memory (Dominique, 2017 Feb 11, #1464) + +Patch for crash setting 'guicursor'. (Dominique, 2017 Feb 11, #1465) + Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9) -Patch: Make mode() return "ix" or "Rx" when in completion mode. -(Yegappan Lakshmanan, 2017 Jan 19, #1397, update Jan 22) +Patch to add test for 'number' and 'relativenumber'. (Ozaki Kiichi, #1447) +Now merged in test89 (Feb 12) -With Visual selection of a multi-byte character the '] mark is on the last -byte, should be first byte? +Patch to fix tabline redraw. (Christian Brabandt, 2017 Feb 10) +Better way to fix this? When session file has name in argument list but the buffer was deleted, the buffer is not deleted when using the session file. (#1393) Should add the buffer in hidden state. +Patch to change VimL to "Vim script". (Hirohito Higashi, 2017 Feb 14) + +Invalid memory access with :normal command. (Dominique Pelle, 2017 Feb 14) + +When "gf" excludes following ":99", jump to line 99. +Also when editing a file foo.txt:99 ? + When an item in the quickfix list has a file name that does not exist, behave like the item was not a match for :cnext. +Patch for warning about integer overflow in undo.c (King, 2017 Feb 12) +And another similar one. + +Patch for null pointer use in undo.c (King, 2017 Feb 12) + +Patch to avoid using CTRL-O when do_cmdline_cmd is called. (James McCoy, 2017 +Feb 7, #1453) + +Patch for multi-byte line wrap. (Ozaki Kiichi, 2017 Feb 7, #1456) + +Patch to show balloon with a function. (Jusufadis Bakamovic, #1449) + Wrong diff highlighting with three files. (2016 Oct 20, #1186) Also get E749 on exit. Another example in #1309 -Completion for user-defined commands does not work if a few chararacters were +Completion for user-defined commands does not work if a few characters were already typed. (Dominique, 2017 Jan 26) +Patch for nsis script to add a dll file. (Christian Brabandt, 2017 Feb 10) +Also include the .dll file? + +Patch for capitalizations in menus. (Zhen-Huan Hu, 2017 Feb 9) + When deleting a mark or register, leave a tombstone, so that it's also deleted when writing viminfo (and the delete was the most recent action). #1339 -Relevant neovim patch: -https://github.com/neovim/neovim/pull/5737#issuecomment-266055165 - Patch for better explanation of 'compatible' side effects. https://github.com/vim/vim/pull/1161/files Patch to add 'makeencoding', useful when the system encoding differs from -Vim's 'encoding' setting. (Ken Takata, 2017 Jan 6) +Vim's 'encoding' setting. (Ken Takata, 2017 Jan 31) Patch to adjust marks when adding a new line to the end of buffer in diff mode. (James McCoy, 2016 Dec 14, #1329) @@ -159,18 +196,37 @@ Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15, Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17) +Patch to fix that test87 fails on Arch Linux. (Jesin, 2017 Feb 10) + +Completion for :!cmd shows each match twice. #1435 + Rule to use "^" for statusline does not work if a space is defined with highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11) 8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters. Patch by Christian Wellenbrock, 2013 Jul 5. +Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca +Fuentes, 2017 Feb 12, #1470) + Screen updated delayed when using CTRL-O u in Insert mode. (Barlik, #1191) Perhaps because status message? Patch to add buffer name argument to taglist(). Ordering of tags in result of taglist call. (Duncan McDougall, #1194) +Patch to fix that b_ind_has_comment is not correctly reset. (Christian +Brabandt, 2017 Feb 14, closes #1475) + +writefile() does not abort as soon as an error is found. (Nikolai Pavlov, +2017 Feb 14, #1476) + +Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017 +Feb 14). + +Add a command to take a range of lines, filter them and put the output +somewhere else. :{range}copy {dest} !cmd + Patch to fix that empty first tab is not in session. (Hirohito Higashi, 2016 Nov 25, #1282) @@ -184,6 +240,9 @@ The TermResponse event is not triggered when a plugin has set 'eventignore' to "all". Netrw does this. (Gary Johnson, 2017 Jan 24) Postpone the event until 'eventignore' is reset. +Patch to make urxvt mouse work better, recognize Esc[*M termcap code. +(Maurice Bos, 2017 Feb 17, #1486) + Once .exe with updated installer is available: Add remark to download page about /S and /D options (Ken Takata, 2016 Apr 13) Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases @@ -191,6 +250,11 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11, #1053) With patch, does it work? +Using --remote to open a file in which a # appears does not work on +MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender, +2017 Feb 9) Can we expand wildcards first and send the path literally to the +receiving Vim? Or make an exception for #, it's not useful remotely. + Use ADDR_OTHER instead of ADDR_LINES for many more commands. Add tests for using number larger than number of lines in buffer. @@ -228,6 +292,8 @@ Patch to add trim() function. (Bukn, 2016 Nov 25, #1280) Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275) +Patch to change argument of :marks. (LemonBoy, 2017 Jan 29, #1426) + On Windows buffer completion sees backslash as escape char instead of path separator. (Toffanim, 2016 Nov 24, #1274) @@ -265,7 +331,7 @@ change as a word boundary. (btucker-MPCData, 2016 Nov 6, #1235) Idea from Sven: record sequence of keys. Useful to show others what they are doing (look over the shoulder), and also to see what happened. Probably list of keystrokes, with some annotations for mode changes. -Could store in logfile to be able to analyise it with an external command. +Could store in logfile to be able to analyse it with an external command. E.g. to see when's the last time a plugin command was used. execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1, @@ -293,7 +359,7 @@ Also with latest version. Cannot delete a file with square brackets with delete(). (#696) Patch to add ":syn foldlevel" to use fold level further down the line. -(Brad King, 2016 Oct 19) +(Brad King, 2016 Oct 19, update 2017 Jan 30) Completion for input() does not expand environment variables. (chdiza, 2016 Jul 25, #948) diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index 2c66172a4e..fe0e4b040e 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/doc/version6.txt b/runtime/doc/version6.txt index 53f1a213f2..f0205dd632 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -886,7 +886,7 @@ Adjusted test2 for this. Allow using a URL in 'path'. Makes ":find index.html" work. GTK: Allow dropping a http:// and ftp:// URL on Vim. The netrw plugin takes -care of downloading the file. (MiKael Berthe) +care of downloading the file. (Mikael Berthe) Window for command-line editing *new-cmdwin* @@ -5388,7 +5388,7 @@ Files: src/os_win32.c Patch 6.0.256 (extra) Problem: Win32: ":highlight Comment guifg=asdf" does not give an error - message. (Randall W. Morris) Also for other systems. + message. (Randall W. Morris) Also for other systems. Solution: Add gui_get_color() to give one error message for all systems. Files: src/gui.c, src/gui_amiga.c, src/gui_athena.c, src/gui_motif.c, src/gui_riscos.c, src/gui_x11.c, src/gui_gtk_x11.c, @@ -9955,7 +9955,7 @@ Use "copy /y" in Make_bc5.mak to avoid a prompt for overwriting. Patch 6.2.001 Problem: The ":stopinsert" command doesn't have a help tag. -Solution: Add the tag. (Antoine J. Mechelynck) +Solution: Add the tag. (Antoine J. Mechelynck) Files: runtime/doc/insert.txt, runtime/doc/tags Patch 6.2.002 diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index e5ed6df802..3f6e10adc2 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1445,7 +1445,7 @@ g CTRL-G also shows the number of characters if it differs from the number of bytes. Completion for ":debug" and entering an expression for the '=' register. Skip -":" between range and command name. (Peter winters) +":" between range and command name. (Peter Winters) CTRL-Q in Insert mode now works like CTRL-V by default. Previously it was ignored. @@ -3371,7 +3371,7 @@ Files: runtime/scripts.vim Patch 7.0.050 Problem: After using the netbeans interface close command a stale pointer may be used. -Solution: Clear the pointer to the closed buffer. (Xaview de Gaye) +Solution: Clear the pointer to the closed buffer. (Xavier de Gaye) Files: src/netbeans.c Patch 7.0.051 (after 7.0.44) @@ -16272,7 +16272,7 @@ Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok Patch 7.3.1026 Problem: New regexp: pattern that includes a new-line matches too early. - (john McGowan) + (John McGowan) Solution: Do not start searching in the second line. Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok 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 5c34616ec6..aa5c5bc1a8 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. @@ -481,7 +481,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 82f4838a6f..362cd3d88c 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 diff --git a/runtime/tutor/tutor.es b/runtime/tutor/tutor.es index 832ad04ced..268c40cd95 100644 --- a/runtime/tutor/tutor.es +++ b/runtime/tutor/tutor.es @@ -542,7 +542,7 @@ Nota: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lección 5.3: UN MANDATO DE ESCRITURA SELECTIVO - ** Para guardar parte del fuchero escriba :#,# NOMBRE_DEL_FICHERO ** + ** Para guardar parte del fichero escriba :#,# NOMBRE_DEL_FICHERO ** 1. Escriba de nuevo, una vez más, :!dir o :!ls para obtener una lista diff --git a/runtime/tutor/tutor.it b/runtime/tutor/tutor.it index 8fd13268f6..57d578fb0a 100644 --- a/runtime/tutor/tutor.it +++ b/runtime/tutor/tutor.it @@ -523,7 +523,7 @@ NOTA: La posizione del cursore si vede nell'angolo in basso a destra dello schiacciato mentre premi la lettera o). Ripeti CTRL-O per andare ancora indietro. Puoi usare CTRL-I per tornare in avanti. -NOTA: "errroore" non è il modo giusto di digitare errore; errroore è un errore. +---> "errroore" non è il modo giusto di digitare errore; errroore è un errore. NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio del file, a meno che l'opzione 'wrapscan' sia stata disattivata. @@ -730,7 +730,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. 4. Per aprire una linea SOPRA il cursore, batti una O maiuscola, invece che una o minuscola. Prova sulla linea qui sotto. -Apri una linea SOPRA questa battendo O mentre il cursore è su questa linea. +---> Apri una linea SOPRA questa battendo O mentre il cursore è su questa linea. diff --git a/runtime/tutor/tutor.it.utf-8 b/runtime/tutor/tutor.it.utf-8 index 076aac3e6a..74c8120bd1 100644 --- a/runtime/tutor/tutor.it.utf-8 +++ b/runtime/tutor/tutor.it.utf-8 @@ -523,7 +523,7 @@ NOTA: La posizione del cursore si vede nell'angolo in basso a destra dello schiacciato mentre premi la lettera o). Ripeti CTRL-O per andare ancora indietro. Puoi usare CTRL-I per tornare in avanti. -NOTA: "errroore" non è il modo giusto di digitare errore; errroore è un errore. +---> "errroore" non è il modo giusto di digitare errore; errroore è un errore. NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio del file, a meno che l'opzione 'wrapscan' sia stata disattivata. @@ -730,7 +730,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. 4. Per aprire una linea SOPRA il cursore, batti una O maiuscola, invece che una o minuscola. Prova sulla linea qui sotto. -Apri una linea SOPRA questa battendo O mentre il cursore è su questa linea. +---> Apri una linea SOPRA questa battendo O mentre il cursore è su questa linea. diff --git a/runtime/tutor/tutor.pt b/runtime/tutor/tutor.pt index b7c74f5709..38c5929790 100644 --- a/runtime/tutor/tutor.pt +++ b/runtime/tutor/tutor.pt @@ -1,36 +1,36 @@ =============================================================================== -= B e m V i n d o a o V I M T u t o r - Versão 1.7 pt_BR = += B e m - v i n d o ao t u t o r i a l do V I M - Versão 1.8 pt_BR = =============================================================================== Vim é um poderoso editor que possui muitos comandos, tantos que seria - impossível ensinar num tutorial como este. Este tutorial é planejado para - apresentar os comandos suficientes para você ficar habilitado a usar - facilmente o Vim como um editor de textos genérico. + impossível ensiná-los num tutorial como este, que é concebido para + apresentar os comandos suficientes para permiti-lo usar facilmente o + Vim como um editor de textos genérico. - O tempo aproximado requerido para completar o tutorial é de 25-30 minutos, + O tempo necessário para completar o tutorial é de cerca de 25-30 minutos, dependendo de quanto tempo é gasto praticando os comandos. ATENÇÃO: - Os comandos nas lições vão modificar o texto. Utilize uma cópia deste - arquivo para praticar os comandos (se você iniciou o "vimtutor", esta já + Os comandos nas lições modificam este texto. Faça uma cópia deste + arquivo para praticar os comandos (se usou o "vimtutor", esta já é uma cópia). - É importante lembrar que este tutorial é planejado para ensinar através da + É importante lembrar que este tutorial é concebido para ensinar pela prática. Isso significa que você precisa executar os comandos para aprendê-los adequadamente. Se você somente ler o texto, esquecerá os comandos! Agora, certifique-se de que sua tecla Shift-Lock (ou Caps Lock) não esteja ativada e pressione a tecla j o bastante para mover o cursor até que a - Lição 1.1 esteja completamente na tela. + Lição 1.1 apareça inteiramente na tela. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.1: MOVENDO O CURSOR + Lição 1.1: MOVER O CURSOR ** Para mover o cursor, pressione as teclas h,j,k,l conforme indicado. ** ^ - k Dica: A tecla h está à esquerda e move para a esquerda. - < h l > A tecla l está à direita e move para a direita. + k Dica: A tecla h está à esquerda e move à esquerda. + < h l > A tecla l está à direita e move à direita. j A tecla j se parece com uma seta para baixo. v 1. Mova o cursor pela tela até que você se sinta confortável. @@ -38,30 +38,29 @@ 2. Segure pressionada a tecla (j) até haver repetição. Agora você já sabe como ir para a próxima lição. - 3. Usando a tecla j, mova até a lição 1.2. + 3. Usando a tecla j, vá para a Lição 1.2. -NOTA: Se você está inseguro sobre o que digitou, pressione para - colocá-lo no modo Normal. Então redigite o comando que você queria. +NOTA: Se está inseguro sobre o que digitou, pressione para + colocá-lo no modo Normal. Então redigite o comando que queria. -NOTA: As teclas de cursor devem funcionar também. Mas usando hjkl, tão logo +NOTA: As teclas de cursor funcionam também. Mas usando hjkl, tão logo esteja acostumado, você poderá se mover muito mais rapidamente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.2: SAINDO DO VIM + Lição 1.2: SAIR DO VIM - !! NOTA: Antes de executar qualquer dos passos abaixo, leia a lição inteira !! + !! NOTA: Antes de executar quaisquer dos passos abaixo, leia a lição inteira !! 1. Pressione (para ter certeza de que está no modo Normal). - 2. Digite :q! . - Isso sai do editor SEM salvar qualquer mudança que tenha sido feita. - Se quiser salvar as alterações e sair, digite :wq + 2. Digite: :q! . + Assim, sai do editor SEM salvar qualquer mudança feita. - 3. Repita o procedimento que lhe trouxe a este tutorial. O procedimento pode + 3. Repita o procedimento que o trouxe a este tutorial. O procedimento pode ter sido a digitação de: vimtutor . - 4. Se você memorizou estes passos e está confiante, execute os passos de + 4. Se memorizou estes passos e está confiante, execute os passos de 1 a 3 para sair e reentrar no editor. NOTA: :q! descarta qualquer mudança. Em uma próxima lição será @@ -70,9 +69,9 @@ NOTA: :q! descarta qualquer mudan 5. Desça o cursor até a Lição 1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.3: EDITANDO TEXTOS - DELEÇÃO + Lição 1.3: EDITAR TEXTOS - REMOÇÃO - ** No modo Normal, pressione x para deletar o caractere sob o cursor. ** + ** Pressione x para deletar o caractere sob o cursor. ** 1. Mova o cursor para a linha abaixo marcada com --->. @@ -80,47 +79,47 @@ NOTA: :q! descarta qualquer mudan 2. Para corrigir os erros, mova o cursor até que ele esteja sobre o caractere a ser deletado. - 3. Pressione a tecla x para deletar o caractere indesejado. + 3. Pressione a tecla x para remover o caractere incorreto. - 4. Repita os passos 2 até 4 até que a sentença esteja correta. + 4. Repita os passos 2 até 4 até que a frase esteja correta. ---> A vvaca pullouu por ccimaa dda luuua. - 5. Agora que a sentença está correta, vá para a Lição 1.4. + 5. Agora que a frase está correta, prossiga para a Lição 1.4. NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.4: EDITANDO TEXTOS - INSERÇÃO + Lição 1.4: EDITAR TEXTOS - INSERÇÃO ** Pressione i para inserir texto. ** 1. Mova o cursor até a primeira linha abaixo marcada com --->. - 2. Para fazer a primeira linha ficar igual à segunda, mova o cursor para + 2. Para deixar a primeira linha igual à segunda, mova o cursor para o primeiro caractere DEPOIS de onde o texto deverá ser inserido. 3. Pressione i e digite as adições necessárias. 4. Assim que cada erro for corrigido pressione para retornar ao modo - Normal. Repita os passos 2 até 4 para corrigir a sentença. + Normal. Repita os passos 2 até 4 para corrigir a frase. ----> Tem text fatado desta . ----> Tem algum texto faltando desta linha. +---> Tem text fatado nesta . +---> Tem algum texto faltando nesta linha. - 5. Quando se sentir confortável com a inserção de texto, mova o cursor para - a lição 1.5. + 5. Quando se sentir à vontade com a inserção de texto, mova o cursor para + a Lição 1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.5: EDITANDO TEXTO - ADICIONANDO + Lição 1.5: EDITAR TEXTO - ADICIONAR ** Pressione A para adicionar texto. ** - 1. Mova o curso para a primeira linha abaixo marcada com --->. + 1. Mova o cursor para a primeira linha abaixo marcada com --->. Não importa sobre qual caractere o cursor estará na linha. 2. Pressione A e digite as adições necessárias. @@ -128,41 +127,41 @@ NOTA: Enquanto segue este tutorial, n 3. Quando adicionar o texto, pressione para retornar ao modo Normal. 4. Mova o cursor para a segunda linha marcada ---> e repita os passos 2 e 3 - para corrigir o texto. + para corrigir a frase. ----> Há algum texto faltando des - Há algum texto faltando desta linha. +---> Há algum texto faltando nes + Há algum texto faltando nesta linha. Há algum texto faltan ---> Há algum texto faltando aqui. - 5. Quando se sentir confortável adicionando texto, mova para a lição 1.6. + 5. Quando se sentir confortável adicionando texto, vá para a Lição 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.6: EDITANDO UM ARQUIVO + Lição 1.6: EDITAR UM ARQUIVO + ** Use :wq para salvar um arquivo e sair. ** - !! NOTA: Antes de executar qualquer um dos passos abaixo, - leia esta lição completamente!! + !! NOTA: Leia toda a lição antes de executar as instruções!! 1. Saia deste tutorial como o fez na lição 1.2: :q! Ou, se tiver acesso a outro terminal, faça o seguinte nele. 2. No prompt do shell, digite esse comando: vim tutor - 'vim' is é comando para iniciar o editor Vim e 'tutor' é o nome do - arquivo que você deseja editar. Use um arquivo que possa ser modificado. + 'vim' é o comando para iniciar o editor Vim e 'tutor' é o nome do + arquivo que você quer editar. Use um arquivo que possa ser modificado. - 3. Insira e delete texto tal como aprendeu com as lições anteriores. + 3. Insira e apague texto tal como aprendeu nas lições anteriores. 4. Salve o arquivo com as mudanças e saia do Vim com: :wq - 5. Se você tiver saído do vimtutor no passo 1, reinicie o vimtutor e vá para - o sumário seguinte. + 5. Se tiver saído do vimtutor no passo 1, reinicie o vimtutor e vá para + o resumo seguinte. 6. Após ler os passos acima e compreendê-los, execute-os. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SUMÁRIO DA LIÇÃO 1 + RESUMO DA LIÇÃO 1 1. O cursor é movido usando tanto as teclas de seta quanto as teclas hjkl. h (esquerda) j (para baixo) k (para cima) l (direita) @@ -185,9 +184,9 @@ NOTA: Pressionando voc Agora continue com a Lição 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.1: COMANDOS DE DELEÇÃO + Lição 2.1: COMANDOS DE REMOÇÃO - ** Digite dw para deletar até o final de uma palavra. ** + ** Digite dw para apagar uma palavra. ** 1. Pressione para ter certeza de que está no modo Normal. @@ -198,19 +197,19 @@ Agora continue com a Li 4. Digite dw para fazer a palavra desaparecer. - NOTA: A letra d vai aparece na última linha da tela enquanto você a - digita. O Vim está lhe esperando digitar um w . Se você digitou + NOTA: A letra d vai aparecer na última linha da tela enquanto você a + digita. O Vim o está esperando digitar um w . Se digitou alguma coisa errada, pressione e comece de novo. ----> Tem a algumas oi palavras diversão que não pertencem papel a esta sentença. +---> Tem a algumas oi palavras diversão que não pertencem papel a esta frase. - 5. Repita os passos 3 ao 4 até que a sentença esteja correta e vá para a + 5. Repita os passos 3 ao 4 até que a frase esteja correta e vá para a Lição 2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.2: MAIS COMANDOS DE DELEÇÃO + Lição 2.2: MAIS COMANDOS DE REMOÇÃO - ** Digite d$ para deletar até o final da linha. ** + ** Digite d$ para deletar até o fim da linha. ** @@ -218,13 +217,13 @@ Agora continue com a Li 2. Mova o cursor até a linha abaixo marcada com --->. - 3. Mova o cursor até o fim da linha correta (DEPOIS do primeiro .). + 3. Mova o cursor até o fim da linha correta (DEPOIS do primeiro . ). - 4. Digite d$ para deletar até o final da linha. + 4. Digite d$ para apagar até o fim da linha. ----> Alguém digitou o final desta linha duas vezes. desta linha duas vezes. +---> Alguém digitou o fim desta linha duas vezes. desta linha duas vezes. - 5. Vá para a lição 2.3 para entender o que está acontecendo. + 5. Vá para a lição 2.3 para entender o funcionamento deste comando. @@ -233,30 +232,31 @@ Agora continue com a Li ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lição 2.3: SOBRE OPERADORES E MOVIMENTOS - Muitos comandos que mudam texto são feitos de um operador e um movimento. - O formato para um comando deletar com o operador de deleção d tem a + Muitos comandos que mudam texto são feitos de um operador e de um movimento. + O formato para um comando apagar com o operador de remoção d tem a seguinte forma: d movimento + Onde: - d - é o operador deletar. - movimento - é como o operador vai operar (listado abaixo). + d - é o operador apagar. + movimento - é o movimento sobre o qual o operador age (listado abaixo). Uma pequena lista de teclas de movimento: - w - do cursor até o fim da palavra, incluindo o espaço. - e - do cursor até o fim da palavra, NÃO incluindo o espaço. - $ - do cursor até o fim da linha. + w - até o início da próxima palavra, excluindo seu primeiro caractere. + e - até o fim da palavra atual, incluindo seu último caractere. + $ - até o fim da linha, incluindo seu último caractere. - Portanto, digitando de irá deletar do cursor ao fim da palavra. + Portanto, digitar de apaga do cursor ao fim da palavra. -NOTA: Pressionando apenas a tecla de movimento enquanto em modo Normal, sem o -operador, irá mover o cursor como especificado na lista de teclas de +NOTA: Pressionar apenas a tecla de movimento em modo Normal, sem o +operador, faz o cursor se mover como especificado na lista de teclas de movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.4: USANDO UM CONTADOR PARA UM MOVIMENTO + Lição 2.4: USAR UM CONTADOR PARA UM MOVIMENTO - ** Digitando um número antes de um movimento repete-o muitas vezes. ** + ** Digitar um número antes de um movimento repete-o o tanto de vezes. ** 1. Mova o cursor para o começo da linha marcada com ---> abaixo. @@ -269,7 +269,7 @@ movimento. 5. Repita os passos 2 e 3 com diferentes números. ----> Esta é uma linha com algumas palavras para lhe permitir fazer movimentos. +---> Esta é uma linha com algumas palavras para permiti-lo fazer movimentos. 6. Vá para a Lição 2.5. @@ -277,22 +277,22 @@ movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.5: USANDO UM CONTADOR PARA DELETAR MAIS + Lição 2.5: USAR UM CONTADOR PARA APAGAR MAIS - ** Digitando um número com um operador repete-o esse número de vezes. ** + ** Digitar um número com um operador repete-o esse número de vezes. ** - Você deve inserir um contador entre o operador de deleção e o movimento - mencionados acima para para deletar mais: + Você deve inserir um contador entre o operador de remoção e o de movimento + mencionados acima para apagar mais: d número movimento - 1. Movimente o cursor para a primeira palavra com LETRAS MAIÚSCULAS na + 1. Movimente o cursor para a primeira palavra em LETRAS MAIÚSCULAS na linha marcada com --->. - 2. Digite d2w para deletar as duas palavras com LETRAS MAIÚSCULAS. + 2. Digite d2w para deletar as duas palavras em LETRAS MAIÚSCULAS. 3. Repita os passos 1 e 2 com diferentes contadores para deletar as - palavras de LETRAS MAIÚSCULAS com um comando. + palavras em LETRAS MAIÚSCULAS com um comando. ---> esta ABC DE linha FGHI JK LMN OP de palavras está Q RS TUV limpa. @@ -300,17 +300,17 @@ movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.6: OPERANDO SOBRE LINHAS + Lição 2.6: TRABALHAR COM LINHAS - ** Digite dd para deletar uma linha inteira. ** + ** Digite dd para apagar uma linha inteira. ** - Em virtude da frequência em deletar uma linha inteira, os projetistas do Vi - decidiram que seria mais simples digitar dois d's numa linha para deletá-la. + Em virtude da frequência em deletar uma linha inteira, os desenvolvedores + do Vi decidiram que seria mais simples digitar dois d para apagar uma linha. - 1. Mova o cursor até a segunda linha na lista a baixo. - 2. Digite dd para deletar a linha. + 1. Mova o cursor até a segunda linha da frase abaixo. + 2. Digite dd para apagar a linha. 3. Agora mova até a quarta linha. - 4. Digite 2dd para deletar duas linhas. + 4. Digite 2dd para apagar duas linhas. ---> 1) Rosas são vermelhas, ---> 2) Lama é divertida, @@ -318,92 +318,94 @@ movimento. ---> 4) Eu tenho um carro, ---> 5) Relógios dizem as horas, ---> 6) Açúcar é doce, ----> 7) E assim é você. +---> 7) Assim como você. Notas do tradutor: Lama (mud) em inglês pode significar fofoca, difamação. Há rima no texto original. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lição 2.7: O COMANDO UNDO (DESFAZER) -** Pressione u para desfazer os últimos comandos, U restaura linha inteira.** +** Pressione u para desfazer os últimos comandos, U recupera a linha inteira.** 1. Mova o cursor para a linha abaixo marcada com ---> e posicione-o sobre o primeiro erro. - 2. Digite x para deletar o primeiro caractere indesejado. + 2. Digite x para deletar o primeiro caractere errado. 3. Agora, digite u para desfazer o último comando executado. 4. Desta vez, corrija todos os erros na linha usando o comando x . 5. Agora, digite um U maiúsculo para retornar a linha ao seu estado original. 6. Digite u algumas vezes para desfazer o U e os comandos anteriores. 7. Digite CTRL-R (segurando a tecla CTRL enquanto digita R) algumas vezes - para refazer os comandos (desfazer os undo's). + para refazer os comandos (desfazer os undos). ---> Corriija os erros nnesta linha e reetorne-os com undo. - 8. Esses comandos são muito úteis. Agora vá para o sumário da Lição 2. + 8. Esses comandos são muito úteis. Agora vá para o resumo da Lição 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SUMÁRIO DA LIÇÃO 2 + RESUMO DA LIÇÃO 2 - 1. Para deletar do cursor até o fim de uma palavra digite: dw - 2. Para deletar do cursor até o fim de uma linha digite: d$ - 3. Para deletar uma linha inteira digite: dd - 4. Para repetir um movimento adicione antes um número: 2w + 1. Para apagar do cursor até a próxima palavra, digite: dw + 2. Para apagar do cursor até o fim de uma linha, digite: d$ + 3. Para apagar uma linha inteira, digite: dd + 4. Para repetir um movimento, adicione antes um número: 2w 5. O formato para um comando no modo Normal é: operador [número] movimento onde: - operador - é o que será feito, como d para deletar - número - é quantas vezes o comando será repetido - movimento - movimento sobre o texto que sofrerá a operação, como - w (palavra), $ (até o final da linha), etc. + operador - é o que será feito, como d para apagar + [número] - quantas vezes o comando será repetido + movimento - movimento sobre o texto que receberá a operação, como + w (palavra), $ (até o fim da linha), etc. + + 6. Para ir ao início da linha, use um zero: 0 - 5. Para desfazer um ação anterior, digite: u (minúsculo) - Para desfazer todas as modificações em uma linha digite: U (maiúsculo) - Para desfazer o que foi desfeito digite: CTRL-R + 7. Para desfazer uma ação anterior, digite: u (minúsculo) + Para desfazer todas as alterações em uma linha, digite: U (maiúsculo) + Para desfazer o que foi desfeito, digite: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 3.1: O COMANDO PUT (PÔR) + Lição 3.1: O COMANDO COLAR - ** Digite p para colocar a última deleção após o cursor. ** + ** Digite p para colar após o cursor o que acabou de apagar. ** - 1. Mova o cursor até a primeira linha na lista abaixo. + 1. Mova o cursor até a primeira linha marcada com --->. - 2. Digite dd para deletar a linha e guardá-la no buffer do Vim. + 2. Digite dd para apagar a linha e guardá-la num registro do Vim. - 3. Mova o cursor até a linha ACIMA de onde a linha deletada deve ficar. + 3. Mo