Mercurial > vim
comparison runtime/doc/change.txt @ 168:4d9eabb1396e
updated for version 7.0051
author | vimboss |
---|---|
date | Tue, 22 Feb 2005 08:49:11 +0000 |
parents | 8b0ee9d57d7f |
children | 8c60f65311fa |
comparison
equal
deleted
inserted
replaced
167:c93c9cad9618 | 168:4d9eabb1396e |
---|---|
1 *change.txt* For Vim version 7.0aa. Last change: 2005 Feb 08 | 1 *change.txt* For Vim version 7.0aa. Last change: 2005 Feb 21 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
110 {Visual}gJ Join the highlighted lines, with a minimum of two | 110 {Visual}gJ Join the highlighted lines, with a minimum of two |
111 lines. Don't insert or remove any spaces. {not in | 111 lines. Don't insert or remove any spaces. {not in |
112 Vi} | 112 Vi} |
113 | 113 |
114 *:j* *:join* | 114 *:j* *:join* |
115 :[range]j[oin][!] Join [range] lines. Same as "J", except with [!] | 115 :[range]j[oin][!] [flags] |
116 Join [range] lines. Same as "J", except with [!] | |
116 the join does not insert or delete any spaces. | 117 the join does not insert or delete any spaces. |
117 If a [range] has equal start and end values, this | 118 If a [range] has equal start and end values, this |
118 command does nothing. The default behavior is to | 119 command does nothing. The default behavior is to |
119 join the current line with the line below it. | 120 join the current line with the line below it. |
120 {not in Vi: !} | 121 {not in Vi: !} |
121 | 122 See |ex-flags| for [flags]. |
122 :[range]j[oin][!] {count} | 123 |
124 :[range]j[oin][!] {count} [flags] | |
123 Join {count} lines, starting with [range] (default: | 125 Join {count} lines, starting with [range] (default: |
124 current line |cmdline-ranges|). Same as "J", except | 126 current line |cmdline-ranges|). Same as "J", except |
125 with [!] the join does not insert or delete any | 127 with [!] the join does not insert or delete any |
126 spaces. | 128 spaces. |
127 {not in Vi: !} | 129 {not in Vi: !} |
130 See |ex-flags| for [flags]. | |
128 | 131 |
129 These commands delete the <EOL> between lines. This has the effect of joining | 132 These commands delete the <EOL> between lines. This has the effect of joining |
130 multiple lines into one line. You can repeat these commands (except ":j") and | 133 multiple lines into one line. You can repeat these commands (except ":j") and |
131 undo them. | 134 undo them. |
132 | 135 |
234 | 237 |
235 If you prefer "cw" to include the space after a word, use this mapping: > | 238 If you prefer "cw" to include the space after a word, use this mapping: > |
236 :map cw dwi | 239 :map cw dwi |
237 < | 240 < |
238 *:c* *:ch* *:change* | 241 *:c* *:ch* *:change* |
239 :{range}c[hange] Replace lines of text with some different text. | 242 :{range}c[hange][!] Replace lines of text with some different text. |
240 Type a line containing only "." to stop replacing. | 243 Type a line containing only "." to stop replacing. |
241 Without {range}, this command changes only the current | 244 Without {range}, this command changes only the current |
242 line. | 245 line. |
246 Adding [!] toggles 'autoindent' for the time this | |
247 command is executed. | |
243 | 248 |
244 ============================================================================== | 249 ============================================================================== |
245 3. Simple changes *simple-change* | 250 3. Simple changes *simple-change* |
246 | 251 |
247 *r* | 252 *r* |
422 | 427 |
423 :[range]le[ft] [indent] left align lines in [range]. Sets the indent in the | 428 :[range]le[ft] [indent] left align lines in [range]. Sets the indent in the |
424 lines to [indent] (default 0). {not in Vi} | 429 lines to [indent] (default 0). {not in Vi} |
425 | 430 |
426 *:>* | 431 *:>* |
427 :[range]> Shift {count} [range] lines one 'shiftwidth' right. | 432 :[range]> [flags] Shift {count} [range] lines one 'shiftwidth' right. |
428 Repeat '>' for shifting multiple 'shiftwidth's. | 433 Repeat '>' for shifting multiple 'shiftwidth's. |
429 | 434 See |ex-flags| for [flags]. |
430 :[range]> {count} Shift {count} lines one 'shiftwidth' right, starting | 435 |
436 :[range]> {count} [flags] | |
437 Shift {count} lines one 'shiftwidth' right, starting | |
431 with [range] (default current line |cmdline-ranges|). | 438 with [range] (default current line |cmdline-ranges|). |
432 Repeat '>' for shifting multiple 'shiftwidth's. | 439 Repeat '>' for shifting multiple 'shiftwidth's. |
440 See |ex-flags| for [flags]. | |
433 | 441 |
434 The ">" and "<" commands are handy for changing the indentation within | 442 The ">" and "<" commands are handy for changing the indentation within |
435 programs. Use the 'shiftwidth' option to set the size of the white space | 443 programs. Use the 'shiftwidth' option to set the size of the white space |
436 which these commands insert or delete. Normally the 'shiftwidth' option is 8, | 444 which these commands insert or delete. Normally the 'shiftwidth' option is 8, |
437 but you can set it to, say, 3 to make smaller indents. The shift leftwards | 445 but you can set it to, say, 3 to make smaller indents. The shift leftwards |
517 {not in Vi} | 525 {not in Vi} |
518 | 526 |
519 | 527 |
520 4.2 Substitute *:substitute* | 528 4.2 Substitute *:substitute* |
521 *:s* *:su* | 529 *:s* *:su* |
522 :[range]s[ubstitute]/{pattern}/{string}/[&][c][e][g][p][r][i][I] [count] | 530 :[range]s[ubstitute]/{pattern}/{string}/[&][#][c][e][g][p][r][i][I] [count] |
523 For each line in [range] replace a match of {pattern} | 531 For each line in [range] replace a match of {pattern} |
524 with {string}. | 532 with {string}. |
525 For the {pattern} see |pattern|. | 533 For the {pattern} see |pattern|. |
526 {string} can be a literal string, or something | 534 {string} can be a literal string, or something |
527 special; see |sub-replace-special|. | 535 special; see |sub-replace-special|. |
531 starting with the last line in [range]. When [range] | 539 starting with the last line in [range]. When [range] |
532 is omitted start in the current line. | 540 is omitted start in the current line. |
533 Also see |cmdline-ranges|. | 541 Also see |cmdline-ranges|. |
534 See |:s_flags| for the flags. | 542 See |:s_flags| for the flags. |
535 | 543 |
536 :[range]s[ubstitute] [c][e][g][p][r][i][I] [count] | 544 :[range]s[ubstitute] [#][c][e][g][p][r][i][I] [count] |
537 :[range]&[&][c][e][g][p][r][i][I] [count] *:&* | 545 :[range]&[&][#][c][e][g][p][r][i][I] [count] *:&* |
538 Repeat last :substitute with same search pattern and | 546 Repeat last :substitute with same search pattern and |
539 substitute string, but without the same flags. You | 547 substitute string, but without the same flags. You |
540 may add extra flags (see |:s_flags|). | 548 may add extra flags (see |:s_flags|). |
541 Note that after ":substitute" the '&' flag can't be | 549 Note that after ":substitute" the '&' flag can't be |
542 used, it's recognized as a pattern separator. | 550 used, it's recognized as a pattern separator. |
543 The space between ":substitute" and the 'c', 'g' and | 551 The space between ":substitute" and the 'c', 'g' and |
544 'r' flags isn't required, but in scripts it's a good | 552 'r' flags isn't required, but in scripts it's a good |
545 idea to keep it to avoid confusion. | 553 idea to keep it to avoid confusion. |
546 | 554 |
547 :[range]~[&][c][e][g][p][r][i][I] [count] *:~* | 555 :[range]~[&][#][c][e][g][p][r][i][I] [count] *:~* |
548 Repeat last substitute with same substitute string | 556 Repeat last substitute with same substitute string |
549 but with last used search pattern. This is like | 557 but with last used search pattern. This is like |
550 ":&r". See |:s_flags| for the flags. | 558 ":&r". See |:s_flags| for the flags. |
551 | 559 |
552 *&* | 560 *&* |
620 [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase' | 628 [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase' |
621 options are not used. | 629 options are not used. |
622 {not in Vi} | 630 {not in Vi} |
623 | 631 |
624 [p] Print the line containing the last substitute. | 632 [p] Print the line containing the last substitute. |
625 {not in Vi} | 633 |
634 [#] Like [p] and prepend the line number. | |
635 | |
636 [l] Like [l] but print the text like |:list|. | |
626 | 637 |
627 [r] Only useful in combination with ":&" or ":s" without arguments. ":&r" | 638 [r] Only useful in combination with ":&" or ":s" without arguments. ":&r" |
628 works the same way as ":~": When the search pattern is empty, use the | 639 works the same way as ":~": When the search pattern is empty, use the |
629 previously used search pattern instead of the search pattern from the | 640 previously used search pattern instead of the search pattern from the |
630 last substitute or ":global". If the last command that did a search | 641 last substitute or ":global". If the last command that did a search |
666 | 677 |
667 *sub-replace-special* *:s\=* | 678 *sub-replace-special* *:s\=* |
668 When the {string} starts with "\=" it is evaluated as an expression, see | 679 When the {string} starts with "\=" it is evaluated as an expression, see |
669 |sub-replace-expression|. Otherwise these characters in {string} have a | 680 |sub-replace-expression|. Otherwise these characters in {string} have a |
670 special meaning: | 681 special meaning: |
682 *:s%* | |
683 When {string} is equal to "%" and '/' is included with the 'cpotions' option, | |
684 then the {string} of the previous substitute command is used. |cpo-/| | |
671 | 685 |
672 magic nomagic action ~ | 686 magic nomagic action ~ |
673 & \& replaced with the whole matched pattern *s/\&* | 687 & \& replaced with the whole matched pattern *s/\&* |
674 \& & replaced with & | 688 \& & replaced with & |
675 \0 replaced with the whole matched pattern *\0* *s/\0* | 689 \0 replaced with the whole matched pattern *\0* *s/\0* |