Commit: patch 9.1.1408: not easily possible to complete from register content

16 views
Skip to first unread message

Christian Brabandt

unread,
May 26, 2025, 12:30:21 PMMay 26
to vim...@googlegroups.com
patch 9.1.1408: not easily possible to complete from register content

Commit: https://github.com/vim/vim/commit/0546068aaef2b1a40faa2945ef7eba249739f219
Author: glepnir <gleph...@gmail.com>
Date: Mon May 26 18:23:27 2025 +0200

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 <gleph...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 00a09ae14..d03d81eff 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -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
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index f3d92b290..553183d74 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 @@ 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
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index e74c5e8a5..f0a7e9eef 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -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 "

Christ van Willegen

unread,
May 26, 2025, 4:24:34 PMMay 26
to vim...@googlegroups.com
Hi


Op ma 26 mei 2025 18:30 schreef Christian Brabandt <cbl...@256bit.org>:
patch 9.1.1408: not easily possible to complete from register content

Commit: https://github.com/vim/vim/commit/0546068aaef2b1a40faa2945ef7eba249739f219
Author: glepnir <gleph...@gmail.com>
Date:   Mon May 26 18:23:27 2025 +0200

    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 <gleph...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

It looks like all the code changes are missing from this patch...

Christ van Willegen

Christian Brabandt

unread,
May 27, 2025, 1:33:31 AMMay 27
to vim...@googlegroups.com

On Mon, 26 May 2025, Christ van Willegen wrote:

> It looks like all the code changes are missing from this patch...

Strange, the same patch was pushed successfully to mercurial
https://www.vim.org/hgweb/vim/rev/f08b2dd93702
not sure what went wrong with sending.

Thanks,
Christian
--
"You tweachewous miscweant!"
-- Elmer Fudd
Reply all
Reply to author
Forward
0 new messages