I'm trying to add some readline keybindings into insert mode, like below,
inoremap <C-B> <Left>
inoremap <C-F> <Right>
inoremap <A-B> <C-Left>
inoremap <A-F> <C-Right>
The fist two work fine. However, when I try A-B
, it goes back one word but changes the mode
to normal mode. Also, A-f
only acts as Esc
key, changes the mode to normal mode.
I have other Alt
keybindings but they work fine. not sure what is special about these two.
NVIM v0.4.4
Debian buster/sid
Edit: some more info
- terminal emulator:
alacritty v0.4.3
, - I don't use tmux and the like,
- in terminal
alt
is^[
- in neovim
alt
isM
formeta
TERM=xterm-256color
$TERM
value you have. Are you inside tmux or screen or similar? If on the shell you start a command such ascat
and type<Alt-F>
or<Alt-B>
, what shows up? Inside Vim, in insert mode, what does the sequences<Ctrl-V><Alt-F>
produce?alacritty v0.4.3
. I don't use tmux and the like. incat
I see^[f
and^[b
respectively forA-f
andA-b
. inside neovim<Ctrl-V><Alt-F>
produces <M-f>! it seems, in neovimalt
acts as meta but in terminalalt
is some escape sequence, so there is no meta key to be pressed actually. I'll update the question with these information.echo $term
=xterm-256color
export TERM=alacritty
didn't help.vim-rsi
plugin. It works in urxvt and xfce4-terminal. I havent checked it yet on alacritty since I moved to urxvt. Nevertheless, I'm not sure if this is the answer to the question or not. I'll put an edit in my question.