Vim Keybindings in Characters from Different Languages
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the reported Greek-layout reproduction and the δδ versus dd behavior as the starting case. Trace how multi-key Vim commands are matched after remappings, then verify whether mapped single keys participate in sequences. Done means δδ performs the same line deletion as dd without requiring every two-key mapping to be listed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vim, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100