Live data from Hacker News

Emacs My Way

dev.mikamai.com

21–30 of 32 posts

Re: Emacs My Way

#21
The default-installed package management system on emacs is fantastic. You generally have to include more sources to get a lot more packages (marmalade), but it's way better than Vundle/Pathogen.

Also, IMO the real driving force behind why emacs is the best browser is the rejection of modality that was the norm (of the time).

I think a lot of people would find it ridiculous if they entered their favorite IDE and were forced into a modal scheme for text entry.

Re: Emacs My Way

#22
post #7
post #2

"I had to spend around two full years memorizing key chords" Yet another user who thinks emacs is about the key cords. It's not, it's about extensibility. I changed most of the default key bindings, because they were inconvenient. Remember: Emacs should adapt to you, not the other way around. That's what Emacs is about. Some people even use VIM bindings in Emacs: http://www.youtube.com/watch?v=Uz_0i27wYbg

Yes, yes, yes! I came here to write exactly this: what is the point of having infinitely configurable and extensible editor if you don't configure it and extend it to your liking? The very first thing I did after switching to Emacs was to rebind most frequently used keys to something sane. The next thing was to make the functions themselves sane - IIRC the first command I wrote was "comment-or-uncomment-region-or-lin…

> the first command I wrote was "comment-or-uncomment-region-or-line"

verilog-mode (and I imagine others) includes something like this this. C-c C-c comments region, and C-c C-u uncomments it. It handles embedded /* */-style embedded comments intelligently.

Re: Emacs My Way

#23
post #22
post #7

Earlier quoted context omitted.

Yes, yes, yes! I came here to write exactly this: what is the point of having infinitely configurable and extensible editor if you don't configure it and extend it to your liking? The very first thing I did after switching to Emacs was to rebind most frequently used keys to something sane. The next thing was to make the functions themselves sane - IIRC the first command I wrote was "comment-or-uncomment-region-or-lin…

> the first command I wrote was "comment-or-uncomment-region-or-line" verilog-mode (and I imagine others) includes something like this this. C-c C-c comments region, and C-c C-u uncomments it. It handles embedded /* */-style embedded comments intelligently.

I don't want to hit different keys for commenting and uncommenting! What I want is to have one key which does all this:

1. if there is no region active and current line is not commented - comment it

2. if there is no region active and current line is commented - uncomment it

3. if there is region active and it's fully commented - uncomment that region

4 otherwise comment the full region

And it's this easy to do this:

    (defun comment-or-uncomment-region-or-line ()
      "Comments or uncomments the region or the current line if
    there's no active region."
      (interactive)
      (let (beg end)
        (if (region-active-p)
            (setq beg (region-beginning)
                  end (region-end))
          (setq beg (line-beginning-position)
                end (line-end-position)))
        (comment-or-uncomment-region beg end)))
So I see absolutely no reason for not coding this up and using it :) (Other than, heck, it really is my first ELisp function and it shows :D)

Re: Emacs My Way

#24
post #17

I like the idea of emacs... Every time I read a list of plugins like this I get put off by it though. I want an editor that does editing well and helps me edit source code faster. These lists, for the most part, show how emacs has git integration that's better than the command line(not too hard a task), or rvm switching(how often is this really needed? Set it once in the .ruby-version file and be done with it), or so…

