I can't type words in vim

My keyboard contain 87 keys, and I just compared bothe ubuntu and manjaro,
I found out that, when I type words in vim under manjaro linux,
I can’t move the cursor using up/down/left/right arrow key,
and I found out that both my laptop embeddd keyboard or my 87 keys machine keyboard,
they just can’t focus the cursor, I think this is a bug,
and this last for a long time.
and I found out that ubuntu didn’t has this issue.
so puls help to solve this.
thx.

Hi @petercao,

It might be that your locale isn’t right. Check the output of

locale

and

localectl

Make sure the settings are correct according to:

https://wiki.archlinux.org/title/Locale

I tried follow you direction, but it doesn’t work.

Please recheck your keyboard layout. 87-key layout is a common laptop layout.

There is nothing with Manjaro which works different in that regard.

Please post the output (in textual format using code fence) from

cat /etc/X11/xorg.conf.d/00-keyboard.conf

How to paste commandline output

~~~text
 $ cat /etc/X11/xorg.conf.d/00-keyboard.conf 
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "dk"
EndSection
~~~

Sorry for delay replay,
I will past my keyboard conf later;
and I found out that neovim don’t have this issue, left/right/up/down arrow can work well,
only in vim edit mode, this issue occured,
so I think maybe this is caused to the vim bugs?
sudo pacman -S vim ?
Is that right for install vim ?

It’s not a bug. Due to your unusual keyboard, you’ve probably got vim set up to use the old keyboard navigation keys from the original vi editor… :arrow_down:

  • H = one character to the left
  • J = down one line
  • K = up one line
  • L = one character to the right

my conf print:

  cat /etc/X11/xorg.conf.d/00-keyboard.conf                                                 ✔ 
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "cn"
EndSection

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

I think you are right, so howt to change my keyboard layout to std left/up/right/down?

Considering that this is only an issue in vim — at least, that’s what I deducted from what you wrote — it is probably a setting in the vim configuration file. Check the dotfiles in your $HOME and/or the files under ~/.config and ~/.local/share.

I didn’t find any vim config files in your provide paths,
so what should I do to change my keyboard layout? to match l/r/up/down?

Maybe not what you want to hear, but you could use another editor. There are several vi-like editors, as well as completely different ones (such as emacs). Or you could use gvim, which is a GUI version of vim.