VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.93k stars 1.32k forks source link

Vim Keybindings in Characters from Different Languages #3637

Open Adam-Antios opened 5 years ago

Adam-Antios commented 5 years ago

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!

v-yadykin commented 5 years ago

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.

zenVentzi commented 2 years ago

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.