I am using a keyboard with a different layout than qwerty. This is a pain when I use vim editor so I decided to change my keyboard layout to qwerty only when I am using vim. I came up with an idea of using autocommand that changes the layout when I enter/exit Vim. (I am a vim newbie and I don't know much about vim and that was all I could think of.)
My Ubuntu is 18.04. I clicked the option key in Region & Language, Settings to "allow different sources for each window". The
setxkbmap command changes the keyboard layout system wide. Do you know how to make it work well or any other suitable command?
I would also appreciate any suggestions on how to configure vim (though this might be more appropriate to post in Vim's community site then).