9 ms·
Why I Still Use Emacs
- maigret 15y agoExcellent article! I agree with all points here. I think one of the most important is "Emacs is easy to configure". You just Google a problem and copy 2 lines in your .emacs. No need to click here and there, then find out you have to do it every time you open the editor etc. Also one thing that has gone true in the last 15 years (but most devs seem to still ignore it), is that emacs now has a small footprint and starts fast compared to many IDEs.
- ttt_ 15y ago>> Also one thing that has gone true in the last 15 years (but most devs seem to still ignore it), is that emacs now has a small footprint and starts fast compared to many IDEs. I have started using emacs recently, coming from Eclipse, and this is the main point that has led me to it. I use a netbook at home with only 2gb of ram, and it absolutely takes forever to open up eclipse (even the most basic 'classic' eclipse install), to the point where I was dreading opening it up to start coding. Another significant factor is that, when I started learning Scala and then Clojure, I noticed how dependent on the tooling I had become from using Eclipse in Java projects. For languages that do not have a mature set of tools favoring eclipse, than you're left with a really heavy and slow text editor. I noticed it was a terrible trade-off. When I asked myself 'what programming environment is lightweight but goes beyong syntx highlight?', then it came down to emacs and vi, that I heard of. Since my particular interest was in lerning Clojure, emacs fit like a glove. I'm still not really that productive, but in the long run I find that I'll gain a lot more from learning to hack in emacs.
- rmk2 15y agoYou might also want to look into running emacs as a daemon, if you haven't already. Since it runs as a server in the background (with a grand total of maybe 30MB used in my case), clients pop up instantly and if there were buffers open on the server from before, they will remain open even if you close the client's window. If you start/close emacs more often, it's definitely a nice thing to have. emacs --daemon clients are called using either emacsclient (for either terminal client or gtk/x11 client) emacsclient -c (to open a new frame) emacsclient -t (to open a frame in the current terminal)
- SkyMarshal 15y agoWow, I did not know that emacs could be run in a terminal mode like vim. Thought it was GTK/GUI only. No excuse not to install Evil and give it a shot now.
- oscillator 15y agoemacs -nw (for "no window") is super simple.
- calibwam 15y agoI agree to a lot of the arguments, but for me most of them fits better to VIM. I really have nothing against Emacs, but I just happened to start learning VIM, and after that it's been hard to change. In my university, there's really only some Java and Python we have to learn, at least the first couple of years. Since I like to learn a lot of other stuff, I kind of had to learn an editor. But most of my classmates has never programmed outside eclipse or whatever IDE they use for python. I really don't get how this is going to make us good computer scientist.
- SkyMarshal 15y agoHere's something related, an oldie but goodie on the effects on learning programming of editors vs ide: http://osteele.com/archives/2004/11/ides http://osteele.com/archives/2004/11/ides
- einhverfr 15y agoI enjoyed the article, even though I am a VIM fan. Many of the same advantages apply to VIM too. At the same time I thought it was also like looking into a different culture. "Easy" meaning "copy and paste what a user tells you?" I guess there is a different view of easy. The disadvantages struck me as rather interesting. I am not entirely sure why you need multithreading in a text editor for example. Perhaps someone could enlighten me as to when this sort of thing would help. Is it about running a compile job in one buffer while editing in another? I also noticed a big reason to use VIM or EMACS over an IDE that seemed missing and that is that both these editors have tons of features for gracefully editing large numbers of large files. The IDE's I have worked with haven't come close here. For now I will stick with VIM, which I feel comfortable and confident on. However, seeing folks talk about the benefits of the other is interesting.
- intranation 15y agoMulti-threading is asked for because when you run a complex thing in a single buffer (i.e editing something over Tramp mode, compilation, magit doing Git operations etc.) it can block the editor. Hence, multi-threading is a potential solution to that. Edit: spelling
- heretohelp 15y ago>I am not entirely sure why you need multithreading in a text editor for example. People often interact with APIs in Emacs or with things like git repos. Being able to make non-blocking calls to HTTP APIs and such would be rather nice.
- saulrh 15y agoI am not entirely sure why you need multithreading in a text editor for example. I can see a few uses for it. The big one for me is semantic analysis. Intellisense is a surprisingly large computational burden, for a single example, and moving it and things like it off the thread that's handling your UI is probably a good idea.
- julian37 15y agoI am not entirely sure why you need multithreading in a text editor for example. Perhaps someone could enlighten me as to when this sort of thing would help. Basically, the lack of multithreading prevents any sort of background processing (unless it can be implemented using an idle hook, which often isn't possible.) For example, Gnus (a newsreader which can also be used to read mail from a POP or IMAP server) locks up Emacs while it is checking for or fetching new mail. This is quite painful when fetching mail over a slow line or from a slow server, and causes people to do hacks like mirroring their mail onto a local IMAP server from where Gnus can fetch it more quickly. But even then, there is a noticeable pause when the server is accessed.
- mahmud 15y agoI don't even know what features of Emacs I use. I have mental intents, actions, transformations, things I want to do to text, files, buffers, regions .. my conscious mind has been locked out of the tight-loop, the vicious cycle of a synapses being fired and keys chorded. It's all muscle memory. The perfect coupling of an average biological agent, and a bubbly, baroque piece of antique Lisp technology. Together, battling RSI and worse keyboard layouts, we sculpt scratch buffers to all sorts of works, many of adequate quality, but some exquisite.
- entropie 15y agoThis is poetry. Yeah, i once gave a emacs introduction in school and people asking me how i do X, Y. I needed to watch my fingers to tell them.. that was a bit confusing ;)
- lubutu 15y agoI have this problem with (random alphanumeric) passwords. When I needed to input my password on my phone, I actually had to draw a keyboard on a piece of paper and mime typing it, watching which keys my fingers hit and writing down the character. But I don't get this with Vim. I think it's because Vim is a kind of composable language, so although you don't actually know at the time what you're doing, if someone were to ask you how you deleted half the line so quickly, you can work it out: "f)dt:". I think this is the reason I have trouble learning Emacs: it's not so obvious how commands are composed. There are some chains like C-h which are, but for the most part it feelings like there are just too many pieces. I've given it a good shot, and I'll probably try again, but it just doesn't feel as easy as "'d' to delete".
- sheckel 15y agoAw, before I clicked through, I guessed this article was from the 90s - I was sure that vim had taken over the world by now. Goodness gracious, folks, it's 2012!! :-) In all seriousness, although these are all good points and I'm quite jealous of Emacs' tetris mode, I think you're missing out on one of the best features of Emacs: shell mode. IMO shell mode (or whatever it's called) should easily be at the top of the list. I wish there were a decent analogue to this feature in vim but there really isn't, just a bunch of not-quite-there plugins...
- beaumartinez 15y agoHow powerful is Emacs shell mode? Vim has a shell "command" (:sh), a pretty damn crappy—well—interface to your box' shell.
- disgruntledphd2 15y agoThere are at least three shell modes built in (there are probably more). shell mode (M-x shell) - gives an interface to your system shell, can handle everything except programs like top, you can move around past commands which is a dream. ansi-term - an actual terminal, better for top et al, can switch between terminal mode and emacs buffer mode eshell - shell implemented in Elisp. have never used it, but i'm sure it's awesome. Dired mode is also wonderful, navigate to a folder, simple one key commands to do most of the basic shell copy/rename/move commands, with simple searching and all the emacs shortcuts.
- tbatterii 15y agoWhat makes eshell awesome is mostly that it blurs the lines between bash and elisp, you sort of kind of can use them together. Unfortunately the manual does not do this feature justice as it is largely incomplete. This article is the best i've found. http://www.masteringemacs.org/articles/2010/12/13/complete-guide-mastering-eshell/ http://www.masteringemacs.org/articles/2010/12/13/complete-g... And of course eshell is just a buffer so you can surf through the output with all the available commands you typically use.
- 15y ago
- lflux 15y agoWhy I still use emacs: I've been using it for 10+ years and my fingers and general workflow are very very used to it. I regularly use vim (for quick editing and vimdiff), but keep coming back. If only emacs had a "project drawer"/"tree drawer" like textmate, then it would be golden. ecb doesn't quite cut it for some reason, I keep reverting to textmate each time I need to get an overview of a huge source tree I'm not familiar with.
- mark_h 15y agoOut of curiosity, if you've used emacs for 10 years I'm assuming you're familiar with ediff; what do you find so useful about vimdiff? (I've never used it, so I'm genuinely curious)
- lflux 15y agoGenerally I use vimdiff when working with tests and use it for diffing between the expected output and the real output. It's run in the terminal as opposed to inside my huge emacs process and I don't really know why else I don't use ediff, vimdiff is just part of my editing workflow.
- mark_h 15y agoFair enough, cheers.
- brl 15y agoHave you tried nav? https://code.google.com/p/emacs-nav/ https://code.google.com/p/emacs-nav/
- jeekl 15y agoTry speedbar or sr-speedbar: http://www.emacswiki.org/emacs/SrSpeedbar http://www.emacswiki.org/emacs/SrSpeedbar
- lflux 15y agoNeither those nor emacs-nav come close to working and looking the same way the file tree drawer in TextMate (or other IDEs) does. speedbar only shows directories, not files, when I navigate dirs in it.
- 4ad 15y agoI find it interesting that this class of articles has such an appeal to Hacker News readers. If this were an article about hammers, and how good they are for driving nails, people wouldn't care. If this were an article about saws, and how they are for cutting wood, people wouldn't care. To me, the article is exactly like the examples above. Take some widely used tool and say what it does. It's common knowledge and I don't care that you use a particular tool exactly the way it's advertised. Now if this were an article about using hammers for something they were not designed for, of about using saws in creative ways, that might be interesting. It might also be interesting to talk about what you build and how common tools made a difference for your product.
- DougBTX 15y ago> people wouldn't care But which people? I'm sure those who use hammers every day care about how they are used and which ones are the best.
- DanBC 15y agoI love my estwing hammer. I don't want anyone to take it from my toolbox. But I don't care what hammer you use; so long as you know how to use it and are happy with it.
- el_presidente 15y agoBut someone willing to spend $260 on a stiletto probably cares about what hammer you use.
- jsvaughan 15y ago"Why I still use a rock" At school, I’m known as the Rock guy; when people have questions about using a Rock and hitting things a certain way, they often come and ask me. Sometimes, some people ask me why use a Rock to hit a nail? Isn't it a really an ancient way of doing things and wouldn't a hammer be much better?
- 15y ago
- yason 15y agoI think the question for me would be why should I——or anyone for that matter——use Eclipse or Visual Studio instead. Emacs is not an editor, it's a keyboard language used to modify files and run programs. Further, those are editors where extensions and settings are each a separate feature instead of a natural flow of blended editing, reconfiguration, and extending. With Emacs, the question is never about if some editor feature is available or if it can be scripted together. With Emacs, the first and only question is always How? as Emacs will simply turn into anything if only so told.
- JustinJ70s 15y agoAnyone for that matter? How about people who find Emacs to be archaic with weird key bindings and who don't care to spend half their time fiddling about with lisp scripts. Don't get me wrong, it's an awesome tool and I spend a long time using it - but it's not for everyone and bemusement at why that may be the case is being short sighted.
- munchor 15y agoThe writer says he thinks Emacs will evolve and get some IDE-like features, but do you guys think Emacs will keep on evolving? Is development still active or dead like in Vim?
- sigzero 15y agoNeither Emacs nor Vim is "dead". Both are actively updated.
- munchor 15y agoI use Vim, hasn't Vim 7.3 been there for ages?
- MatthewPhillips 15y agoOnly a couple of years ago, they increment the point version every few.
- sigzero 15y agoVim 7 added a lot of new features. Bram typical does fix releases for a while and then there is fast and furious to the next version. Vim is definitely still being developed.
- melling 15y agoEmacs is a Lisp interpreter. You can extend it by writing in Lisp. http://stackoverflow.com/questions/tagged/elisp http://stackoverflow.com/questions/tagged/elisp
- intranation 15y agoEmacs gets a new release frequently. 24.0 is about to come out (it's in pretest), and 23.4 was just released. Also, since it's a Lisp machine, it doesn't necessarily need to have IDE features added - you can just write your own extension in Emacs Lisp.
- superxor 15y agoI am an GNU Emacs user. The major problems I see are: 1> lack of Multi-threading 2> Support for multiple major modes The 2nd problem is the biggest I suppose. Present day development deals with chunks of code in different languages, all put in the same file. It just kills me to code Python+JS+HTML in a single file, pathetic support.
- asmala 15y agoI feel the pain too. MuMaMo doesn't quite cut it for HTML + ERB. That said, I never run into this when working with Clojure, since both the major templating solutions (Hiccup and Enlive) use only one language per file (Clojure and HTML, respectively) and I can keep my JS cleanly separate, barring the occasional Google Analytics snippet.
- disgruntledphd2 15y agoThe noweb mode for R and LaTeX works quite well (in my experience). I would imagine it would be possible to hack something together using that as a base.
- nO0b 15y agoWhat env currently supports mixed-mode editing well? They all seem pretty crappy at the moment. Either way, the code looks/reads a lot cleaner if you include the JavaScript as a separate file referenced from your HTML. Solves 2 problems.
- rbanffy 15y ago> Present day development deals with chunks of code in different languages, all put in the same file. It just kills me to code Python+JS+HTML in a single file That got me worried - you probably don't need to suffer this. What are you using this multilanguage file for? You shouldn't put lots of JS inside HTML and certainly not embed Python code inside it (nor the reverse).
- deleted 15y ago[deleted]
- larve 15y agoI am a bit annoyed by all these emacs / vim / sublimetext vs. IDEs articles. In an IDE, the editor is a small part of the overall program, and it indeed does often suck compared to the godfathers. But it's such a small part of the actual task of working on software that I'm ok with a few tradeoffs. On the other hand, whoever ever tried to debug java or c++ in emacs, or even worse, debug a single app consisting of php, ruby and javascript in emacs is going to enter a world of pain. A task which is pretty easy to accomplish in Intellij IDEA. Eclipse makes it pretty easy to keep the muscle memory with its emacs+ mode, which is quite good (it even has ido and M-x). You lose the elisp, but have a real IDE nonetheless. It's all about the work you need to accomplish, I find myself much more productive with a less capable editor, but a full IDE. And I still use emacs a lot for org-mode, editing config files, writing smaller programs. But emulating full IDE features is just to painful (most of the time). The only area where Emacs is actually a brilliant IDE is when using SLIME (for Common Lisp and Clojure).
- mattdeboard 15y agoemacs is also an excellent IRC client.
- deleted 15y ago[deleted]
- lallysingh 15y agoBehind emacs and vim are two long stories of old programs constantly adapting to new environments, yet growing to have capabilities that IDEs never got. And frankly, eclipse's editor is crap.
- rbanffy 15y ago> But (the editor is) such a small part of the actual task of working on software that I'm ok with a few tradeoffs You have to understand Eclipse and the tools most people use it with evolved together for a long time. That creates this dependency between IDE and toolset - it's more or less impossible to be productive in Java without an IDE. There are, however, languages and technologies that didn't evolve together with IDEs and employ fairly easily hand-editable files instead of overly complicated things no human hand is supposed to touch. Emacs' brilliance is in how it's built in itself and how one can shape it to its needs. For instance, it took me a couple minutes to configure mine to start with different fontsizes and screen layout in accordance to the size of the monitor I'm using. I cannot imagine the level of insanity I would have to go through to do it on Eclipse.
- KingOfB 15y agoThere's an interesting Clang autocomplete mode. It is almost great, but falls short a bit for obj-c. If you deal with C/C++ all day, you should definitely check it out: https://github.com/brianjcj/auto-complete-clang https://github.com/brianjcj/auto-complete-clang
- ulisesrmzroche 15y agoWhat's the fastest way to get up to speed with emacs if I'm coming from vim?
- lallysingh 15y agoThere's viper mode, which enables vi keybindings. A transitional technology. You don't even have to ever turn it off!
- contextfree 15y agoI once used that. I remember for extra power and/or hilarity I configured it so that emacs commands were all available in vi "insert mode", so that Esc effectively switched between vi and emacs.
- deleted 15y ago[deleted]
- gnuvince 15y agohttps://gitorious.org/evil/pages/Home https://gitorious.org/evil/pages/Home
- weavejester 15y agoI've been really impressed with Evil. It's trivial to extend with new keybindings, the code looks very clean, and it even supports text objects.
- tedmiston 15y agoTetris in emacs is too good to give up. If only it had ghost pieces...
- telent 15y agoI use emacs and have done for ~ 20 years, but I don't think this article would sell me on it if I didn't already. An editor is just an editor: an editor with a variety of unrelated crap (text adventure, tetris game, mail reader) bolted on the side is not obviously better, it might just be bloatier. The compelling feature of emacs is its extensibility and self-documenting nature: that Gnus exists is not a big deal, but that you could invent it if it didn't already exist - that's where the magic lies. Emacs is a habitable programming environment. If HN lets me post links in comments, here's an example from a little while ago showing how I once extended the Gnus email composer to check for missing attachments - http://ww.telent.net/2003/1/14/_updated_for_elisp_syntax_error_13_01_52_gmt http://ww.telent.net/2003/1/14/_updated_for_elisp_syntax_err... "First off, we didn’t need to restart emacs. In fact, we didn’t even need to load any files. All of this was done on the fly. Second, we didn’t at any point have to read an info manual, fiddle around in the filesystem, or search a web site to get to the documentation for anything. We had a little help from customize to tell us that ispell-message was a suitable function for this hook, but aside from that, all we needed to know was in function and variable docstrings."
- praptak 15y agoSpot on. Adding functionality to Emacs is a matter of typing or pasting some elisp and executing it. There exist IDEs where you need to setup and build a project with an XML based config for this purpose :)
- rmk 15y agotramp is the best feature of emacs. Really handy when I have to edit files on barebones systems that have only vi (not even vim) installed on them!
- lowstz 15y agoAgree!
- galactus 15y agoI "still" use emacs because of SLIME. The most pleasant programming environment I have ever used.
- theatraine 15y agoInitially I started using emacs for AUCTeX, a great extension for LaTeX. Now it's become almost it's own OS as I can run Matlab (using Matlab mode), and several terminals from it (using ansi-term). If you're using ansi-term, just remember that C-c k is char mode (direct terminal entry), and C-c j is line mode, allowing you to use the power of emacs.
- disgruntledphd2 15y agoA quick question: what do you see as the advantages of ansi-term over shell (M-x shell)?
- theatraine 15y agoansi-term in line mode is basically the same as shell, however you still have the option of direct terminal entry with char mode, which is sometimes useful, ie when looking at the command history of a machine you sshed to. ansi-term can also run more programs (ie some graphical programs, man).
- endlessvoid94 15y agoAs a vim user, I had a bet with a coworker (emacs user): we would switch editors for a week, with the goal of learning another tool for our daily work. Every time one of us complained, we would pay the other $1. I haven't switched back to vim -- that bet stopped back in November.
- dnquark 15y agoOne of the best things that happened to Emacs in recent years, IMO, is the Evil project (see my blog post for an Emacs user's perspective on it: http://dnquark.com/blog/2012/02/emacs-evil-ecumenicalism/ http://dnquark.com/blog/2012/02/emacs-evil-ecumenicalism/) -- now you don't have to choose between the power of Emacs an the terseness/efficiency of Vim and modal editing. After installing Evil, I've taken to calling Emacs "my thermonuclear editor".
- deleted 15y ago[deleted]
- prtamil 15y agoFor common lisp development emacs SLIME is the Best for foreseeable future. For C++ i would use QT Creator. For scripts such as shell , Python VIM is great.