1
- *insert.txt* For Vim version 9.1. Last change: 2025 May 08
1
+ *insert.txt* For Vim version 9.1. Last change: 2025 Jun 04
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -529,7 +529,7 @@ paragraph, no matter where the cursor currently is. Or you can use Visual
529
529
mode: hit "v", move to the end of the block, and type "gq". See also | gq | .
530
530
531
531
==============================================================================
532
- 4. 'expandtab' , 'smarttab ' and 'softtabstop ' options *ins-expandtab*
532
+ 4. 'expandtab' , 'softtabstop ' and 'smarttab ' options *ins-expandtab*
533
533
534
534
If the 'expandtab' option is on, spaces will be used to fill the amount of
535
535
whitespace of the tab. If you want to enter a real <Tab> , type CTRL-V first
@@ -540,13 +540,6 @@ number of characters in the line increases. Backspacing will delete one
540
540
space at a time. The original character will be put back for only one space
541
541
that you backspace over (the last one).
542
542
543
- *ins-smarttab*
544
- When the 'smarttab' option is on, a <Tab> inserts 'shiftwidth' positions at
545
- the beginning of a line and 'tabstop' positions in other places. This means
546
- that often spaces instead of a <Tab> character are inserted. When 'smarttab'
547
- is off, a <Tab> always inserts 'tabstop' positions, and 'shiftwidth' is only
548
- used for ">>" and the like.
549
-
550
543
*ins-softtabstop*
551
544
When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
552
545
positions, and a <BS> used to delete white space, will delete 'softtabstop'
@@ -561,6 +554,13 @@ the cursor. Otherwise you cannot always delete a single character before the
561
554
cursor. You will have to delete 'softtabstop' characters first, and then type
562
555
extra spaces to get where you want to be.
563
556
557
+ *ins-smarttab*
558
+ When the 'smarttab' option is on, the <Tab> key indents by 'shiftwidth' if the
559
+ cursor is in leading whitespace. The <BS> key has the opposite effect. This
560
+ behaves as if 'softtabstop' were set to the value of 'shiftwidth' . This option
561
+ allows the user to set 'softtabstop' to a value other than 'shiftwidth' and
562
+ still use the <Tab> key for indentation.
563
+
564
564
==============================================================================
565
565
5. Replace mode *Replace* *Replace-mode* *mode-replace*
566
566
@@ -649,6 +649,7 @@ Completion can be done for:
649
649
11. omni completion | i_CTRL-X_CTRL-O |
650
650
12. Spelling suggestions | i_CTRL-X_s |
651
651
13. keywords in 'complete' | i_CTRL-N | | i_CTRL-P |
652
+ 14. contents from registers | i_CTRL-X_CTRL-R |
652
653
653
654
Additionally, | i_CTRL-X_CTRL-Z | stops completion without changing the text.
654
655
@@ -1019,6 +1020,26 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
1019
1020
completion, for example: >
1020
1021
:imap <Tab> <C-X><C-V>
1021
1022
1023
+
1024
+ Completing contents from registers *compl-register-words*
1025
+ *i_CTRL-X_CTRL-R*
1026
+ CTRL-X CTRL-R Guess what kind of item is in front of the cursor from
1027
+ all registers and find the first match for it.
1028
+ Further use of CTRL-R (without CTRL-X ) will insert the
1029
+ register content, see | i_CTRL-R | .
1030
+ 'ignorecase' applies to the matching.
1031
+
1032
+ CTRL-N Search forwards for next match. This match replaces
1033
+ the previous one.
1034
+
1035
+ CTRL-P Search backwards for previous match. This match
1036
+ replaces the previous one.
1037
+
1038
+ CTRL-X CTRL-R Further use of CTRL-X CTRL-R will copy the line
1039
+ following the previous expansion in other contexts
1040
+ unless a double CTRL-X is used (e.g. this switches
1041
+ from completing register words to register contents).
1042
+
1022
1043
User defined completion *compl-function*
1023
1044
1024
1045
Completion is done by a function that can be defined by the user with the
0 commit comments