[vim] keymodel URxvt <Shift-Arrow>

22 views
Skip to first unread message

Joe Koenig

unread,
Aug 9, 2022, 10:18:09 AMAug 9
to
Hi,

confessions up front: I'm an Arrow-Key user.

Naturally, my .vimrc has a setting like:
set keymodel=startsel,stopsel

This seems to work with the standard Bash/XTerm configuration.
However, when using URxvt, I've noticed a slight misbehaviour:
<Shift-Left>/<Shift-Right> work as expected. They start a visual
selection. A consecutive press of an Arrow-Key (without <Shift>)
aborts the selection.
<Shift-Left>/<Shift-Right> work as expected.
<Shift-Down>/<Shift-Up> do not start the selection at all.

I don't think this this can can be singularly attributed to URxvt.
When editing a file with a different terminal-based texteditor, like
'mcedit', within URxvt <Shift-Down>/<Shift-Up> do work as expected.

Spitballing: I doubt it has something with my settings in
.Xresources or .inputrc.
However,
cat <Shift-Down> # in XTerm produces
^[[1;2B
cat <Shift-Down> # in URxvt produces
^[[b

Please, correct me if I'm wrong. I'd be glad to settle this via an
adjustment to said config-files.

Dunno where to go from here. After spending countless hours (yes,
that's sad) on debugging this, I thought it might be appropriate to
ask for some help.

Thanks for your attention
Joe


$ vim --version | head -3
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 03 2022 18:59:16)
Included patches: 1-135
Compiled by Arch Linux

$ uname -a
Linux Jessi 5.15.56-2-rpi-ARCH #1 SMP Mon Jul 25 12:40:48 MDT 2022
armv7l GNU/Linux

haron

unread,
Aug 10, 2022, 3:29:21 AMAug 10
to
Perhaps your termcap/terminfo for URxvt do not match what terminal sends if you press <Shift-Down>? Value of $TERM environment variable is as well important in that process as far as I understand.
(You may consider forward your question to vim...@googlegroups.com as well to get broader audience).

With best regards, Anton

Spiros Bousbouras

unread,
Aug 14, 2022, 11:01:28 AMAug 14
to
On 9 Aug 2022 14:18:06 GMT
Joe Koenig <joe.k...@gmx.de> wrote:
> Hi,
>
> confessions up front: I'm an Arrow-Key user.
>
> Naturally, my .vimrc has a setting like:
> set keymodel=startsel,stopsel
>
> This seems to work with the standard Bash/XTerm configuration.
> However, when using URxvt, I've noticed a slight misbehaviour:
> <Shift-Left>/<Shift-Right> work as expected. They start a visual
> selection. A consecutive press of an Arrow-Key (without <Shift>)
> aborts the selection.
> <Shift-Left>/<Shift-Right> work as expected.
> <Shift-Down>/<Shift-Up> do not start the selection at all.

So , if I understand correctly , it is <Shift-Down> and <Shift-Up>
which do not produce the expected behaviour , yes ?

Try doing
:nmap <S-Down> :echo "Hello world"

.Then pressing <Shift-Down> should show on the vim command line
:echo "Hello world" .If this works on xterm but not on URxvt
then it means that on the latter vim does not have the right idea
on what sequence of bytes <Shift-Down> produces. But lets start
with the above test and we'll take it from there.

Try the analogous for <Shift-Up> .
Reply all
Reply to author
Forward
0 new messages