6 ms·
I'd love to take this opportunity to dive into Emacs, but the past few times I've tried, it's felt like my keyboard was fighting against me. For those of you us
by unit_testing 15y ago
I'd love to take this opportunity to dive into Emacs, but the past few times I've tried, it's felt like my keyboard was fighting against me. For those of you using Emacs on a Macbook (or an Apple keyboard), which key do you use for 'alt'?
- tjr 15y agoEsc
- raju 15y agoI use the "Apple" key ... Put this in your .emacs file (setq mac-option-modifier 'super ) (setq mac-command-modifier 'meta ) I also use the System preferences to map the Caps-Lock key to Ctrl - A lot easier especially since a lot of keyboards tend to move the CTRL key around
- chrismealy 15y agooption
- ihodes 15y agoI use 'option', also labeled 'alt' on my keyboard. You can set it to act as 'meta' via your preferences. Use iTerm 2.
- aiscott 15y agoI use option like the others have said. I am like you, diving into Emacs; in my case purely for the swank/slime lisping environment. It's been pretty difficult as I am a dyed in the wool VIM user. Someone on HN recommended the Evil plugin (http://gitorious.org/evil/pages/Home http://gitorious.org/evil/pages/Home) for an approximation of VIM movement and other bindings. It surprisingly works pretty well. It's letting me remain productive while I slowly adapt to the emacs key-bindings over time. I am using emacs-prelude as well (https://github.com/bbatsov/emacs-prelude https://github.com/bbatsov/emacs-prelude) which is a startup scripts kit. I'm still not sold on emacs yet, but I am giving it time.
- ryane 15y agoI've been using Evil for a couple of months and love it. I switched from Viper+vimpulse and haven't missed a beat. It works really well and was easier to setup. Any VIM user considering Emacs should give it a shot - the best of both worlds, really.
- cgag 15y agoI've been using evil mode and don't really see why you'd even want to move away from the vim bindings. Get the best of both worlds, the nice vim movements and model editing, plus all the nice emacs packages and being able to use elisp instead of vimscript.
- Wilduck 15y agoI use CarbonEmacs [1] on my Macbook. The default 'meta' is the cmd key, which I prefer, as it's closer to what I'm used to on other keyboards. I also remap (globally) caps-lock to be a second ctrl. [1] http://homepage.mac.com/zenitani/emacs-e.html http://homepage.mac.com/zenitani/emacs-e.html
- technomancy 15y agoFor the record, Carbon Emacs is Emacs 22, which is very old (c. 2007) and deprecated.
- deleted 15y ago[deleted]
- pnathan 15y agoI remapped the Apple key for alt on my MBP. It truly is frustrating; alt is not in a very nice position at all. FN is where I would prefer ctrl to be. When I really need to get writing at home, I plug in a MS N4K and go at it.
- shabble 15y agoSee the sibling comment by raju for the specifics, but you can actually bind the Fn key with the `mac-function-modifier' variable. I'd thought for a long time that Fn was a hardware/OS-only key based on the lack of apps that use it, but it seems Emacs has found a way.
- jshen 15y agoI pretty much only use emacs on a mac. This means I don't care about having a keymap that is the same on a linux box. So, I use option for 'alt', but here's the great thing. You can use the command key for other stuff! I've got keybindings for my most common actions. command-j -> ido-find-file command-d -> anything etc
- adestefan 15y agoI use the Apple key as Meta and the Caps Lock key for Ctrl. On a Linux box I use the Alt key as Meta and the Caps Lock Key for Ctrl. With this setup the keys are in the same location for every keyboard and I don't get so confused.
- alsocasey 15y agoAlternately, go the Steve Yegge way and rebind meta to C-x-C-m and C-c-C-m: (global-set-key "\C-x\C-m" 'execute-extended-command) (global-set-key "\C-c\C-m" 'execute-extended-command)
- sdevlin 15y agoThese bindings are only for M-x. This is still useful (M-x is really common), but it's not a full replacement for all meta bindings.
- gcr 15y agoExactly. The problem with keyboards is that the alt key is right under your thumb, right where Ctrl should be. You might take a look at http://xahlee.org/emacs/ergonomic_emacs_keybinding.html http://xahlee.org/emacs/ergonomic_emacs_keybinding.html , which is a remap of common emacs keybindings to fit underneath the alt key. Sure, this is an invasive change, but it saved me from RSI.