Live data from Hacker News

The single most useful Emacs feature

stackoverflow.com

1–10 of 112 posts

Re: The single most useful Emacs feature

#2
It isn't an official part of Emacs, but no Emacs user should go without installing el-get, the meta-package-manager for Emacs.

https://github.com/dimitri/el-get

El-get can install and update elisp from git, svn, http, and EmacsWiki. (It also wraps ELPA and apt-get where packages exist.)

If el-get doesn't have a recipe for your favorite Emacs extension, please consider adding the recipe and pushing to GitHub. (It doesn't take long - most recipes are only a few lines long.) Don't forget to issue a pull request for the rest of us.

Re: The single most useful Emacs feature

#5
hi-lock-mode!

Hi-lock lets you specify regexes to highlight anywhere in a file; it's like domain-specific font-lock.

It's astoundingly useful in code review. For instance, given a giant blob of J2EE web handler code, I can eyeball one handler, recognize the annotation mapping the method to URL syntax, and then punch in a hi-lock regex to light up similar annotations everywhere in the file, then glance through the whole file looking for color patterns. I can read any of those functions and recognize the code that checks "am I an admin", hi-lock it, and then quickly spot any function mapped to a URL that doesn't check admin credentials.

That's just one tiny use case. I used hi-lock so much I ported it into our web-based code review tool. I converted one person to Emacs just to get that feature (my office would be thrilled if someone could point out the vim package that does the same thing).

CUA column editing (CTR-SPC arrow-arrow-&c type-type-&c) is probably my #2.

Late edit:

Holy hell how do you forget magit! Magit is a near-complete UI for git; it figures out what git repo you're working from, and then gives you up-to-date status on the contents of your checkout, spots untracked files, allows you to visually stage your commits, gives you single-key revert and a browsable repo history.

Magit is one of the rare Emacs extensions that not only improves Emacs but also the external service it integrates with. I am actually a better git user (or, git is just better) when I've got magit running.

Re: The single most useful Emacs feature

#9
post #5

hi-lock-mode! Hi-lock lets you specify regexes to highlight anywhere in a file; it's like domain-specific font-lock. It's astoundingly useful in code review. For instance, given a giant blob of J2EE web handler code, I can eyeball one handler, recognize the annotation mapping the method to URL syntax, and then punch in a hi-lock regex to light up similar annotations everywhere in the file, then glance through the who…

Occur also works nicely for this use case, as you can visit each place in order with C-x `. Actually, something like eproject-grep is even nicer, because you can visit every occurrence in the project that way.

Re: The single most useful Emacs feature

#10
post #4

I can't switch away from Notepad++ to any editor that lacks instantaneous, no-hassle (no extra key presses), buttery smooth current buffer word auto-complete.

Presumably you have to press a key to accept a completion. With dabbrev or hippie-expand, you don't.
Post reply on HN