Can't skip words in micro-editor using ctrl + arrows

On pressing the keyboard shortcut ctrl + arrows
in the micro editor instead of the transition between words appears:
arrow left - [1; 5D]
arrow right - [1; 5C]
arrow up - [1; 5A]
arrow down - [1; 5B]

I know it has something to do with / etc / inputrc. Please help me fix this problem.

/etc/inputrc

#set bell-style none

set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

$if mode=emacs

for linux console and RH/Debian xterm

“\e[1~”: beginning-of-line
“\e[4~”: end-of-line
“\e[5~”: beginning-of-history
“\e[6~”: end-of-history
“\e[7~”: beginning-of-line
“\e[3~”: delete-char
“\e[2~”: quoted-insert
“\e[5C”: forward-word
“\e[5D”: backward-word
“\e\e[C”: forward-word
“\e\e[D”: backward-word
“\e[1;5C”: forward-word
“\e[1;5D”: backward-word

for rxvt

“\e[8~”: end-of-line

for non RH/Debian xterm, can’t hurt for RH/DEbian xterm

“\eOH”: beginning-of-line
“\eOF”: end-of-line

for freebsd console

“\e[H”: beginning-of-line
“\e[F”: end-of-line
$endif

.config/micro/bindings.json

{
“Alt-/”: “lua:comment.comment”,
“CtrlUnderscore”: “lua:comment.comment”
}

Hi @punpun8, and welcome!

Do you have the Manjaro micro setttings installed?

pamac search micro
[...]
micro-manjaro                                                                                                                                 3.0-4                                                        community
Manjaro settings for Micro

If not, install it with:

pamac install micro-manjaro

That’s all I did, and it worked like a charm for me.

Also, replace ~/.config/micro/bindings.json with the one found here.

Hope this helps!

4 Likes

I have been using Micro for years - I don’t have the issue you describe - but it could - in theory - an environment issue where certain keypresses are captured by the window manager.

Just install the package micro from the official repo.

➜  ~ micro --version
Version: 2.0.9
Commit hash: 6bc498e6
Compiled on May 17, 2021

Please provide more detailed info on your environment.

It worked! Thanks for the quick response!

You’re welcome!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.