mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.1.1408: not easily possible to complete from register content
Problem: not easily possible to complete from register content Solution: add register-completion submode using i_CTRL-X_CTRL-R (glepnir) closes: #17354 Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
69c3493adc
commit
0546068aae
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 May 14
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -163,6 +163,7 @@ commands in CTRL-X submode *i_CTRL-X_index*
|
||||
|i_CTRL-X_CTRL-N| CTRL-X CTRL-N next completion
|
||||
|i_CTRL-X_CTRL-O| CTRL-X CTRL-O omni completion
|
||||
|i_CTRL-X_CTRL-P| CTRL-X CTRL-P previous completion
|
||||
|i_CTRL-X_CTRL-R| CTRL-X CTRL-R complete words from registers
|
||||
|i_CTRL-X_CTRL-S| CTRL-X CTRL-S spelling suggestions
|
||||
|i_CTRL-X_CTRL-T| CTRL-X CTRL-T complete identifiers from thesaurus
|
||||
|i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 May 08
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -649,6 +649,7 @@ Completion can be done for:
|
||||
11. omni completion |i_CTRL-X_CTRL-O|
|
||||
12. Spelling suggestions |i_CTRL-X_s|
|
||||
13. keywords in 'complete' |i_CTRL-N| |i_CTRL-P|
|
||||
14. words from registers |i_CTRL-X_CTRL-R|
|
||||
|
||||
Additionally, |i_CTRL-X_CTRL-Z| stops completion without changing the text.
|
||||
|
||||
@ -1019,6 +1020,21 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
|
||||
completion, for example: >
|
||||
:imap <Tab> <C-X><C-V>
|
||||
|
||||
|
||||
Completing words from registers *compl-register-words*
|
||||
*i_CTRL-X_CTRL-R*
|
||||
CTRL-X CTRL-R Guess what kind of item is in front of the cursor from
|
||||
all registers and find the first match for it.
|
||||
Further use of CTRL-R (without CTRL-X) will insert the
|
||||
register content, see |i_CTRL-R|.
|
||||
'ignorecase' applies to the matching.
|
||||
|
||||
CTRL-N Search forwards for next match. This match replaces
|
||||
the previous one.
|
||||
|
||||
CTRL-P Search backwards for previous match. This match
|
||||
replaces the previous one.
|
||||
|
||||
User defined completion *compl-function*
|
||||
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 May 16
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -4658,7 +4658,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'ignorecase' 'ic' boolean (default off)
|
||||
global
|
||||
Ignore case in search patterns, |cmdline-completion|, when
|
||||
searching in the tags file, and non-|Vim9| |expr-==|.
|
||||
searching in the tags file, non-|Vim9| |expr-==| and for Insert-mode
|
||||
completion |ins-completion|.
|
||||
Also see 'smartcase' and 'tagcase'.
|
||||
Can be overruled by using "\c" or "\C" in the pattern, see
|
||||
|/ignorecase|.
|
||||
|
@ -6654,6 +6654,7 @@ compl-generic insert.txt /*compl-generic*
|
||||
compl-keyword insert.txt /*compl-keyword*
|
||||
compl-omni insert.txt /*compl-omni*
|
||||
compl-omni-filetypes insert.txt /*compl-omni-filetypes*
|
||||
compl-register-words insert.txt /*compl-register-words*
|
||||
compl-spelling insert.txt /*compl-spelling*
|
||||
compl-states insert.txt /*compl-states*
|
||||
compl-stop insert.txt /*compl-stop*
|
||||
@ -8425,6 +8426,7 @@ i_CTRL-X_CTRL-L insert.txt /*i_CTRL-X_CTRL-L*
|
||||
i_CTRL-X_CTRL-N insert.txt /*i_CTRL-X_CTRL-N*
|
||||
i_CTRL-X_CTRL-O insert.txt /*i_CTRL-X_CTRL-O*
|
||||
i_CTRL-X_CTRL-P insert.txt /*i_CTRL-X_CTRL-P*
|
||||
i_CTRL-X_CTRL-R insert.txt /*i_CTRL-X_CTRL-R*
|
||||
i_CTRL-X_CTRL-S insert.txt /*i_CTRL-X_CTRL-S*
|
||||
i_CTRL-X_CTRL-T insert.txt /*i_CTRL-X_CTRL-T*
|
||||
i_CTRL-X_CTRL-U insert.txt /*i_CTRL-X_CTRL-U*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Apr 24
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -4764,7 +4764,6 @@ Insert mode completion/expansion:
|
||||
7 When expanding $HOME/dir with ^X^F keep the $HOME (with an option?).
|
||||
7 Add CTRL-X command in Insert mode like CTRL-X CTRL-N, that completes WORDS
|
||||
instead of words.
|
||||
8 Add CTRL-X CTRL-R: complete words from register contents.
|
||||
8 Add completion of previously inserted texts (like what CTRL-A does).
|
||||
Requires remembering a number of insertions.
|
||||
8 Add 'f' flag to 'complete': Expand file names.
|
||||
|
@ -187,6 +187,7 @@ with a certain type of item:
|
||||
CTRL-X CTRL-D macro definitions (also in included files)
|
||||
CTRL-X CTRL-I current and included files
|
||||
CTRL-X CTRL-K words from a dictionary
|
||||
CTRL-X CTRL-R words from registers
|
||||
CTRL-X CTRL-T words from a thesaurus
|
||||
CTRL-X CTRL-] tags
|
||||
CTRL-X CTRL-V Vim command line
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 May 16
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -41586,6 +41586,9 @@ Support for the |Tuple| data type in Vim script and Vim9 script.
|
||||
|
||||
Support for a vertical |tabpanel| window similar to the 'tabline'.
|
||||
|
||||
New Insert-mode completion: |i_CTRL-X_CTRL-R| to complete words from
|
||||
registers.
|
||||
|
||||
*changed-9.2*
|
||||
Changed~
|
||||
-------
|
||||
|
@ -338,6 +338,7 @@ Insert-mode completion. |ins-completion|
|
||||
|i_CTRL-X_CTRL-D| definitions or macros
|
||||
|i_CTRL-X_CTRL-O| Omni completion: clever completion
|
||||
specifically for a file type
|
||||
|i_CTRL-X_CTRL-R| words from registers
|
||||
etc.
|
||||
|
||||
Long line support. |'wrap'| |'linebreak'|
|
||||
|
Reference in New Issue
Block a user