Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Vim Keybindings in Characters from Different Languages

Open Adam-Antios opened this issue 5 years ago • 2 comments

When I use the Vim keybindings with latin characters everything works fine, but when I change my keyboard layout to a different layout then non of the Vim keybindings work.

The same thing happens to Vim also, so I remapped all the letters (uppercase too) like this

   {
        "before": ["q"],
        "after": []
    },
    {
        "before": [";"],
        "after": ["Q"]
    },
    {
        "before": ["ς"],
        "after": ["W"]
    },
    {
        "before": ["Ε"],
        "after": ["E"]
    },
    {
        "before": ["Ρ"],
        "after": ["R"]
    },
    {
        "before": ["Τ"],
        "after": ["T"]
    },

Now with that the keybindings with single keys work fine but those that need two keys don't. For example δ is mapped to d, so when you press δδ it should delete the line like dd does. But it doesn't. In order to do that I should make the following remap, with which it works

    {
        "before": ["δ", "δ"],
        "after": ["d", "d"]
    }

The second step is not necessary for Vim and also it is not a viable option to remap everything like this. Furthermore it shouldn't be needed given that all the keys are already mapped.

Do I miss something? Is there a better way to achieve this? At the moment it seems to me like a bug or perhaps a missing feature.

Also thank you all devs for the great work you did in this extension!

Adam-Antios avatar Mar 29 '19 05:03 Adam-Antios

There is an option. It will change your input method to latin when you exit Insert Mode, so Normal Mode keybindings will work. When you enter Insert Mode again it will restore your current input method, so you won't have to switch keyboard layout.

v-yadykin avatar Jun 15 '19 16:06 v-yadykin

There is an option. It will change your input method to latin when you exit Insert Mode, so Normal Mode keybindings will work. When you enter Insert Mode again it will restore your current input method, so you won't have to switch keyboard layout.

could you provide an example? I'm coming from a pure vim setting that no longer seems to work with vscodevim. My setting so far has been the following(in vim.init/vimrc) set keymap=bulgarian-phonetic. But I get an error saying "unknown option keymap" when execute the command with :, and nothing at all when source from .vimrc. Either way it doesn't work.

zenVentzi avatar Jul 21 '22 21:07 zenVentzi