reddit / emacs

Emacs on a Mac

pedzsanReddit · 2022-09-29 20:04
I use to get [Emacs for Mac OS X](https://emacsformacosx.com) but now I just download the latest source tarball. I do: ``` ./configure --with-ns make make install sudo xattr -rds com.apple.quarantine nextstep/Emacs.app ``` and then move the app bundle to `/Applications`. But that's not what I'm here to talk about 😃 When macOS switched to [zsh](https://www.zsh.org) I went through a painful transition. Before then, I had my `ns-command-modifier` set to `meta` so `M-x` would be `cmd X` for me. With `bash`, that was ok. But `zsh` opened new possibilities for me and it really wanted the meta on the options key rather than the command key. I honestly don't remember what the pain point was. But in any case, I remapped my emacs to be just the defaults where `ns-option-modifier` is set to `meta` and `ns-command-modifier` is set to `super`. `zsh` and `emacs` have a lot of common abilities so I wanted the key mappings to be the same in both. Rather than twist `zsh` to accept my unique setup I untwisted my unique `emacs` setup to be more normal. Now, I have an entire set of keys, the "super" keys that I've never had easy access to before. For example, using tabs in emacs, I can bind `s-{` to `tab-previous` and `s-}` to `tab-next` and switch between tabs just like it was Safari. Instead of two key `C-c p` for `Projectile`, (they even suggest), one key `s-p`. I'm mapping `s-r` to `projectile-rails`, `s-y` to Yari, etc. It was and still is a bit painful of a transition but it is well worth it.
redblobgames · 2022-09-29 20:10
I'm doing the same. I option set to meta, and command set to hyper (I had been using super but switched to hyper for reasons I can't remember). I love having a whole lot more keys to work with, and I also can use mac-compatible bindings for some of them.
BunnyLushington · 2022-09-29 21:21
Like you, I get a lot of mileage out of the additional modifiers. On my HHKB the bottom row is `alt - meta - space - super - hyper` and gosh does it work out well. (Control on the HHKB is next to the A.) What's particularly nice about the setup is that I've managed to free up the few C-M-xxx bindings that I use with any regularity (by rehoming them to H-xxx) and dedicate the C-M-xxx chords to [yabai](https://github.com/koekeishiya/yabai).