patch 9.1.1426: completion: register contents not completed
Problem: CTRL-X CTRL-R only completes individual words from registers,
making it difficult to insert complete register content.
Solution: Add consecutive CTRL-X CTRL-R support - first press completes
words, second press completes full register lines, similar to
CTRL-X CTRL-L and CTRL-X CTRL-P behavior (glepnir).
closes: #17395
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
3993cd619a
commit
d5fdfa5c9c
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 May 26
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 Jun 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -163,7 +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-R| CTRL-X CTRL-R complete contents 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 26
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Jun 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -649,7 +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|
|
||||
14. contents from registers |i_CTRL-X_CTRL-R|
|
||||
|
||||
Additionally, |i_CTRL-X_CTRL-Z| stops completion without changing the text.
|
||||
|
||||
@ -1021,7 +1021,7 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
|
||||
:imap <Tab> <C-X><C-V>
|
||||
|
||||
|
||||
Completing words from registers *compl-register-words*
|
||||
Completing contents 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.
|
||||
@ -1035,6 +1035,11 @@ CTRL-X CTRL-R Guess what kind of item is in front of the cursor from
|
||||
CTRL-P Search backwards for previous match. This match
|
||||
replaces the previous one.
|
||||
|
||||
CTRL-X CTRL-R Further use of CTRL-X CTRL-R will copy the line
|
||||
following the previous expansion in other contexts
|
||||
unless a double CTRL-X is used (e.g. this switches
|
||||
from completing register words to register contents).
|
||||
|
||||
User defined completion *compl-function*
|
||||
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*usr_24.txt* For Vim version 9.1. Last change: 2018 Mar 18
|
||||
*usr_24.txt* For Vim version 9.1. Last change: 2025 Jun 02
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -187,7 +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-R contents 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 @@
|
||||
*vi_diff.txt* For Vim version 9.1. Last change: 2025 Mar 28
|
||||
*vi_diff.txt* For Vim version 9.1. Last change: 2025 Jun 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -338,7 +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
|
||||
|i_CTRL-X_CTRL-R| contents from registers
|
||||
etc.
|
||||
|
||||
Long line support. |'wrap'| |'linebreak'|
|
||||
|
||||
Reference in New Issue
Block a user