Live data from Hacker News

Ask YC: Why is emacs a great editor?

news.ycombinator.com

61–70 of 84 posts

Re: Ask YC: Why is emacs a great editor?

#61
post #17

Earlier quoted context omitted.

This is the second time I've read this: > mapping CAPS-LOCK to be CONTROL. Why? At least in my laptop CAPS-LOCK is easier me to press than CONTROL if I want CAPS, maybe there is another reason for it?

That puts control on the home row. You'll be pressing / holding down control quite often in Emacs. (Frequently typed characters should be on the home row for efficiency. That's why Qwerty has semicolon on the home row.)

"Frequently typed characters should be on the home row for efficiency."

Only if you miniscule hands and recordbreakingly narrow shoulders.

Re: Ask YC: Why is emacs a great editor?

#62
post #9

Earlier quoted context omitted.

I just read Steve Yegge's "Effective Emacs", thanks for the link. It was very enlightening on many levels and told me several things that were written between the lines, namely: - Initial user experience is (very) secondary to long-term efficiency - if you aren't in this for the long term don't bother - the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs u…

Many are a fan of using the Caps Lock key as Control. While better than the insane standard positioning, it's still not optimal: it's not symmetrical between your hands (you're not going to remap Return as another Control) and it still makes for a lot of awkward pinky use. (Imagine playing a piano piece all with your 3rd, 4th and 5th fingers.) The optimal solution I've come up with is to use the two keys adjacent to…

Another solution is to keep the Ctrl keys where they are (note the plural), but hit them with the side of your hands: you just need to roll you hand a little bit to the outside. It takes a little practice to do this reliably, but it cures pinky pain (at least for me).

Use the hand that is not hitting the key: for C-s use your right hand for the Ctrl, and left for s. C-n the other way round. For Meta, make sure that both alt keys work, and use your thumbs: M-x right thumb and left fourth finger.

- You can't do this for C-M combinations, but they are few and far between.

- You have to have a keyboard where the keys "stick out" a little. So it does not work on laptops.

The only real issue I had was that moving around is a little slow and awkward: When going back and forth from C-f/b to C-p/n your hands are moving a lot. So I remapped C-f to C-; and C-b to C-j (and similarly for M-f & M-b) and now I can press Ctrl/Meta with my left hand and move around with my right one: bliss.

Re: Ask YC: Why is emacs a great editor?

#63
post #9

Earlier quoted context omitted.

I just read Steve Yegge's "Effective Emacs", thanks for the link. It was very enlightening on many levels and told me several things that were written between the lines, namely: - Initial user experience is (very) secondary to long-term efficiency - if you aren't in this for the long term don't bother - the article actually suggestes swapping the caps lock key and the ctrl key to have it better positioned for emacs u…

Many are a fan of using the Caps Lock key as Control. While better than the insane standard positioning, it's still not optimal: it's not symmetrical between your hands (you're not going to remap Return as another Control) and it still makes for a lot of awkward pinky use. (Imagine playing a piano piece all with your 3rd, 4th and 5th fingers.) The optimal solution I've come up with is to use the two keys adjacent to…

That´s interesting. I wonder if a new USB keyboard with the Knight or Space Cadet lay-outs would sell on ThinkGeek.

I would be the first one to buy.

Re: Ask YC: Why is emacs a great editor?

#64
post #54
post #19

I remember when, having coded in emacs for a few years, I used it for the first time to do a 3-way merge on thousands of lines of code. The amount of time and effort I saved astounded me. The point here is twofold: 1) emacs is very well integrated with extremely powerful tools (in this case diff, merge) 2) emacs is deep; even as an advanced user you can keep improving your efficiency (albeit at a lower rate) Having s…

I am no coder, I use Emacs as my 'DTP package. But I can relate something rom graphic design. Why a graphician should be able to draw stuff with pen and paper rather than only work at the computer? Because the connection between thought and hand is faster with pen and paper. Hence, broadband output and feedback loop. Not just faster but enhaced quality: so fast that feedback loop becomes subconscious, direct, flow. M…

Yes, particularly with good development modes (e.g. SLIME for common lisp, Tuareg for OCaml), the feedback loop between the language runtime and the editor is immediate.

Re: Ask YC: Why is emacs a great editor?

#65
post #3

As a followup question, what is the best resource to most efficiently learn the basics of Emacs?

