For example, in omni-completion mode, as documented, after pressing i_CTRL-X_CTRL-O, pressing CTRL-O behaves the same as CTRL-N. The same basically applies to the other completion modes.
Omni completion *compl-omni*
(snip...)
*i_CTRL-X_CTRL-O*
CTRL-X CTRL-O Guess what kind of item is in front of the cursor and
find the first match for it.
CTRL-O or
CTRL-N Use the next match. This match replaces the previous
one.
(snip...)
In the current register-completion mode, after pressing i_CTRL-X_CTRL-R, entering CTRL-R_a will insert the contents of register a. I don't think it makes sense to perform this action during X-mode completion. Shouldn't pressing CTRL-R behave the same as CTRL-N, just like in the other completion modes?
Below is an example of the documentation after the change of i_CTRL-X_CTRL-R.
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.
Further use of CTRL-R (without CTRL-X) will insert the
register content, see |i_CTRL-R|.
'ignorecase' applies to the matching.
CTRL-R or
CTRL-N Search forwards for next match. This match replaces
the previous one.
(snip...)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
This was done in particular after this comment here: #17395 (comment)
To be honest, I have never really understood that part of the documentation referenced:
CTRL-X CTRL-N or
CTRL-X CTRL-P Further use of CTRL-X CTRL-N or CTRL-X CTRL-P will
copy the words following the previous expansion in
other contexts unless a double CTRL-X is used.
so we may need to update and clarify the documentation to match the current behaviour.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
To be honest, I have never really understood that part of the documentation referenced:
It is actually quite convenient in emacs with dabbrev-expand if I remember it correctly.
Basically it completes the next (ctrl-x ctrl-n) word adjacent to the previously completed one:
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Register completion (i_CTRL-X_CTRL-R) and register insertion (i_CTRL-R, i_CTRL-R_CTRL-R, etc.) are separate features. Performing register insertion during register completion will cause confusion.
Also, we should maintain the existing completion-mode key behavior, where completion mode key (i.e. CTRL-O) pressed after CTRL-X behaves like CTRL-N.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Some (possibly completion-related) plugins may implement mappings using register insertion.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I believe register completion should just complete register contents without word->full contents on successive press.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I believe register completion should just complete register contents without word->full contents on successive press.
Then it should be possible to have successive CTRL-R to cycle through other registers the same way other completions do.
... and not only if the beginning of a registers content matches but any (even fuzzy) match within a registers content succeeds IMHO.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I wrote a patch as a little break between work tasks.
I've put it on Gist.
Vim: Ctrl-R in register completion mode behaves the same as CTRL-N
https://gist.github.com/h-east/8742fb1f3baac7c87e21334b95b2c62c
I probably won't submit a PR.
Personally I think this behavior provides a better user experience, but I know some people might struggle without being able to use :h i_CTRL-R_= during completion mode.
If there's enough positive feedback, I'll consider it.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I wrote a patch as a little break between work tasks. I've put it on Gist.
Vim: Ctrl-R in register completion mode behaves the same as CTRL-N https://gist.github.com/h-east/8742fb1f3baac7c87e21334b95b2c62c
I probably won't submit a PR. Personally I think this behavior provides a better user experience, but I know some people might struggle without being able to use
:h i_CTRL-R_=during completion mode. If there's enough positive feedback, I'll consider it.
PR would be great
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()