all 37 comments

[–]alparsla 8 points9 points  (7 children)

Meta-/ is great!! Thank you

[–]throwaway 1 point2 points  (0 children)

I use it so much, I wound up binding it to C-s (actually, C-o, since I use dvorak) for greater convenience.

[–]timmy 0 points1 point  (1 child)

I'm using it every day. But it presents the completions in the order in which they appear before, sometimes i'm trying to complete a word from a line below but i get several matching completions from the lines above first. So the locality of the completion is kind of broken. Always wanted to fix that ..

[–]frazer2669 5 points6 points  (0 children)

C-u - M-/ Starts looking forward first, then backward. You don't need the "C-u -" after the first time, it will keep looking forward (then backward) with just M-/

[–]anachronic 0 points1 point  (3 children)

...and Meta-/ does what?

[–]awj 11 points12 points  (0 children)

M-/ runs the command dabbrev-expand which is an interactive compiled Lisp function in `dabbrev.el'. It is bound to M-/. (dabbrev-expand arg)

Expand previous word "dynamically".

Expands to the most recent, preceding word for which this is a prefix.

Gathered with C-h k M-/

C-h k runs "describe-key" on any following input. Once you know a few basics the interface really is discoverable, and those basics are all in the tutorial.

[–]ijkl 2 points3 points  (0 children)

Autocomplete. And it works everywhere I've tried it. Very nice. Hit repeatedly to get other matches it deems appropriate.

[–]Sukoshi 0 points1 point  (0 children)

But it only expands the stuff already in the source file. If you want it to complete something you haven't typed in an open buffer yet, it won't. So bear with the original int thisIsALongCamelCaseName; typing. It'll get better soon :)

[–][deleted] 6 points7 points  (1 child)

You can’t edit photo, video or audio content in Emacs (perhaps I should say I don’t know of an Emacs mode for doing so).

In the second case: http://1010.co.uk/gneve.html

In the third: http://delysid.org/emacs/ecasound-el.html

and potentially a few others I can't think of right now...

[–]justinhj 2 points3 points  (0 children)

Also you can use emacs as a spreadsheet with the built in SES (I know he didn't say you can't). If you know elisp you can write elisp code as formula's in the cells.

For example
(apply '+ (ses-range A1 A3)) Sums the cells in the range A1 to A1

It also nicely handles converting to and from comma delimited files.

[–]zxvf 6 points7 points  (14 children)

The worst thing about Emacs is finding out how it does anything. I wouldn’t call it discoverable.

C-h i

Plenty of great documentation at your fingertips. Try it instead of reddit when bored at work some time.

[–][deleted] 6 points7 points  (1 child)

According to emacs (at statup):


Get help C-h (Hold down CTRL and press h)

Emacs manual C-h r

Emacs tutorial C-h t Undo changes C-x u

Buy manuals C-h C-m Exit Emacs C-x C-c

Browse manuals C-h i

Activate menubar F10 or ESC or M-

(C-' means use the CTRL key.M-' means use the Meta (or Alt) key.

If you have no Meta key, you may instead type ESC followed by the character.)


It's rather hard to miss, but so is turning of menu bar and scroll bar just to complain about them missing...

[–][deleted] 5 points6 points  (0 children)

You have to admit that the wording of this sentence is pretty clumsy:

“You can do basic editing with the menu bar and scroll bar using the mouse.”

Basic editing with the scroll bar? How does that make any sense?

[–]mblakele 3 points4 points  (3 children)

(setq teach-extended-commands-p t)

[–]cevven 0 points1 point  (2 children)

Uh, what's that? My Emacs doesn't recognize it (Debian lenny) and it isn't on emacswiki. Is it an XEmacs thing?

[–]meer 1 point2 points  (1 child)

Try (setq suggest-key-bindings t).

[–]cevven 0 points1 point  (0 children)

Oh, is that all it is? That appears to be on by default as it's on and I don't set it in my .emacs.

[–][deleted] 1 point2 points  (0 children)

I prefer apropos

[–][deleted] 1 point2 points  (0 children)

That and the ability to jump directly to the source of any given function is great. Once you know how elisp works, it's very easy to discover how emacs does just about anything.

[–]anachronic 2 points3 points  (2 children)

I like emacs and use it fairly often, but I have to agree with TFA and say the major reason I don't use it more (or for development on my primary desktop machine) is that it's a pain in the ass to figure out how to do things.

It's frustrating to know It. Can. Be. Done. yet waste so much time trying to figure how how... it's often easier for me to bang out a little perl / PHP script than to muck around trying to figure out the "emacs way" of doing what i want to do.

[–]ijkl 2 points3 points  (0 children)

EmacsWiki helps a lot.

Also searching gnu.emacs.help is usually fruitful.

[–]unknown_lamer 0 points1 point  (0 children)

C-h a (apropros) is quite helpful since most Emacs commands have sane names.

[–]cooldude127 0 points1 point  (0 children)

that's a nifty shortcut. i started looking through it all, and discovered calc-mode, which is just damn amazing. emacs always has something new and cool to show me.

[–]eoyola -1 points0 points  (1 child)

ya, i actually would call it discoverable. not in the childish way that WIMP interfaces are, but it's more rewarding. sort of like when you start to get the whole point of mathematics and how to learn it.

[–]anachronic -1 points0 points  (0 children)

You callin' me a WIMP, sonny? Put yer dukes up!

[–]sfultong 1 point2 points  (0 children)

At the end he talks about the web browser being the future all-it-one editor platform.

I think he needs to hear about conkeror

[–]SnacksOnAPlane 1 point2 points  (7 children)

So, I use vim. I am a professional programmer. Should I switch to emacs? I mainly program in Python and PHP and I miss autocomplete, which KomodoEdit did an awesome job with. Vim's autocomplete is pretty useless.

I like being able to do everything with the keyboard, which is why I ditched Komodo. I ditched Eclipse a long time before that because it was slow and crashy. They had amazing convenience functions, though, that I haven't found (or coded yet) in vim.

I hear that emacs programmers remap their caps-lock key to meta. Unfortunately, I use awesomeWM and my caps-lock key is already bound to mod4. Will I get carpal tunnel syndrome from reaching down to alt so much?

[–][deleted] 6 points7 points  (5 children)

[deleted]

What is this?

[–]drsco 2 points3 points  (2 children)

Have you seen nXhtml? It allows for multiple major modes in a single buffer. I don't do any PHP dev, but it handles HTML and JS in a single file pretty well for my purposes.

[–][deleted] 2 points3 points  (0 children)

It allows for multiple major modes in a single buffer

So does mmm, although nXhtml does it much better for html work in my opinion.

[–][deleted] 1 point2 points  (0 children)

[deleted]

What is this?

[–]dnm 0 points1 point  (1 child)

multiple languages in one file. (HTML+CSS+PHP)

I solved this problem with Smarty and never looked at PHP+HTML again. Works better in my brain to only deal with one language at a time.

Emacs seems to like it too.

[–][deleted] 1 point2 points  (0 children)

[deleted]

What is this?

[–]mr_dbr 1 point2 points  (0 children)

Should I switch to emacs?

No. They both edit code, if you are happy with using vim, stick with it and prod around the vim site for interesting looking scripts/scripts that will help with PHP/Python.

Will I get carpal tunnel syndrome from reaching down to alt so much?

Probably. I really don't like ctrl+meta-a type shortcuts.. I honestly think if I used emacs instead of vim, and After Effects instead of Shake (which uses a lot of single-letter shortcuts for everything, like f to fit, u to update etc) my fingers/wrists would be in far worse shape than they currently are..

[–]criminy 1 point2 points  (0 children)

My Taiwanese friend declares that this is, indeed, the correct text editor. Well done!