comparison runtime/doc/various.txt @ 16553:0e473e9e70c2 v8.1.1280

patch 8.1.1280: remarks about functionality not in Vi clutters the help commit https://github.com/vim/vim/commit/25c9c680ec4dfbb51f4ef21c3460a48d3c67ffc8 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 5 18:13:34 2019 +0200 patch 8.1.1280: remarks about functionality not in Vi clutters the help Problem: Remarks about functionality not in Vi clutters the help. Solution: Move all info about what is new in Vim or already existed in Vi to vi_diff.txt. Remove {not in Vi} remarks. (closes #4268) Add "noet" to the help files modeline. Also include many other help file improvements.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 May 2019 18:15:06 +0200
parents 9c206a78ec04
children 0422b14bce58
comparison
equal deleted inserted replaced
16552:deb3d4f5be8b 16553:0e473e9e70c2
1 *various.txt* For Vim version 8.1. Last change: 2019 Mar 23 1 *various.txt* For Vim version 8.1. Last change: 2019 May 05
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
71 output the two characters that can be used to create 71 output the two characters that can be used to create
72 the character: 72 the character:
73 <ö> 246, Hex 00f6, Oct 366, Digr o: ~ 73 <ö> 246, Hex 00f6, Oct 366, Digr o: ~
74 This shows you can type CTRL-K o : to insert ö. 74 This shows you can type CTRL-K o : to insert ö.
75 75
76 {not in Vi}
77
78 *g8* 76 *g8*
79 g8 Print the hex values of the bytes used in the 77 g8 Print the hex values of the bytes used in the
80 character under the cursor, assuming it is in |UTF-8| 78 character under the cursor, assuming it is in |UTF-8|
81 encoding. This also shows composing characters. The 79 encoding. This also shows composing characters. The
82 value of 'maxcombine' doesn't matter. 80 value of 'maxcombine' doesn't matter.
83 Example of a character with two composing characters: 81 Example of a character with two composing characters:
84 e0 b8 81 + e0 b8 b9 + e0 b9 89 ~ 82 e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
85 {not in Vi}
86 83
87 *8g8* 84 *8g8*
88 8g8 Find an illegal UTF-8 byte sequence at or after the 85 8g8 Find an illegal UTF-8 byte sequence at or after the
89 cursor. This works in two situations: 86 cursor. This works in two situations:
90 1. when 'encoding' is any 8-bit encoding 87 1. when 'encoding' is any 8-bit encoding
95 encoding because it contains illegal bytes. 92 encoding because it contains illegal bytes.
96 Does not wrap around the end of the file. 93 Does not wrap around the end of the file.
97 Note that when the cursor is on an illegal byte or the 94 Note that when the cursor is on an illegal byte or the
98 cursor is halfway a multi-byte character the command 95 cursor is halfway a multi-byte character the command
99 won't move the cursor. 96 won't move the cursor.
100 {not in Vi}
101 97
102 *:p* *:pr* *:print* *E749* 98 *:p* *:pr* *:print* *E749*
103 :[range]p[rint] [flags] 99 :[range]p[rint] [flags]
104 Print [range] lines (default current line). 100 Print [range] lines (default current line).
105 Note: If you are looking for a way to print your text 101 Note: If you are looking for a way to print your text
172 If the mark is "=", a line of dashes is printed 168 If the mark is "=", a line of dashes is printed
173 around the current line. 169 around the current line.
174 170
175 :{range}z#[+-^.=]{count} *:z#* 171 :{range}z#[+-^.=]{count} *:z#*
176 Like ":z", but number the lines. 172 Like ":z", but number the lines.
177 {not in all versions of Vi, not with these arguments}
178 173
179 *:=* 174 *:=*
180 := [flags] Print the last line number. 175 := [flags] Print the last line number.
181 See |ex-flags| for [flags]. 176 See |ex-flags| for [flags].
182 177
222 expression as argument. This allows the use of 217 expression as argument. This allows the use of
223 printable characters to represent special characters. 218 printable characters to represent special characters.
224 219
225 Example: > 220 Example: >
226 :exe "normal \<c-w>\<c-w>" 221 :exe "normal \<c-w>\<c-w>"
227 < {not in Vi, of course}
228 222
229 :{range}norm[al][!] {commands} *:normal-range* 223 :{range}norm[al][!] {commands} *:normal-range*
230 Execute Normal mode commands {commands} for each line 224 Execute Normal mode commands {commands} for each line
231 in the {range}. Before executing the {commands}, the 225 in the {range}. Before executing the {commands}, the
232 cursor is positioned in the first column of the range, 226 cursor is positioned in the first column of the range,
233 for each line. Otherwise it's the same as the 227 for each line. Otherwise it's the same as the
234 ":normal" command without a range. 228 ":normal" command without a range.
235 {not in Vi}
236 229
237 *:sh* *:shell* *E371* 230 *:sh* *:shell* *E371*
238 :sh[ell] This command starts a shell. When the shell exits 231 :sh[ell] This command starts a shell. When the shell exits
239 (after the "exit" command) you return to Vim. The 232 (after the "exit" command) you return to Vim. The
240 name for the shell command comes from 'shell' option. 233 name for the shell command comes from 'shell' option.
488 be dynamically loaded. 481 be dynamically loaded.
489 482
490 :ve[rsion] {nr} Is now ignored. This was previously used to check the 483 :ve[rsion] {nr} Is now ignored. This was previously used to check the
491 version number of a .vimrc file. It was removed, 484 version number of a .vimrc file. It was removed,
492 because you can now use the ":if" command for 485 because you can now use the ":if" command for
493 version-dependent behavior. {not in Vi} 486 version-dependent behavior.
494 487
495 *:redi* *:redir* 488 *:redi* *:redir*
496 :redi[r][!] > {file} Redirect messages to file {file}. The messages which 489 :redi[r][!] > {file} Redirect messages to file {file}. The messages which
497 are the output of commands are written to that file, 490 are the output of commands are written to that file,
498 until redirection ends. The messages are also still 491 until redirection ends. The messages are also still
508 To stop the messages and commands from being echoed to 501 To stop the messages and commands from being echoed to
509 the screen, put the commands in a function and call it 502 the screen, put the commands in a function and call it
510 with ":silent call Function()". 503 with ":silent call Function()".
511 An alternative is to use the 'verbosefile' option, 504 An alternative is to use the 'verbosefile' option,
512 this can be used in combination with ":redir". 505 this can be used in combination with ":redir".
513 {not in Vi}
514 506
515 :redi[r] >> {file} Redirect messages to file {file}. Append if {file} 507 :redi[r] >> {file} Redirect messages to file {file}. Append if {file}
516 already exists. {not in Vi} 508 already exists.
517 509
518 :redi[r] @{a-zA-Z} 510 :redi[r] @{a-zA-Z}
519 :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the 511 :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the
520 contents of the register if its name is given 512 contents of the register if its name is given
521 uppercase {A-Z}. The ">" after the register name is 513 uppercase {A-Z}. The ">" after the register name is
522 optional. {not in Vi} 514 optional.
523 :redi[r] @{a-z}>> Append messages to register {a-z}. {not in Vi} 515 :redi[r] @{a-z}>> Append messages to register {a-z}.
524 516
525 :redi[r] @*> 517 :redi[r] @*>
526 :redi[r] @+> Redirect messages to the selection or clipboard. For 518 :redi[r] @+> Redirect messages to the selection or clipboard. For
527 backward compatibility, the ">" after the register 519 backward compatibility, the ">" after the register
528 name can be omitted. See |quotestar| and |quoteplus|. 520 name can be omitted. See |quotestar| and |quoteplus|.
529 {not in Vi}
530 :redi[r] @*>> 521 :redi[r] @*>>
531 :redi[r] @+>> Append messages to the selection or clipboard. 522 :redi[r] @+>> Append messages to the selection or clipboard.
532 {not in Vi}
533 523
534 :redi[r] @"> Redirect messages to the unnamed register. For 524 :redi[r] @"> Redirect messages to the unnamed register. For
535 backward compatibility, the ">" after the register 525 backward compatibility, the ">" after the register
536 name can be omitted. {not in Vi} 526 name can be omitted.
537 :redi[r] @">> Append messages to the unnamed register. {not in Vi} 527 :redi[r] @">> Append messages to the unnamed register.
538 528
539 :redi[r] => {var} Redirect messages to a variable. If the variable 529 :redi[r] => {var} Redirect messages to a variable. If the variable
540 doesn't exist, then it is created. If the variable 530 doesn't exist, then it is created. If the variable
541 exists, then it is initialized to an empty string. 531 exists, then it is initialized to an empty string.
542 The variable will remain empty until redirection ends. 532 The variable will remain empty until redirection ends.
543 Only string variables can be used. After the 533 Only string variables can be used. After the
544 redirection starts, if the variable is removed or 534 redirection starts, if the variable is removed or
545 locked or the variable type is changed, then further 535 locked or the variable type is changed, then further
546 command output messages will cause errors. {not in Vi} 536 command output messages will cause errors.
547 To get the output of one command the |execute()| 537 To get the output of one command the |execute()|
548 function can be used. 538 function can be used.
549 539
550 :redi[r] =>> {var} Append messages to an existing variable. Only string 540 :redi[r] =>> {var} Append messages to an existing variable. Only string
551 variables can be used. {not in Vi} 541 variables can be used.
552 542
553 :redi[r] END End redirecting messages. {not in Vi} 543 :redi[r] END End redirecting messages.
554 544
555 *:filt* *:filter* 545 *:filt* *:filter*
556 :filt[er][!] {pat} {command} 546 :filt[er][!] {pat} {command}
557 :filt[er][!] /{pat}/ {command} 547 :filt[er][!] /{pat}/ {command}
558 Restrict the output of {command} to lines matching 548 Restrict the output of {command} to lines matching
690 in: > 680 in: >
691 !man 2 mkdir 681 !man 2 mkdir
692 < - When 'keywordprg' is equal to "man -s", a count 682 < - When 'keywordprg' is equal to "man -s", a count
693 before "K" is inserted after the "-s". If there is 683 before "K" is inserted after the "-s". If there is
694 no count, the "-s" is removed. 684 no count, the "-s" is removed.
695 {not in Vi}
696 685
697 *v_K* 686 *v_K*
698 {Visual}K Like "K", but use the visually highlighted text for 687 {Visual}K Like "K", but use the visually highlighted text for
699 the keyword. Only works when the highlighted text is 688 the keyword. Only works when the highlighted text is
700 not more than one line. {not in Vi} 689 not more than one line.
701 690
702 [N]gs *gs* *:sl* *:sleep* 691 [N]gs *gs* *:sl* *:sleep*
703 :[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included, 692 :[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
704 sleep for [N] milliseconds. The count for "gs" always 693 sleep for [N] milliseconds. The count for "gs" always
705 uses seconds. The default is one second. > 694 uses seconds. The default is one second. >
708 :sleep 100m "sleep for a hundred milliseconds 697 :sleep 100m "sleep for a hundred milliseconds
709 10gs "sleep for ten seconds 698 10gs "sleep for ten seconds
710 < Can be interrupted with CTRL-C (CTRL-Break on MS-DOS). 699 < Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
711 "gs" stands for "goto sleep". 700 "gs" stands for "goto sleep".
712 While sleeping the cursor is positioned in the text, 701 While sleeping the cursor is positioned in the text,
713 if at a visible position. {not in Vi} 702 if at a visible position.
714 Also process the received netbeans messages. {only 703 Also process the received netbeans messages. {only
715 available when compiled with the |+netbeans_intg| 704 available when compiled with the |+netbeans_intg|
716 feature} 705 feature}
717 706
718 707