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>
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index f3d92b2..553183d 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -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 @@
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 @@
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