Live data from Hacker News

Start Using Emacs – A Thorough Guide for Beginners

braveclojure.com

91–100 of 138 posts

Re: Start Using Emacs – A Thorough Guide for Beginners

#91
post #4

After about a year developing a love/hate relationship with Vim I've finally had enough. After reading this post I think I'm ready to make the switch. Very good writing. Thanks for posting it.

I tend to switch back and forth between Vim and Emacs and am curious. What causes the hate in your relationship with Vim?

I'm fully in the vim camp. I think vim is a way better text editor and non-modal editing is terrible, but vim is must less extensible and vimscript is trash. Emacs + evil would be perfect if it didn't mean having to rewrite all the bindings for all the plugins to be more vim-like.

Re: Start Using Emacs – A Thorough Guide for Beginners

#93

Earlier quoted context omitted.

I don't have problem with Elisp. That's actually lot easier than what IDEs offer as a way of customization (Java?), and that's one reason I am interested in Emacs :-). What I don't like is the transition period where I am not set up properly. It doesn't quite feel like learning, but rather reinventing the wheel. And I don't have big requirements either - I just need some sort of project management (being able to work…

C-h b - describe the key bindings for the current binding C-h f - describe a function C-h k - describe a key binding The help system in Emacs is wonderful.

> The help system in Emacs is wonderful.

Agreed. Plus the often maligned GNU info is actually good when you're browsing from within emacs.

More good help:

C-h i - Browse GNU info

C-h m - "describe-mode": Gives keybindings and help for the current major mode and all the active minor modes.

Re: Start Using Emacs – A Thorough Guide for Beginners

#94

Earlier quoted context omitted.

I believe the general ergonomic advice is to hit the modifier and "normal" key each with a different hand, so you're doing it right. I try to follow that guideline, but I frequently make exceptions. This is especially true since I have caps lock mapped to ctrl, so I favor that left ctrl button regardless of the other keys I'm pressing.

So for C-x, I should hit the command key with my right hand?

First off, the Mac "Command key" is not involved with "C-x". "C" is for "control". "Command" is often bound to the Emacs "Meta" key, which would be "M-x".

For C-x I generally hit Control with my left pinky and X with my left middle finger: since C-x is a "prefix" key, there's going to be another key I hit later and that will generally be hit with my left index finger.

However for the C-x C-s sequence I use my left index finger on X and my left middle finger for S. Same with C-x C-q.

For M-x I use my left thumb on the Meta key (my Mac's "Option" key in my case) and my left index finger on X.

Just like playing piano, there is no "right" way to map your fingers to the keys (everyone's hands are different, after all). If something feels wrong or is hurting, try using different fingers.

Re: Start Using Emacs – A Thorough Guide for Beginners

#95
post #35

Earlier quoted context omitted.

I use cmd for meta, there is an option for that: (setq mac-option-modifier nil mac-command-modifier 'meta)

I'll have to try that. Is this with the regular emacs in the Terminal app? Does it interfere with shortcuts like Cmd-N to open a new Terminal window?

That config is not for terminal Emacs. It's only for when you are running a native cocoa Emacs (like http://emacsformacosx.com). For terminal I always enable option as the meta key and use the OS Character viewer for the rare times I need to type a unicode character into the terminal.

Having option as meta is useful outside of Emacs, as "bash" (and other shells) use Emacs keys by default (M-d, M-f and M-b are all essential for me when I'm using bash).

I wish the OS would let me use the Fn key for doing fancy unicode characters (maybe Fn+option or something)—that way I could have good unicode input and my precious meta key.

Re: Start Using Emacs – A Thorough Guide for Beginners

#96
post #4

After about a year developing a love/hate relationship with Vim I've finally had enough. After reading this post I think I'm ready to make the switch. Very good writing. Thanks for posting it.

I tend to switch back and forth between Vim and Emacs and am curious. What causes the hate in your relationship with Vim?

Vim is an excellent text editor. But I mostly use it for coding, and that's the problem. Vim is not an IDE. It relies on plugins to deliver a half baked IDE experience. Sometimes these plugins are broken and other times they refuse to play nice with each other. As I sort of need them to get the job done I end up wasting time fixing broken things instead of solving real problems. That's why I'm ready to throw this tool away and move on. I might try Vim again in the future when things are a little bit more stable. Anyhow, thanks for all the fish.

Re: Start Using Emacs – A Thorough Guide for Beginners

#97
This is a great intro! I've been using Emacs since 1996 or so and I still learned a new key: M-m, which will go in my lexicon immediately.

BTW, "M-g g" (goto-line) is also bound to "M-g M-g" which I find much easier to type.

Another thing I discovered way too late about Emacs was the "q" key. When you're in a read-only buffer like a diff, a man page, an Emacs help page, or an info page, pressing "q" will bury the buffer and close the window (if it wasn't open before the buffer appeared). I find this tremendously useful.

Re: Start Using Emacs – A Thorough Guide for Beginners

#98

Earlier quoted context omitted.

C-_ is undo in Emacs. That's hold Control, and press "underscore". On my keyboard (most keyboards?) this requires holding Shift and pressing the "minus" key. Hopefully that's clear.

C-/ is also undo, which is arguably easier to reach :)

Or C-x u

Re: Start Using Emacs – A Thorough Guide for Beginners

#99

I tried to get into Emacs on OS X a few times, but one of the things I don't like is the awkwardness of not having the Meta key mapped to a direct simple key press. Activating the "Use option as meta key" isn't a good solution because I sometimes need to type accented characters that require the option key. How do people deal with this when using Emacs in the OS X Terminal app?

You can enter accented characters into emacs by hitting M-x 8: M-x 8 ` e -> è M-x 8 / a -> å M-x 8 E -> € The number of these binds does not cover all of unicode, but it's surprisingly high nonetheless. If your desired character does not have a direct bind like that, or you just can't find one (C-h b lists them), you can insert a character by hitting M-x 8 RET and then typing its name: M-x 8 RET "Em dash" -> — M-x 8…

It's C-x 8, not M-x 8. Use C-x 8 C-h for help
Post reply on HN