OutOfCharm · 2022-12-04 07:39
Tweaking emacs with satisfication is not easy, but I am trying to think how it would work efficiently. The problem of the naive emacs keybindings is that it over relies on the `ctrl` key, default layout of modern computer keyboard makes it effort-some to do navigation. In my opinion, the `alt` (or `meta`) key should be paid more attention as we can balance between those two kinds.
The first thing I found is that using `arrow` keys to navigate is fine, but not efficient, as its up and down arrow is not so coherent, and most of times we need rely on the thumb to hit the keys separately. While `ctrl-n` and `ctrl-p` can be an alternative to move around between lines, the same as `alt-n` and `alt-p`, for which I would suggest that using it as `forward-paragraph` and `backward-paragraph`. It can be smoother as oppose to the `ctrl-<down>` and `ctrl-<up>`, in the mean time, you can utilize the other combinations such as `alt-f`, `alt-b` to move forward word or backward. In that sense, `alt` key becomes a bold version of `ctrl` key, since it jumps fast and corresponds to every navigation key that `ctrl` has. We can therefore switch between those two modifier keys to move in a small pace or in a larger pace without intervening the arrow keys. At the same time, we can assign more combinations to the prefix key `alt-s` corresponding the `ctrl-x`. If we can stay mostly at the left region, the keystroke would be more efficient. If we can utilize those two kinds to the best, we can balance the left and right region, such as buffer navigation uses right hand-side `alt-[` and `alt-]`, and buffer switch uses `alt-\`.
I also want to listen to your suggestions, as I believe everyone has their own opinions and configurations to make a balance, not be overloaded, while be efficient.
Edit: I have remapped `caps` to `ctrl`.
nu0or · 2022-12-04 07:51
its emacs. do what you want.
oz10001 · 2022-12-04 07:54
best answer
OutOfCharm · 2022-12-04 08:07
Yeah I agree. But It is not friendly to new comers. Standard keybinding is always at everybody's first glance.
Ill_Pause3020 · 2022-12-04 08:58
Put Control where Meta is on current keyboards, and all is good. No need to redesign a good design, and how Emacs was initially designed.
ntrysii · 2022-12-04 09:02
for me the best way to use emacs keybinding is this:
1. find a keyboard where the space bar not like 10 meters long.
2. remap right alt to ctrl
in this setting you have ctrl and alt under your right and left thumb, this would take sometime to get used to but this is more convenient than the normal keymap.
also you could try using caps as your ctrl but this might strain your pinky.
Cletip · 2022-12-04 10:48
Check the package "Xah-fly-key".
I can't use emacs anymore without this package.
OldMansKid · 2022-12-04 12:59
Well, I personally think the default key bindings are fine. I do make use of ace jump, ace window too. And I'm also fine with Rider/VSCode/VS/Qt Creator, except "Vi" modal editing, I often forget what mode I'm in, so I don't use that. I mean, when looking at code, the key bindings of my IDE really aren't and shouldn't be the concern here.
ergonaught · 2022-12-04 13:36
The CTRL thing was never a problem for me, especially after mapping caps lock to ctrl.
[deleted] · 2022-12-04 21:24
[deleted]
[deleted] · 2022-12-04 21:25
[deleted]
mariostepbro · 2022-12-04 21:55
This is what I do:
1) Remap Caps Lock to Menu key
2) Remap Menu key to Super\_R (cause my keyboard doesn't have a natural Super\_R) - this is optional
3) Map some functions that need repeating to the Super keys, like "s-<left>" for previous buffer.
4) Map most functions to the Menu key but as a Leader key (through "General"), i.e. "Menu B" to show buffers not "Menu-B". This is the main mode of keybinding I use and I have tons of bindings under Menu. I.e. "Menu t h e" to switch **the**me "Menu t h l" to **t**oggle **h**igh**l**ighting
5) Assign some F-keys to keymaps, i.e. F9 for projectile-command-map
6) Keep everything else vanilla and keep **pressing Ctrl with the bottom of my palm** like I always did.
7) From time to time I will remap some new command that I learn and use regularly to the leader Menu key.
I still use the arrow keys for single character movement though inside Emacs.
I don't care all that much about "efficiency"... If efficiency means that I need to break my fingers with keyboard juggling, to win some milliseconds, scrap that, it's not efficient on my terms.
pedzsanReddit · 2022-12-05 00:48
I'm on a Mac. I mention that because I'm not sure what other platforms offer.
I have recently remapped caps lock to be a 2nd control but I never use it. This is because long ago, the systems I was using this wasn't possible -- at least as best I can recall. So I've gotten use to curling my pinky under to hit the control key. But that isn't a recommendation.
I have left option and command mapped to meta and super (the defaults). I had them flipped for a long time but when macOS changed to zsh, it became a clear advantage to keep with the defaults to make the bindings of zsh similar to those in Emacs.
I have right option and command mapped to alt and hyper -- which I just recently did.
Slowly I'm adding bindings to super, alt, and hyper trying to distribute the work across across the five cord keys. Each of these changes will take time to creep into muscle memory.
Long ago, before `toggle-input-method` existed, I created my own `personal-keymap` and bound it to `C-\` and then added my customized bindings and functions to that map. (I also don't see the need for `toggle-input-method` to be so easily accessible. I've never used it once on purpose.)