I'm never greatly impressed to see a fellow Emacs user saying "Here's the libraries I use, ain't they great? You should switch!" The effect is almost always what it's been in your case: someone looks at the list, says "My God, it takes that much to make Emacs usable?", and resolves afresh never to touch Emacs with a ten-foot pole. This is especially true in the case of a Vim user, because, unlike most editors (Sublim…

A Lisp Machine is a real computer which runs Lisp on the metal. One of the applications of a Lisp Machine is one or more editors written in Lisp.

GNU Emacs is an editor written and extended in a dumbed down dialect of Lisp, on top of a dumbed down Lisp runtime, on top of some kind of other operating system. It provides a relatively poor user interface (especially compared to the real Lisp Machines which existed).

Re: Emacs My Way

#25
post #12

I'm a recent CS graduate, who only used IDE-s and Sublime Text so far. I have only heard about Emacs and vim when I started my internship. I tried it but it didn't really felt good using it. Can somebody tell me what are Emacs' benefits over IDE-s and ST for example?

An addition to great points already made in this thread- in Emacs it might take a while to set up your environment to your liking but once you have done it you can use it for _everything_. From writing code to managing your agenda to writing haikus. As a user of Dvorak keyboard layout that alone is invaluable to me since I always have my shortcuts optimized for Dvorak no matter what I'm doing.

Re: Emacs My Way

#26
post #24
post #17

Earlier quoted context omitted.

I'm never greatly impressed to see a fellow Emacs user saying "Here's the libraries I use, ain't they great? You should switch!" The effect is almost always what it's been in your case: someone looks at the list, says "My God, it takes that much to make Emacs usable?", and resolves afresh never to touch Emacs with a ten-foot pole. This is especially true in the case of a Vim user, because, unlike most editors (Sublim…

A Lisp Machine is a real computer which runs Lisp on the metal. One of the applications of a Lisp Machine is one or more editors written in Lisp. GNU Emacs is an editor written and extended in a dumbed down dialect of Lisp, on top of a dumbed down Lisp runtime, on top of some kind of other operating system. It provides a relatively poor user interface (especially compared to the real Lisp Machines which existed).

I never had the privilege of using a real Lisp Machine, so the difference isn't obvious to me. Thanks for the correction.

Re: Emacs My Way

#27
post #22

Earlier quoted context omitted.

> the first command I wrote was "comment-or-uncomment-region-or-line" verilog-mode (and I imagine others) includes something like this this. C-c C-c comments region, and C-c C-u uncomments it. It handles embedded /* */-style embedded comments intelligently.

I don't want to hit different keys for commenting and uncommenting! What I want is to have one key which does all this: 1. if there is no region active and current line is not commented - comment it 2. if there is no region active and current line is commented - uncomment it 3. if there is region active and it's fully commented - uncomment that region 4 otherwise comment the full region And it's this easy to do this:…

Evil-nerd-commenter does the same thing, but if I didn't use email I would have the same thing in my init. It's pretty great.

Re: Emacs My Way

#28

I like the idea of emacs... Every time I read a list of plugins like this I get put off by it though. I want an editor that does editing well and helps me edit source code faster. These lists, for the most part, show how emacs has git integration that's better than the command line(not too hard a task), or rvm switching(how often is this really needed? Set it once in the .ruby-version file and be done with it), or so…

The concept seems to be that once you've adapted to Emacs, doing things outside of it becomes a pain point. So you start bringing everything into Emacs.

I'll refrain from making the obvious Star Trek reference, and instead use this meta-reference.

Re: Emacs My Way

#29
Nice shoutout to ag but doesn't link to it: https://github.com/Wilfred/ag.el

Search the current project, the scope of which is automatically constrained by git/subversion metadata. Awesome sauce!

This is one of the things I love about emacs. I've been using it for over a decade now and I'm still regularly discovering new hotness.

Re: Emacs My Way

#30
post #20
post #8

Earlier quoted context omitted.

Well, I switched to Emacs from Vim exactly because of ELisp. Or rather because of Vimscript: I thought that Lisp or whatever, even Forth would be better than Vimscript :) After 3 or so years of using Vim heavily I started hit the limit of what can be done with defaults, simple options adjustions and even plugins. I honestly tried to use Vimscript, but I couldn't bring myself to do this for real. I knew some Scheme th…

Well. I'd never taken a close look at Vimscript before. Ye gods. But didn't I hear something about Python being usable as a Vim extension language? I'm not terribly fond of Python for aesthetic reasons, but it's at least as powerful as any of the modern scripting languages, and it has features (like docstrings and list comprehensions) which I'd really like to see more widely adopted. Have I misunderstood the state of…

Ruby is also usable, as are a few other languages. Unfortunately you need to compile Vim with support for a given language if I recall correctly. VimScript is the only extension language available to all versions of Vim, so that's a consideration if you intend to share your creations.

That said, it's possible that a large percentage of people use a Vim binary with Python/Ruby/etc. support. I have no idea what the usage statistics are.

Post reply on HN