vsh icon indicating copy to clipboard operation
vsh copied to clipboard

(original vim version 9.0) d<C-n> does not delete to next prompt

Open mmalcomson opened this issue 2 years ago • 1 comments

The <C-n> mapping is supposed to act in operator mode.

It is supposed to act "up until the next prompt". This works on neovim, but does not work in original vim. Similar problem for <C-p>.

Only seems to occur in original vim version 9.0 (version 8.1 seems to work fine).

mmalcomson avatar May 17 '23 11:05 mmalcomson

Turns out that this is not specific to original vim version 9.0.

Rather it seems specific (at least in my config) to running original vim in an xterm (as opposed to in a terminal inside tmux).

Further, this is only a problem when there is a mapping starting with d in your configuration. In my case this is provided by surround.vim, which also provides mappings starting with c and y triggering problems on those omap cases as well.

I expect this is similar to the below vim issues -- and waiting for a timeout makes things work as expected: https://github.com/vim/vim/issues/11061 https://github.com/vim/vim/issues/9109

But since these mappings are control rather than alt modified I'm not certain if it is exactly the same thing. Mostly on the premise that the issues seem to be about having two different mechanisms by which to represent a modified character, while my understanding was that control characters were always a single character. (Would have to look a bit further into this in order to confirm).

mmalcomson avatar Jul 31 '23 09:07 mmalcomson