Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does vim support non-ASCII commands?

I often write text in Russian. I use set langmap for translating Russian characters to English, so commands like i and d work also in a Russian layout.

But it does not work for a command started from : like :wq -- vim translates Ж to : as described in langmap, but other characters are unaffected, and I want to use :цй instead :wq.

I tried to use :command цй wq to make alias, but take E182: Invalid comand name.

Do you have ideas on how to translate Жцй to :wq?

like image 606
tse Avatar asked Mar 07 '26 04:03

tse


1 Answers

You could use cmap or cabbrev. For example

cmap цй wq

cabbrev цй wq

cabbrev is probably what you want since you don't have to enter a Space afterwards.

like image 127
Conner Avatar answered Mar 10 '26 10:03

Conner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!