In Emacs, press Control-h, let go of Control, and press t. That starts the tutorial, which will probably take about half an hour. After working through that, some combination of reading the Emacs Wiki ( http://www.emacswiki.org/cgi-bin/wiki ) and a recent edition of _Learning Gnu Emacs_ will get you off to a good start. Getting really effective with Emacs takes a while (probably at least a month), but it is very deli…

In Emacs, press Control-h, let go of Control, and press t. That starts the tutorial, which will probably take about half an hour.

IMHO, the tutorial is useless. It spends too much time on C-p and C-n and not enough time on anything useful.

I recommend reading the Info documentation. It is very well written and very complete. You should also read the Elisp reference manual; having an understanding of the internals is helpful even if you don't intend to program emacs.

Re: Ask YC: Why is emacs a great editor?

#66

> Why is emacs a great editor? It isn't--don't believe the hype. On the other hand, I couldn't write a line of code without IntelliSense. Does anybody know anything about Emacs.Net that Microsoft is working on? http://www.knowing.net/PermaLink,guid,31fdc849-db2a-4f7d-bf9...

In Emacs, etags plus dabbrev-expand plus tags-apropos equals Intellisense (or close enough for shooting). A lot of Emacs' power comes from this Unixy ability to string together tools to create something unexpected...

Re: Ask YC: Why is emacs a great editor?

#67

Earlier quoted context omitted.

In Emacs, press Control-h, let go of Control, and press t. That starts the tutorial, which will probably take about half an hour. After working through that, some combination of reading the Emacs Wiki ( http://www.emacswiki.org/cgi-bin/wiki ) and a recent edition of _Learning Gnu Emacs_ will get you off to a good start. Getting really effective with Emacs takes a while (probably at least a month), but it is very deli…

In Emacs, press Control-h, let go of Control, and press t. That starts the tutorial, which will probably take about half an hour. IMHO, the tutorial is useless. It spends too much time on C-p and C-n and not enough time on anything useful. I recommend reading the Info documentation. It is very well written and very complete. You should also read the Elisp reference manual; having an understanding of the internals is…

I definitely agree about the Info documentation (I forgot to include that), but I think the tutorial is still worth doing: it covers the extreme basics using Emacs's terminology. It's hard to figure out how to do some things in Emacs via the info pages (or apropos, emacswiki, etc.) without knowing that, for example, each pane inside the Emacs window is called a "window" (Emacs calls the main window(s) "frames").

Also, it covers some conceptual things upfront, like how C-f is forward-char but M-f is forward-word, and that M-somekey is often a more abstract version of C-somekey. (Also, how to read the "C-x M-c butterfly" style keyboard shortcuts in the first place.) A lot of the things it covers ("C-x C-s is save") are pretty basic, but it tries to introduce some of Emacs's cultural/design quirks, which are probably what really trip up a lot of people.

Re: Ask YC: Why is emacs a great editor?

#68
I've been using for months. It took a while, and the O'Reilly book, Yegge's post, and EmacsWiki were all extremely helpful (in that chronological order). You might also consider just reading the manual too (although you might want to hold off until you have more experience).

Another resource that will be really helpful somewhere in there is to just type C-h C-h. You'll see a listing of various kinds of help. I use these a lot, especially to explore something new:

C-h k (type any keyboard shortcut) "what does this shortcut do?"

C-h b "list all keyboard shortcuts from all modes in the current buffer"

C-h f (type a function name) "what does this function/command do?"

C-h v (type a variable name) "what does this variable do, and what is its value?"

C-h a (type a regexp) "list all commands matching the regexp"

M-x apropos (type a regexp) "list commands, functions, variables, etc. matching the regexp"

Re: Ask YC: Why is emacs a great editor?

#69

I spent a couple hours every day doing the basics (first learning buffers, then file stuff, then on and on...) within a week I had decided to switch from VIM. (I used only emacs while on vacation for any editing I needed to do) My suggestion - stop reading all the tutorials and just do it. Keep a list next to your computer with 5 things you need to know how to do - with the key strokes next to them. Once you become c…

Also, first things first, Control-H followed by t brings up a tutorial. Work through that, it covers all the basics.

And after than (as jrockway noted elsewhere), press Control-H i to get to the Info pages menu, which is the hypertext documentation inside Emacs. What you're looking for is almost certainly in the main Emacs section or the Emacs FAQ.

Info has its own manual, but most of what you need to know to start is that Enter visits a hyperlink (which are probably purple and/or bold), 'u' goes up one level, 'n' and 'p' go forward/backwards one node, and 's' searches. (To get a more detailed keyboard shortcut list, type "Control-h m" inside of the info buffer.)

Re: Ask YC: Why is emacs a great editor?

#70

Have you read O'Reilly's Learning Emacs ? I strongly recommend it. It's a useful tour guide. Failing that, have you read the tutorial? Have you read Steve Yegge's "Effective Emacs"? If none of that can help or inspire you then I probably don't have much chance. But I'll offer you some coaching anyway. Imagine Vince Lombardi reading this to you: Stop using the mouse. If you're using emacs and you're touching the mouse…

Just a nitpick: The O'Reilly book title is actually _Learning GNU Emacs_. (http://oreilly.com/catalog/9780596006488/)
Post reply on HN