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
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -529,7 +529,7 @@ paragraph, no matter where the cursor currently is. Or you can use Visual
529529mode: hit "v", move to the end of the block, and type "gq". See also | gq | .
530530
531531==============================================================================
532- 4. 'expandtab' , 'smarttab ' and 'softtabstop ' options *ins-expandtab*
532+ 4. 'expandtab' , 'softtabstop ' and 'smarttab ' options *ins-expandtab*
533533
534534If the 'expandtab' option is on, spaces will be used to fill the amount of
535535whitespace 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
540540space at a time. The original character will be put back for only one space
541541that you backspace over (the last one).
542542
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-
550543 *ins-softtabstop*
551544When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
552545positions, 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
561554cursor. You will have to delete 'softtabstop' characters first, and then type
562555extra spaces to get where you want to be.
563556
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+
564564==============================================================================
5655655. Replace mode *Replace* *Replace-mode* *mode-replace*
566566
@@ -649,6 +649,7 @@ Completion can be done for:
64964911. omni completion | i_CTRL-X_CTRL-O |
65065012. Spelling suggestions | i_CTRL-X_s |
65165113. keywords in 'complete' | i_CTRL-N | | i_CTRL-P |
652+ 14. contents from registers | i_CTRL-X_CTRL-R |
652653
653654Additionally, | i_CTRL-X_CTRL-Z | stops completion without changing the text.
654655
@@ -1019,6 +1020,26 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
10191020 completion, for example: >
10201021 :imap <Tab> <C-X><C-V>
10211022
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+
10221043User defined completion *compl-function*
10231044
10241045Completion is done by a function that can be defined by the user with the
0 commit comments