reddit / emacs
Shortcuts and changing the keyborard layout
undev11 · 2022-08-03 08:36
I am currently on VIM and I have a big problem. I can't change the keyboard layout easily. HJKL to move around is great, I love it, they are aligned and side by side. When I switch to BÉPO (the DVORAK keyboard layout of the French) I lose all my shortcuts. I can then write a lot of rammapage settings but they won't work from one program to another. And it's very frustrating, ugly, not functional with some plugins. I use VIM shortcuts on vscode, and other software. I want to stay flexible in case I change IDE in a company for example.
Anyway, I don't dare to change my keyboard layout just because of vim.
I wanted to know if Emacs was also a problem when changing the keyboard layout.
PS: I recently bought a mechanical keyboard with layer keys (the Dygma Defy), so I'm wondering about leaving vim even though I like it a lot
_viz_ · 2022-08-03 10:35
No, Emacs keybindings are based on mnemonics not a historic keyboard's design decision.
TrillJabroni · 2022-08-03 13:38
There are plenty of eMacs VIM options. Doom eMacs is a very popular one.
SequentialDesign · 2022-08-03 15:00
Emacs's hotkeys do not rely on a 100-year-old+ layout that was designed to work on a typewriter. Qwerty is an inferior layout with many problems. Anything based or relying on it will be a failed system. Period.
I use my own custom layout, which is amazing. I can say that my layout and editor complement each other. I can change my layout whenever and however I want. I am not ruled by my editor. I rule my editor.
Man was not created for the text editor. Rather, the text editor was created for man. Never forget this.
zck · 2022-08-03 19:09
When you say you lose the shortcuts, what do you mean?
When you change to BÉPO, does pressing `i` in normal mode not put you into insert mode? Pressing the physical key that used to be `i` won't do that; only the key currently mapped to `i`. Yes?
The same is true for Emacs -- `C-e` moves to the end of the line, no matter if `e` is the third key to the right of tab, or the home row left index finger.
thetemp_ · 2022-08-04 01:42
Except for maybe X and C, Emacs's key choices don't appear to be made with location in mind at all.
So the answer is no, you won't lose any special key location patterns, because (unlike Vim) the key locations weren't special to begin with.
On the other hand, if you want to rearrange the command keys, it is quite easy to do in Emacs (as it is in Vim as well).
ideasman_42 · 2022-08-05 12:43
I had a similar issue wanting not to use QWERTY, but I remapped VIM keys instead since I quite like it's mental model.
The idea is to keep the same keyboard locations but be able to switch layouts.
I wanted to make something generally re-usable, but so far just have something that's working for me locally but not especially ready for release (docs, cleaning up etc).
Just to say I found the approach handy and could pastebin some examples if that helps.
undev11 · 2022-08-06 11:45
I've seen examples but in principle it doesn't work for me. And it doesn't allow to adapt correctly to non vim applications (obsidian, or other software using vim shortcuts)
undev11 · 2022-08-06 11:48
Vim has more of an approach to key positions than to key meanings. For example to move it is HJKL because it is close to the fingers.
zck · 2022-08-06 14:58
Emacs doesn't know the physical button you're pressing, only the letter that is typed. If you want to be able to press the same physical button, you'll have to do a whole lot of remapping.
CorysInTheHouse69 · 2022-10-27 06:38
I also run my own custom layout. I’m really curious what your’s is.
SequentialDesign · 2022-10-27 07:04
something like this https://configure.zsa.io/ergodox-ez/layouts/BPEGx/latest/0
I use foot pedals for space and shift
CorysInTheHouse69 · 2022-10-27 07:05
This is very interesting