diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-26 21:44:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-26 21:44:46 +0100 |
commit | 0c0734d527a132edfb4089be48486586424b3f41 (patch) | |
tree | 6dc04964a23e8c85be6283a1642c06f2003bc7c2 /runtime/doc | |
parent | fc4ea2a72d36de1196a3ce17352e72f8fe90f4bb (diff) |
Update runtime files
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/cmdline.txt | 2 | ||||
-rw-r--r-- | runtime/doc/develop.txt | 14 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 16 | ||||
-rw-r--r-- | runtime/doc/options.txt | 35 | ||||
-rw-r--r-- | runtime/doc/sign.txt | 2 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 8 | ||||
-rw-r--r-- | runtime/doc/tags | 8 | ||||
-rw-r--r-- | runtime/doc/terminal.txt | 4 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 32 | ||||
-rw-r--r-- | runtime/doc/usr_01.txt | 12 | ||||
-rw-r--r-- | runtime/doc/usr_02.txt | 36 | ||||
-rw-r--r-- | runtime/doc/usr_03.txt | 66 | ||||
-rw-r--r-- | runtime/doc/usr_04.txt | 72 | ||||
-rw-r--r-- | runtime/doc/usr_10.txt | 9 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 2 |
15 files changed, 160 insertions, 158 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index ab0e682533..ce14c59fef 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 8.1. Last change: 2019 Sep 27 +*cmdline.txt* For Vim version 8.1. Last change: 2019 Nov 26 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 59e44dcaab..6ced5156cb 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 8.1. Last change: 2019 Aug 05 +*develop.txt* For Vim version 8.1. Last change: 2019 Nov 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -195,10 +195,14 @@ problems for existing patches. Only use them for new and changed code. Comments ~ -Traditionally Vim uses /* comments */. We intend to keep it that way, -especially for file and function headers. For new code or lines of code that -change, it is allowed to use // comments. Especially when it comes after -code: +Traditionally Vim uses /* comments */. We intend to keep it that way +for file and function headers and larger blocks of code, E.g.: + /* + * The "foo" argument does something useful. + * Return OK or FAIL. + */ +For new code or lines of code that change, it is preferred to use // comments. +Especially when it comes after code: int some_var; // single line comment useful here Enums ~ diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 5936437af1..b5460ffe3d 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.1. Last change: 2019 Nov 24 +*eval.txt* For Vim version 8.1. Last change: 2019 Nov 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -7642,16 +7642,17 @@ range({expr} [, {max} [, {stride}]]) *range()* rand([{expr}]) *rand()* Return a pseudo-random Number generated with an xorshift - algorithm using seed {expr}. {expr} can be initialized by - |srand()| and will be updated by rand(). - If {expr} is omitted, an internal seed value is used and - updated. + algorithm using seed {expr}. The returned number is 32 bits, + also on 64 bits systems, for consistency. + {expr} can be initialized by |srand()| and will be updated by + rand(). If {expr} is omitted, an internal seed value is used + and updated. Examples: > :echo rand() :let seed = srand() :echo rand(seed) - :echo rand(seed) + :echo rand(seed) % 16 " random number 0 - 15 < *readdir()* readdir({directory} [, {expr}]) @@ -9149,7 +9150,8 @@ sqrt({expr}) *sqrt()* srand([{expr}]) *srand()* Initialize seed used by |rand()|: - If {expr} is not given, seed values are initialized by - time(NULL) a.k.a. epoch time. + time(NULL) a.k.a. epoch time. This only has second + accuracy. - If {expr} is given, return seed values which x element is {expr}. This is useful for testing or when a predictable sequence is expected. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b3d7579924..f4fc249b1e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.1. Last change: 2019 Nov 10 +*options.txt* For Vim version 8.1. Last change: 2019 Nov 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1195,7 +1195,7 @@ A jump table for the options with a short description can be found at |Q_op|. (mostly used in |Normal-mode| or |Cmdline-mode|). esc hitting <Esc> in |Normal-mode|. ex In |Visual-mode|, hitting |Q| results in an error. - hangul Error occurred when using hangul input. + hangul Ignored. insertmode Pressing <Esc> in 'insertmode'. lang Calling the beep module for Lua/Mzscheme/TCL. mess No output available for |g<|. @@ -1920,7 +1920,7 @@ A jump table for the options with a short description can be found at |Q_op|. {only works when compiled with the |+textprop| feature} popuphidden - Just like "popup" but initially hide the popup. Use a + Just like "popup" but initially hide the popup. Use a |CompleteChanged| autocommand to fetch the info and call |popup_show()| once the popup has been filled. See the example at |complete-popuphidden|. @@ -6574,12 +6574,11 @@ A jump table for the options with a short description can be found at |Q_op|. of this option). The default is ">". For Unix, if the 'shell' option is "csh" or "tcsh" during initializations, the default becomes ">&". If the - 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", - "zsh-beta","bash" or "fish", the default becomes ">%s 2>&1". This - means that stderr is also included. For Win32, the Unix checks are - done and additionally "cmd" is checked for, which makes the default - ">%s 2>&1". Also, the same names with ".exe" appended are checked - for. + 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta", + "bash" or "fish", the default becomes ">%s 2>&1". This means that + stderr is also included. For Win32, the Unix checks are done and + additionally "cmd" is checked for, which makes the default ">%s 2>&1". + Also, the same names with ".exe" appended are checked for. The initialization of this option is done after reading the ".vimrc" and the other initializations, so that when the 'shell' option is set there, the 'shellredir' option changes automatically unless it was @@ -7255,7 +7254,7 @@ A jump table for the options with a short description can be found at |Q_op|. { NF Evaluate expression between '%{' and '}' and substitute result. Note that there is no '%' before the closing '}'. The expression cannot contain a '}' character, call a function to - work around that. + work around that. See |stl-%{| below. ( - Start of item group. Can be used for setting the width and alignment of a section. Must be followed by %) somewhere. ) - End of item group. No width fields allowed. @@ -7289,13 +7288,13 @@ A jump table for the options with a short description can be found at |Q_op|. :set statusline=...%(\ [%M%R%H]%)... < Beware that an expression is evaluated each and every time the status line is displayed. - *g:actual_curbuf* *g:actual_curwin* - The current buffer and current window will be set temporarily to that - of the window (and buffer) whose statusline is currently being drawn. - The expression will evaluate in this context. The variable - "g:actual_curbuf" is set to the `bufnr()` number of the real current - buffer and "g:actual_curwin" to the |window-ID| of the real current - window. These values are strings. + *stl-%{* *g:actual_curbuf* *g:actual_curwin* + While evaluationg %{} the current buffer and current window will be + set temporarily to that of the window (and buffer) whose statusline is + currently being drawn. The expression will evaluate in this context. + The variable "g:actual_curbuf" is set to the `bufnr()` number of the + real current buffer and "g:actual_curwin" to the |window-ID| of the + real current window. These values are strings. The 'statusline' option will be evaluated in the |sandbox| if set from a modeline, see |sandbox-option|. @@ -8951,6 +8950,8 @@ A jump table for the options with a short description can be found at |Q_op|. fail (and make sure not to exit Vim until the write was successful). See |backup-table| for another explanation. When the 'backupskip' pattern matches, a backup is not made anyway. + Depending on 'backupcopy' the backup is a new file or the original + file renamed (and a new file is written). NOTE: This option is set to the default value when 'compatible' is set. diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 093519e284..972b43c192 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -373,7 +373,7 @@ sign_define({list}) The one argument {list} can be used to define a list of signs. Each list item is a dictionary with the above items in {dict} - and a 'name' item for the sign name. + and a "name" item for the sign name. Returns 0 on success and -1 on failure. When the one argument {list} is used, then returns a List of values one for each diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2d18263151..3ec4acf1c3 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.1. Last change: 2019 Nov 14 +*syntax.txt* For Vim version 8.1. Last change: 2019 Nov 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2771,10 +2771,10 @@ To set a user-defined list of code block syntax highlighting: > To assign multiple code block types to a single syntax, define `rst_syntax_code_list` as a mapping: > let rst_syntax_code_list = { - \ 'cpp' = ['cpp', 'c++'], - \ 'bash' = ['bash', 'sh'], + \ 'cpp': ['cpp', 'c++'], + \ 'bash': ['bash', 'sh'], ... - } + \ } To use color highlighting for emphasis text: > let rst_use_emphasis_colors = 1 diff --git a/runtime/doc/tags b/runtime/doc/tags index 3bbdc0663e..15c37fccfc 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -5557,6 +5557,8 @@ c_CTRL-R_CTRL-O cmdline.txt /*c_CTRL-R_CTRL-O* c_CTRL-R_CTRL-P cmdline.txt /*c_CTRL-R_CTRL-P* c_CTRL-R_CTRL-R cmdline.txt /*c_CTRL-R_CTRL-R* c_CTRL-R_CTRL-W cmdline.txt /*c_CTRL-R_CTRL-W* +c_CTRL-SHIFT-Q cmdline.txt /*c_CTRL-SHIFT-Q* +c_CTRL-SHIFT-V cmdline.txt /*c_CTRL-SHIFT-V* c_CTRL-T cmdline.txt /*c_CTRL-T* c_CTRL-U cmdline.txt /*c_CTRL-U* c_CTRL-V cmdline.txt /*c_CTRL-V* @@ -7253,6 +7255,7 @@ i_CTRL-R_= insert.txt /*i_CTRL-R_=* i_CTRL-R_CTRL-O insert.txt /*i_CTRL-R_CTRL-O* i_CTRL-R_CTRL-P insert.txt /*i_CTRL-R_CTRL-P* i_CTRL-R_CTRL-R insert.txt /*i_CTRL-R_CTRL-R* +i_CTRL-SHIFT-V insert.txt /*i_CTRL-SHIFT-V* i_CTRL-T insert.txt /*i_CTRL-T* i_CTRL-U insert.txt /*i_CTRL-U* i_CTRL-V insert.txt /*i_CTRL-V* @@ -7382,6 +7385,7 @@ interfaces-5.2 version5.txt /*interfaces-5.2* internal-variables eval.txt /*internal-variables* internal-wordlist spell.txt /*internal-wordlist* internet intro.txt /*internet* +interrupt() eval.txt /*interrupt()* intro intro.txt /*intro* intro.txt intro.txt /*intro.txt* inverse syntax.txt /*inverse* @@ -8517,6 +8521,7 @@ quotestar gui.txt /*quotestar* quote~ change.txt /*quote~* r change.txt /*r* r.vim syntax.txt /*r.vim* +rand() eval.txt /*rand()* range() eval.txt /*range()* raw-terminal-mode term.txt /*raw-terminal-mode* rcp pi_netrw.txt /*rcp* @@ -8938,6 +8943,7 @@ sqlj ft_sql.txt /*sqlj* sqlserver ft_sql.txt /*sqlserver* sqlsettype ft_sql.txt /*sqlsettype* sqrt() eval.txt /*sqrt()* +srand() eval.txt /*srand()* sscanf eval.txt /*sscanf* standard-plugin usr_05.txt /*standard-plugin* standard-plugin-list help.txt /*standard-plugin-list* @@ -8957,6 +8963,7 @@ state() eval.txt /*state()* static-tag tagsrch.txt /*static-tag* status-line windows.txt /*status-line* statusmsg-variable eval.txt /*statusmsg-variable* +stl-%{ options.txt /*stl-%{* str2float() eval.txt /*str2float()* str2list() eval.txt /*str2list()* str2nr() eval.txt /*str2nr()* @@ -8977,6 +8984,7 @@ string-match eval.txt /*string-match* strlen() eval.txt /*strlen()* strpart() eval.txt /*strpart()* strpbrk() eval.txt /*strpbrk()* +strptime() eval.txt /*strptime()* strrchr() eval.txt /*strrchr()* strridx() eval.txt /*strridx()* strspn() eval.txt /*strspn()* diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index d83035cc77..4dcf2be1b6 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1046,12 +1046,12 @@ file for now, e.g.: > The test will then fail, giving you the command to compare the reference dump and the failed dump, e.g.: > - call term_dumpdiff("Test_func.dump.failed", "dumps/Test_func.dump") + call term_dumpdiff("failed/Test_func.dump", "dumps/Test_func.dump") Use this command in Vim, with the current directory set to src/testdir. Once you are satisfied with the test, move the failed dump in place of the reference: > - :!mv Test_func.dump.failed dumps/Test_func.dump + :!mv failed/Test_func.dump dumps/Test_func.dump Creating a screen dump ~ diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 33e608d582..4efcf135d4 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.1. Last change: 2019 Nov 19 +*todo.txt* For Vim version 8.1. Last change: 2019 Nov 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,10 +38,7 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- -Patch 2314 for vi' causes a new problem. #5247 - -Patch from Namsh to allow building with both XIM and hangulin. (2019 Aug 29) - +For rand() use http://prng.di.unimi.it/xoshiro128starstar.c ? Popup windows: - Use popup (or popup menu) for command line completion @@ -49,7 +46,7 @@ Popup windows: - Make redrawing more efficient and avoid flicker: - put popup menu also in popup_mask? - Any other commands to disable in a popup window? - Use ERROR_IF_POPUP_WINDOW for more commands. + Use ERROR_IF_POPUP_WINDOW for these. - Figure out the size and position better. if wrapping splits a double-wide character if wrapping inserts indent @@ -62,8 +59,6 @@ Text properties: - See remarks at top of src/textprop.c 'incsearch' with :s: -- Get E20 when using command history to get "'<,'>s/a/b" and no Visual area - was set. (issue #3837) - :s/foo using CTRL-G moves to another line, should not happen, or use the correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345) - :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637) @@ -137,20 +132,14 @@ Motif: Build on Ubuntu can't enter any text in dialog text fields. Patch to properly break CJK lines: Anton Kochkov, #3875 Flag in 'formatoptions' is not used in the tests. -Remove check for cmd_silent when calling search_stat()? (Gary Johnson) - undo result wrong: Masato Nishihata, #4798 Undo puts cursor in wrong line after "cG<Esc>" undo. Sound: support on Mac? Or does libcanberra work there? -Patch to user manual: #5098. Comments by DC Slagel: -- semicolon use should be OK. -- Keep capital after colon. - -Patch to fix session file when using multiple tabs. (Jason Franklin, 2019 May -20) +Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019 +May 20) Also put :argadd commands at the start for all buffers, so that their order remains equal? Then %argdel to clean it up. Do try this with 'hidden' set. Also #4994: window-local options not always restored, related to using :badd. @@ -198,15 +187,9 @@ with packages under "start". (xtal8, #1994) Modeless selection doesn't work in gvim. (#4783) Caused by patch 8.1.1534. -Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10) -Alternative from Christian Brabandt. (2010 Sep 19) -New one from Yasuhiro Matsumoto, #1277. - Visual highlight not removed when 'dipslay' is "lastline" and line doesn't fit. (Kevin Lawler, #4457) -Patch to add interrupt(). (Yasuhiro Matsumoto, #2834) - Patch to add per-tabpage and per-window previous directory: "lcd -" and "tcd -". (Yegappan Lakshmanan, #4362) @@ -239,7 +222,7 @@ Add a WindowScrolled event. Trigger around the same time as CursorMoved. Can be used to update highlighting. #3127 #5181 Patch for Template string: #4491. New pull: #4634 -Have another look at the implementation: Is the code worth it? +Implementation is too inefficient, avoid using lambda. Incorrect formatting with autoindent. (Sebastian Gniazdowski, #4909) @@ -559,9 +542,6 @@ How would we know that the status line needs to be updated? Adjust windows installer explanation of behavior. (scootergrisen, #3310) -Set g:actual_curbuf when evaluating 'statusline', not just with an expression. -(Daniel Hahler, 2018 Aug 8, #3299) - Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10). Feedback from someone who uses this? diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index f7abd9cf4d..49bf4f5940 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -1,4 +1,4 @@ -*usr_01.txt* For Vim version 8.1. Last change: 2017 Jul 15 +*usr_01.txt* For Vim version 8.1. Last change: 2019 Nov 21 VIM USER MANUAL - by Bram Moolenaar @@ -41,11 +41,11 @@ the commands and options used for it. Use these two commands: Press CTRL-O to jump back (repeat to go further back). Many links are in vertical bars, like this: |bars|. The bars themselves may -be hidden or invisible, see below. An option name, like 'number', a command +be hidden or invisible; see below. An option name, like 'number', a command in double quotes like ":write" and any other word can also be used as a link. Try it out: Move the cursor to CTRL-] and press CTRL-] on it. -Other subjects can be found with the ":help" command, see |help.txt|. +Other subjects can be found with the ":help" command; see |help.txt|. The bars and stars are usually hidden with the |conceal| feature. They also use |hl-Ignore|, using the same color for the text as the background. You can @@ -101,14 +101,14 @@ For more info see |vimrc| and |compatible-default|. alternative called "evim" (easy Vim). This is still Vim, but used in a way that resembles a click-and-type editor like Notepad. It always stays in Insert mode, thus it feels very different. It is not - explained in the user manual, since it should be mostly self - explanatory. See |evim-keys| for details. + explained in the user manual, since it should be mostly + self-explanatory. See |evim-keys| for details. ============================================================================== *01.3* Using the Vim tutor *tutor* *vimtutor* Instead of reading the text (boring!) you can use the vimtutor to learn your -first Vim commands. This is a 30 minute tutorial that teaches the most basic +first Vim commands. This is a 30-minute tutorial that teaches the most basic Vim functionality hands-on. On Unix, if Vim has been properly installed, you can start it from the shell: diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index b9e968e259..8d3ddeee6a 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 8.1. Last change: 2017 Mar 14 +*usr_02.txt* For Vim version 8.1. Last change: 2019 Nov 21 VIM USER MANUAL - by Bram Moolenaar @@ -255,11 +255,11 @@ restores the character. g intelligent turtle ~ -The next u command restores the next-to-last character deleted: +The next "u" command restores the next-to-last character deleted: ng intelligent turtle ~ -The next u command gives you the u, and so on: +The next "u" command gives you the u, and so on: ung intelligent turtle ~ oung intelligent turtle ~ @@ -375,7 +375,7 @@ To exit, use the "ZZ" command. This command writes the file and exits. Unlike many other editors, Vim does not automatically make a backup file. If you type "ZZ", your changes are committed and there's no turning back. You can configure the Vim editor to produce backup - files, see |07.4|. + files; see |07.4|. DISCARDING CHANGES @@ -398,7 +398,7 @@ message and refuse to exit: E37: No write since last change (use ! to override) ~ By specifying the override, you are in effect telling Vim, "I know that what -I'm doing looks stupid, but I'm a big boy and really want to do this." +I'm doing looks stupid, but I really want to do this." If you want to continue editing with Vim: The ":e!" command reloads the original version of the file. @@ -551,7 +551,7 @@ Summary: *help-summary* > command argument %: > :help c_% -8) Ex-commands always start with ":", so to go to the :s command help: > +8) Ex-commands always start with ":", so to go to the ":s" command help: > :help :s 9) Commands specifically for debugging start with ">". To go to the help @@ -561,22 +561,23 @@ Summary: *help-summary* > 10) Key combinations. They usually start with a single letter indicating the mode for which they can be used. E.g.: > :help i_CTRL-X -< takes you to the family of Ctrl-X commands for insert mode which can be - used to auto complete different things. Note, that certain keys will +< takes you to the family of CTRL-X commands for insert mode which can be + used to auto-complete different things. Note, that certain keys will always be written the same, e.g. Control will always be CTRL. For normal mode commands there is no prefix and the topic is available at :h CTRL-<Letter>. E.g. > :help CTRL-W < In contrast > :help c_CTRL-R -< will describe what the Ctrl-R does when entering commands in the Command +< will describe what the CTRL-R does when entering commands in the Command line and > - :help v_Ctrl-A + :help v_CTRL-A < talks about incrementing numbers in visual mode and > :help g_CTRL-A -< talks about the g<C-A> command (e.g. you have to press "g" then <Ctrl-A>). - Here the "g" stand for the normal command "g" which always expects a second - key before doing something similar to the commands starting with "z" +< talks about the "g<C-A>" command (e.g. you have to press "g" then + <CTRL-A>). Here the "g" stand for the normal command "g" which always + expects a second key before doing something similar to the commands + starting with "z" 11) Regexp items always start with /. So to get help for the "\+" quantifier in Vim regexes: > @@ -647,15 +648,16 @@ Summary: *help-summary* > < Also if you want to access a certain chapter in the help, the chapter number can be accessed directly like this: > :help 10.1 -< goes to chapter 10.1 in |usr_10.txt| and talks about recording macros. +< which goes to chapter 10.1 in |usr_10.txt| and talks about recording + macros. 19) Highlighting groups. Always start with hl-groupname. E.g. > :help hl-WarningMsg < talks about the WarningMsg highlighting group. -20) Syntax highlighting is namespaced to :syn-topic e.g. > +20) Syntax highlighting is namespaced to :syn-topic. E.g. > :help :syn-conceal -< talks about the conceal argument for the :syn command. +< talks about the conceal argument for the ":syn" command. 21) Quickfix commands usually start with :c while location list commands usually start with :l @@ -688,7 +690,7 @@ Summary: *help-summary* > < takes you exactly to the description of the swap error message and > :help W10 < talks about the warning "Changing a readonly file". - Sometimes however, those error codes are not described, but rather are + Sometimes, however, those error codes are not described, but rather are listed at the Vim command that usually causes this. So: > :help E128 < takes you to the |:function| command diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index 5c204f03f7..48f71bff68 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -1,4 +1,4 @@ -*usr_03.txt* For Vim version 8.1. Last change: 2017 Jul 21 +*usr_03.txt* For Vim version 8.1. Last change: 2019 Nov 21 VIM USER MANUAL - by Bram Moolenaar @@ -81,8 +81,8 @@ The "$" command moves the cursor to the end of a line. If your keyboard has an <End> key it will do the same thing. The "^" command moves to the first non-blank character of the line. The "0" -command (zero) moves to the very first character of the line. The <Home> key -does the same thing. In a picture: +command (zero) moves to the very first character of the line, and the <Home> +key does the same thing. In a picture: ^ <------------ @@ -221,7 +221,8 @@ you can see? This figure shows the three commands you can use: L --> | text sample text | +---------------------------+ -Hints: "H" stands for Home, "M" for Middle and "L" for Last. +Hints: "H" stands for Home, "M" for Middle and "L" for Last. Alternatively, +"H" for high, "M" for Middle and "L" for low. ============================================================================== *03.6* Telling where you are @@ -298,22 +299,22 @@ To scroll one line at a time use CTRL-E (scroll up) and CTRL-Y (scroll down). Think of CTRL-E to give you one line Extra. (If you use MS-Windows compatible key mappings CTRL-Y will redo a change instead of scroll.) -To scroll forward by a whole screen (except for two lines) use CTRL-F. The -other way is backward, CTRL-B is the command to use. Fortunately CTRL-F is -Forward and CTRL-B is Backward, that's easy to remember. +To scroll forward by a whole screen (except for two lines) use CTRL-F. To +scroll backwards, use CTRL-B. These should be easy to remember: F for +Forwards and B for Backwards. A common issue is that after moving down many lines with "j" your cursor is at the bottom of the screen. You would like to see the context of the line with the cursor. That's done with the "zz" command. +------------------+ +------------------+ - | some text | | some text | - | some text | | some text | - | some text | | some text | - | some text | zz --> | line with cursor | - | some text | | some text | - | some text | | some text | - | line with cursor | | some text | + | earlier text | | earlier text | + | earlier text | | earlier text | + | earlier text | | earlier text | + | earlier text | zz --> | line with cursor | + | earlier text | | later text | + | earlier text | | later text | + | line with cursor | | later text | +------------------+ +------------------+ The "zt" command puts the cursor line at the top, "zb" at the bottom. There @@ -353,7 +354,7 @@ The "?" command works like "/" but searches backwards: > The "N" command repeats the last search the opposite direction. Thus using "N" after a "/" command searches backwards, using "N" after "?" searches -forward. +forwards. IGNORING CASE @@ -462,8 +463,8 @@ really jump to that location. Or type more to change the search string. :set nowrapscan This stops the search at the end of the file. Or, when you are searching -backwards, at the start of the file. The 'wrapscan' option is on by default, -thus searching wraps around the end of the file. +backwards, it stops the search at the start of the file. The 'wrapscan' +option is on by default, thus searching wraps around the end of the file. INTERMEZZO @@ -485,7 +486,8 @@ Vim. Example: > Go:set hlsearch<Esc> "G" moves to the end of the file. "o" starts a new line, where you type the -":set" command. You end insert mode with <Esc>. Then write the file: > +":set" command. You end insert mode with <Esc>. Then write and close the +file: > ZZ @@ -499,8 +501,8 @@ Regular expressions are an extremely powerful and compact way to specify a search pattern. Unfortunately, this power comes at a price, because regular expressions are a bit tricky to specify. In this section we mention only a few essential ones. More about search -patterns and commands in chapter 27 |usr_27.txt|. You can find the full -explanation here: |pattern|. +patterns and commands can be found in chapter 27 |usr_27.txt|. You can find +the full explanation here: |pattern|. BEGINNING AND END OF A LINE @@ -526,9 +528,9 @@ And with "/^the" we find this one: the solder holding one of the chips melted and the ~ xxx -You can try searching with "/^the$", it will only match a single line -consisting of "the". White space does matter here, thus if a line contains a -space after the word, like "the ", the pattern will not match. +You can try searching with "/^the$"; it will only match a single line +consisting entirely of "the". White space does matter here, thus if a line +contains a space after the word, like "the ", the pattern will not match. MATCHING ANY SINGLE CHARACTER @@ -563,20 +565,20 @@ where you came from, use this command: > This ` is a backtick or open single-quote character. If you use the same command a second time you will jump back again. That's -because the ` command is a jump itself, and the position from before this jump -is remembered. +because the "`" command is a jump itself, and the position from before this +jump is remembered. Generally, every time you do a command that can move the cursor further than within the same line, this is called a jump. This includes the search commands "/" and "n" (it doesn't matter how far away the match is). But not the character searches with "fx" and "tx" or the word movements "w" and "e". - Also, "j" and "k" are not considered to be a jump. Even when you use a + Also, "j" and "k" are not considered to be a jump, even when you use a count to make them move the cursor quite a long way away. -The `` command jumps back and forth, between two points. The CTRL-O command +The "``" command jumps back and forth, between two points. The CTRL-O command jumps to older positions (Hint: O for older). CTRL-I then jumps back to newer -positions (Hint: I is just next to O on the keyboard). Consider this sequence -of commands: > +positions (Hint: for many common keyboard layouts, I is just next to O). +Consider this sequence of commands: > 33G /^The @@ -614,9 +616,9 @@ Thus to move to the a mark: > `a -The command 'mark (single quotation mark, or apostrophe) moves you to the -beginning of the line containing the mark. This differs from the `mark -command, which moves you to marked column. +The command "'mark" (single quotation mark, or apostrophe) moves you to the +beginning of the line containing the mark. This differs from the "`mark" +command, which also moves you to the marked column. The marks can be very useful when working on two related parts in a file. Suppose you have some text near the start of the file you need to look at, diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index 236f190c3e..f3e287c016 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -1,4 +1,4 @@ -*usr_04.txt* For Vim version 8.1. Last change: 2014 Aug 29 +*usr_04.txt* For Vim version 8.1. Last change: 2019 Nov 21 VIM USER MANUAL - by Bram Moolenaar @@ -33,7 +33,7 @@ using a count: "4x" deletes four characters. move word command. In fact, the "d" command may be followed by any motion command, and it deletes from the current location to the place where the cursor winds up. - The "4w" command, for example, moves the cursor over four words. The d4w + The "4w" command, for example, moves the cursor over four words. The "d4w" command deletes four words. To err is human. To really foul up you need a computer. ~ @@ -91,14 +91,14 @@ This "c2wbe<Esc>" contains these bits: be insert this text <Esc> back to Normal mode -If you have paid attention, you will have noticed something strange: The space -before "human" isn't deleted. There is a saying that for every problem there -is an answer that is simple, clear, and wrong. That is the case with the -example used here for the "cw" command. The c operator works just like the -d operator, with one exception: "cw". It actually works like "ce", change to -end of word. Thus the space after the word isn't included. This is an -exception that dates back to the old Vi. Since many people are used to it -now, the inconsistency has remained in Vim. +You will have noticed something strange: The space before "human" isn't +deleted. There is a saying that for every problem there is an answer that is +simple, clear, and wrong. That is the case with the example used here for the +"cw" command. The c operator works just like the d operator, with one +exception: "cw". It actually works like "ce", change to end of word. Thus +the space after the word isn't included. This is an exception that dates back +to the old Vi. Since many people are used to it now, the inconsistency has +remained in Vim. MORE CHANGES @@ -114,7 +114,7 @@ Insert mode and append new text. SHORTCUTS Some operator-motion commands are used so often that they have been given a -single letter command: +single-letter command: x stands for dl (delete character under the cursor) X stands for dh (delete character left of the cursor) @@ -138,6 +138,7 @@ REPLACING WITH ONE CHARACTER The "r" command is not an operator. It waits for you to type a character, and will replace the character under the cursor with it. You could do the same with "cl" or with the "s" command, but with "r" you don't have to press <Esc> +to get back out of insert mode. there is somerhing grong here ~ rT rt rw @@ -164,7 +165,7 @@ The "." command is one of the most simple yet powerful commands in Vim. It repeats the last change. For instance, suppose you are editing an HTML file and want to delete all the <B> tags. You position the cursor on the first < and delete the <B> with the command "df>". You then go to the < of the next -</B> and kill it using the "." command. The "." command executes the last +</B> and delete it using the "." command. The "." command executes the last change command (in this case, "df>"). To delete another tag, position the cursor on the < and use the "." command. @@ -176,8 +177,8 @@ cursor on the < and use the "." command. f< find next < -------------> . repeat df> --> -The "." command works for all changes you make, except for the "u" (undo), -CTRL-R (redo) and commands that start with a colon (:). +The "." command works for all changes you make, except for "u" (undo), CTRL-R +(redo) and commands that start with a colon (:). Another example: You want to change the word "four" to "five". It appears several times in your text. You can do this quickly with this sequence of @@ -201,7 +202,8 @@ change. Then you can use Visual mode. You start Visual mode by pressing "v". You move the cursor over the text you want to work on. While you do this, the text is highlighted. Finally type the operator command. - For example, to delete from halfway one word to halfway another word: + For example, to delete from the middle of one word to the middle of another +word: This i |