Slashdot Mirror


(Stupid) Useful Emacs Tricks?

Count Fenring writes "Since the Vi version of this question was both interesting and popular, let's hear from the other end of the spectrum. What are your favorite tricks, macros, extensions, and techniques for any of the various Emacs? Myself, I like 'M-x dunnet' ;-)"

11 of 412 comments (clear)

  1. Re:Lots of them by jbaltz · · Score: 2, Insightful

    M-x psychoanalyze-pinhead

    --
    I am the Lorvax, I speak for the machines.
  2. Not much of a trick... BUT... by McNihil · · Score: 2, Insightful

    CTRL-X 1|2|3 to divide the editing area according to wish. I simply can't live without this functionality.

    Now if anyone makes a Firefox plugin making it possible to do the same in a web browser that would be friggin awesome.

  3. Re:Notepad tricks by gEvil+(beta) · · Score: 2, Insightful

    Well, if you're using Windows XP, the best trick is Win-U-U.

    --
    This guy's the limit!
  4. Re:Please Don't Stop by Just+Some+Guy · · Score: 5, Insightful

    This is the first content I've seen in years that appeals to Slashdot's original demographics: hardcore geeks who are passionate about the tools they use. I've picked up a few tips in this series of articles and have enjoyed hearing other people learn about "old" stuff for the first time.

    If "(Stupid) Useful $GEEK Tricks" isn't your cup of tea, then please feel free to look elsewhere.

    --
    Dewey, what part of this looks like authorities should be involved?
  5. Re:Huh? by ByOhTek · · Score: 2, Insightful

    deletions, and ONLY deletions from a file. If there is any adding/changing, I'd sooner sue cat+sed.

    --
    Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
  6. Re:Please Don't Stop by Falkkin · · Score: 3, Insightful

    Yeah, given that the *nix thread had over 2000 comments, I'd say there's a significant demand for more of these sorts of posts.

    My only regret is that I wish they'd spaced out the articles a bit, so that I had some time to digest the tricks in one article before reading the next one -- I find that if I add too many tricks to my toolbox at once I tend to forget about some of them. I guess I should just re-read the articles in another month or so. (Also an indication that these are quality articles -- there's not many discussion threads on Slashdot that I'd even consider going back and re-reading later.)

  7. Re:I replaced it by MosesJones · · Score: 3, Insightful

    Congratulations, beating out hot favourites Karl Rove and Dick Cheney you have just won single most arrogant statement of the year

    "I wrote something better"

    When you get several million users then call, until then you've got a pet project doing something that loads of people before you have done, and lots of people after you have done.

    and more people will still be using VI and Emacs

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  8. Re:Huh? by volxdragon · · Score: 2, Insightful

    See, there's your problem....Emacs isn't a text editor, it's a development environment with a Turing-complete language in it.

  9. Re:Huh? by yukk · · Score: 2, Insightful

    Emacs has a text editor now?

    See, this is why I hate mod points. They're never around when you need them.

    --
    The trouble with the rat race is that even if you win, you're still a rat." Lily Tomlin
  10. Re:I replaced it by dunkelfalke · · Score: 2, Insightful

    there are far more notepad users than vi and emacs users together.
    that does not mean, that notepad is a great text editor, though.

    --
    "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
  11. Re:Some favorites by Dolda2000 · · Score: 3, Insightful

    (global-set-key "\C-z" 'undo)

    You mention undo only as such, but I'd like to add that the undo functionality really is one of Emacs' killer functions. See, when you undo a string of commands in Emacs, it doesn't just discard that part of the undo history as most (all?) other editors do, but it folds it backwards onto the undo stack, which is unbelievably useful.

    I often use it as a sort of short-term, local version control. I can type something, try it, undo it and type something else, try that, and then undo back to the first version if I weren't satisfied with the second. It also enables me to use undo as a sort of short-term memory extension in that I can hack around a bit, and then interrupt myself for a visit to the toilet or similar. Then, when I get back, I can check exactly what I was doing before I left by just undoing a bit, and then undo the undoings.

    I don't think I'd ever be able to use an editor that doesn't have Emacs' killer undo.