10 ms·
Let's just use Emacs
- sharonpaul 15y agoI'm a beginner at programming, and am wondering which text editor to use. Emacs or TextMate?
- swah 15y agoHe's talking about Emacs 23.
- kennu 15y agoThere's something fishy about an emacs article that doesn't mention vim at all.
- arnorhs 15y agoHe mentioned being affected by cognitive dissonance when referencing other editors - he was probably thinking of vim :)
- to3m 15y agoA lot of modern IDEs provide features that are pretty close to magic, compared to what emacs sports. The emacs user response to this generally seems to be something like, "Code navigation can't be as good as M-x rgrep", and "How can refactoring ever be as good as C-M-%?" This reminds me of various people I have worked with in the past who have wondered why I ever bothered with the complexity of searching and replacing with regular expressions, when you can just do a normal search and replace, watch for matches that match the more complicated thing you're actually looking for, then replace them by hand...
- EdiX 15y ago> A lot of modern IDEs provide features that are pretty close to magic, compared to what emacs sports. Which modern IDEs and what features? I have used eclipse for months before deciding I was better off with emacs with eclim-mode anyway to provide the only two features of eclipse I liked: the compiler and the ability to see the members of an object (occasionally).
- eropple 15y agoI work on a 5GB source tree at work with a couple (or more? I haven't looked) thousand Java source files. After my last machine decided it would be a good time to crap out and I started over with a new OS X install, I tried working strictly with vim and emacs and our scripts (written by vim aficionados, it seems) to navigate around the codebase. It was like a root canal. If I was on fire. Seriously--I'm not an Eclipse fan by any stretch, but Open Type alone saves me hours of frustration a week. Its code completion isn't nearly as good as Visual Studio's, but is a lot better than ctags. And its source generation (implement getters/setters, override inherited methods, even just basic context-aware renaming) is fantastic, too. IME--and this is something of a generalization because I know fantastic programmers who use vim and emacs, and I use either where I have to--the folks who tout them are either using languages where IDEs are less effective (although this is still dubious--NetBeans has surprisingly good intellisense for PHP and Ruby, at least) or don't realize what the IDEs can do for them on a regular basis.
- EdiX 15y ago> I work on a 5GB source tree at work with a couple (or more? I haven't looked) thousand Java source files. the linux kernel is 14 million lines of code and the size of its source tree is 500MB, you are working on a source tree that is ten times the size of linux? 140M lines of code? In any case it can't be all 140M LoC in a couple thousand java files so something should be clarified. > I'm not an Eclipse fan by any stretch, but Open Type alone saves me hours of frustration a week. ido-mode plus tags file worked well to replace Open Type for me. Before that I used a stupid five line bash script. > don't realize what the IDEs can do for them on a regular basis. Or maybe you don't realize what you can do with a good editor. Good, modern IDEs have some good features, better than what you can do with emacs/vim however: a. they are not good editors (and insist on being one) b. they are not good window managers (and insist on managing your windows) c. their usefulness degrades quickly depending on the build system/language you use. If you need to quickly glance at the source of a library you just downloaded they are no help at all.
- eropple 15y ago
- dasil003 15y ago>A lot of modern IDEs provide features that are pretty close to magic, compared to what emacs sports. This is true, so why did I go with vim? Well first, I'm primarily using Ruby not Java, so the magic available in IDEs is somewhat diminished. But more to the point, vim is really well optimized for the widest array of types of editing. It also has the advantage of critical mass open source immortality. So when I hone my vim/emacs skills, it's an investment for the next 50 years, during which time I'll have no problem using my preferred editor on my preferred platform with whatever languages happen to be striking my fancy.
- jcromartie 15y agoI use Visual Studio to wrangle giant enterprisey C# applications, but I still use find+grep/Emacs for browsing code quickly. Visual Studio is a long way off from matching the simple blazing speed of grep and file buffers in Emacs. P.S. I'm not sure why I'm being downvoted. It's what I do. There's really no debate about whether grep is faster than VS search.
- city41 15y agoVS mimics both to an extent by allowing you to search with regular expressions and to choose to search from a file system context instead of project context. My favorite thing about this is I also use viemu, and I can search VS's search results using vi commands.
- deleted 15y ago[deleted]
- Mpdreamz 15y agoCheck out entrian code search which can be thought off as full text search for your source code. I never ever uwe VS builtin search any more. Alt+=, search, navigate matches with key arrows. Sadly it doesnt do replacing.
- zhangsen 15y agoyour argument about code navigation in emacs is inaccurate, though "M-x rgrep" is used heavily. at least there are gtags. and now there is auto-complete. For C/C++/Obj-C, clang+auto-complete stand there.
- Goladus 15y agoMy typical responses is that replace-* modify+isearch macros are good enough that I don't miss having refactoring tools that parse my code on the fly. My projects are usually not large enough that it matters. If they were, I suspect my typical response would be that I would simply install the appropriate mode for emacs and use that.
- Goladus 15y agoWhy should an emacs article mention vim? The author probably isn't qualified to fairly compare them and so doesn't bother trying. The focus is also writing prose rather than coding or basic text-editing. The differences between vim and emacs are so fundamental that once someone goes down the emacs path it's not uncommon to never turn back.
- evangineer 15y agotl;dr Use Emacs 23 to create a distraction-free writing environment using org-mode, darkroom-mode & markdown-mode.
- RexRollman 15y agoI'm not directing this at you personally, even though I am responding to your comment, but do we really need "tl;dr" type comments here on Hacker News?
- forkandwait 15y agoI am ashamed, but part of the reason I read HN is for the tl;dr comments...
- dpatru 15y ago> do we really need "tl;dr" type comments here on Hacker News Yes we do. They serve to save people time.
- EliRivers 15y agoThey would save more time by simply not coming here. They can save lots and lots of time by not reading anything. Additional knowledge takes time to read and then adds time to your decision making process. Too many choices. These people should just write out a schedule and keep to it perfectly. No distractions, no extras, no discovery. No need for people to read things to understand them. Simply let someone else read them for you and tell you what to think.
- vacri 15y agoI think your criticism would carry more weight if this news site wasn't a firehose linkdump format.
- cema 15y agoThey serve to save people time. Or to draw attention to a succinctly formulated essence of an article. They help me in focussing on the articles that may be of interest.
- hsmyers 15y agoHaven't peeked under the covers in years---this is enough to make me go take a look. Now if someone would write a mode for time-lines then that would pretty much finish up the usual writer (fiction) shopping list.
- deleted 15y ago[deleted]
- codeup 15y agoOrg Mode's agenda has something like that: http://orgmode.org/manual/Timeline.html http://orgmode.org/manual/Timeline.html
- singular 15y agoI deeply love emacs, but its crustier elements really bite on a regular basis. The amount of effort required to make it non-ugly is just... unpleasant (a problem I've noticed with a lot of gnu ui stuff, both with applications and websites - appearance matters guys), the lack of namespaces in elisp is quite horrid (though it's very nice to have a lisp as the language of choice), the weird annoying regex conventions, and just lots of little things (I'd have to sit down and record them as I go to be able to list 'em) which degrade the experience. By the way, take that as intended - I love emacs very much, but as with people so with software - the little things a beloved gets wrong can be unbelievably annoying... :)
- gecko 15y agoI'm with you. Making Vim look pretty involves adding ":color <whatever>" to your .vimrc. Making Emacs look pretty involves installing color-theme, hopefully compiling it so it doesn't take forever to load, editing your .emacs.d/init.el since you can't customize that via customize-apropos (AFAIK), and so on. Likewise, I'm with you that the default regex implementation is...surreal, at best. Having reb-re-syntax be 'string should be the default. On the bright side, look at what we're discussing here: the default regex syntax and pretty colors. Compare that to about five years ago, when we'd be instead discussing how to compile Emacs in a way that had fricking TrueType font support. Emacs has come a long way.
- singular 15y agoYeah, both 21 -> 22 and especially 22 -> 23 were vast improvements. Appearance issues aside however, emacs is starting to feel a little like windows in a way (uh oh downvotes ahoy), in that it's lumbered by backwards compatibility considerations. Emacs with namespaces + a nicer lisp would be... something very special.
- mhd 15y agoI think even with the existing lisp it would be interesting to keep the interpreter and rewrite a lot of the basic elisp modules. Another Emacs "distribution" would be quite interesting...
- va_coder 15y agoYou think 20 years from now people will still be voting up articles about Emacs and Vim? just curious
- dexen 15y agoYes. They are bound to be discovered and re-discovered by every generation. They are the kind of tools that get the job done. There's also still a lot to be discovered about those editors themselves. Besides, to quote Wikipedia: EMACS: initial release: 1976, 34–35 years ago Vim: initial release 1991, 19–20 years ago vi: was written by Bill Joy in 1976 (as extension of `ex' editor) The debacle's been raging for way longer than 20 years. ---- On the other hand, if you want something more modern: http://man.cat-v.org/plan_9/1/acme http://man.cat-v.org/plan_9/1/acme
- ajross 15y agoThe EMACS package for TECO on ITS isn't an ancestor of modern GNU emacs, which began as a rewrite (based on Gosling's Unix emacs) in 1984. They are both "emacs" in the sense that they are modeless screen editors that share the same default keystrokes. Really GNU emacs is related to ITS emacs in the same way that vim is to BSD vi: it's a cleaner and much more powerful reimagining of the original that shares some interface details but no implementation.
- sigzero 15y agoWe had a programming intern a couple years ago, he was doing some Python stuff for us. One day he comes to me all excited about this awesome editor he found that was x-platform and had syntax highlighting for everything and was scriptable. I like editors so I asked him what it was..."It's called Vim!". The editor I had been using for years. :)
- foenix 15y agoYeah, I went from Geany to vim for python. And after installing the LaTeX packages, I couldn't go back.
- 15y ago
- dexen 15y agoFor the fun factor -- emacs page from Section 1 of the plan 9 manual: http://man.cat-v.org/plan_9/1/emacs http://man.cat-v.org/plan_9/1/emacs
- nitfol 15y agoStrangely, the vi(1) linked from that page is not for the editor, but for a MIPS emulator http://man.cat-v.org/plan_9/1/vi http://man.cat-v.org/plan_9/1/vi
- raganwald 15y agoArticles about why anything you can do in a "simpler" text editor can and should be done in emacs strongly resemble articles about why anything you can do in a less powerful programming language can and should be done in Lisp. I don't think it's a coïncidence.
- ajross 15y agoI think that's a little unfair. Programming languages are tools for your head: you're always thinking when using them. That means that the impedance mismatch of "switching" between languages is fairly low, and scales with the problem. So pick the tool for the job, and don't sweat the simple stuff. Editors are tools for your fingers. There are huge penalties to being good with an editor if you are forced to use a different one. I use emacs for writing things other than code (email, web forms like this very comment) not just because I think it's better than whatever built-in editor is provided for the task, but because it hurts so badly to use something other than emacs. The converse point is that there are huge benefits available if you give up all your existing editing tools and spend some time (and yeah, it can be months to years) getting really, really good at just one. Really, that one has to be emacs or vim, which are the only editors out there designed to scale to this level of specialization. It always makes me sad to watch other people work and see how much time they spend fighting with their editor, moving their hand around to the arrows or mouse or function keys, fighting with the presentation logic of their word processor to get the page break on the right spot on the screen, etc... It doesn't have to be that way.
- raganwald 15y agoWhat's unfair? That the arguments made by emacs users with respect to less powerful editors resemble the arguments made by Lisp users with respect to less powerful programming languages? I'm not taking a stand on the argument one way or the other, just pointing out how similar they sound. You said: "There are huge benefits available if you give up all your existing editing tools and spend some time (and yeah, it can be months to years) getting really, really good at just one. Really, that one has to be emacs or vim, which are the only editors out there designed to scale to this level of specialization." How does this differ from: "There are huge benefits available if you give up all your existing languages and spend some time (and yeah, it can be months to years) getting really, really good at just one. Really, that one has to be Lisp, which is the only language out there designed to scale to this level of specialization." Whether you agree or disagree with the sentiments, haven't you heard people expressing those sentiments in much the same terms?
- parfe 15y agoI use Emacs for coding, wanderlust mail, rcirc and jabber-el. All which are provided as packages in the distros I run. I've been trying to get into clojure which entails installing clojure-mode, swank-clojure, leiningen (which brings the pain of maven) and slime. This is where emacs has always broken down for me. Once I step outside the distro provided packages I find broken tutorials, unspecific versions, and instructions written like: First install package.el. Add to your .emacs: (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) C-x C-e to evaluate it, and you're good to go! http://marmalade-repo.org/ http://marmalade-repo.org/ Except that didn't work in two of the three emacs installs I have. Any time I need to download an elisp file I dread reading the instructions. Too often the author forgot that he loads some other required package in his 1000 line .emacs/init.el file. Then you end up with half a set of instructions. I think the only solution to the problem would be package maintainers providing instructions for how to install their package in a specific vanilla version of emacs from scratch with no other changes. But if they have to give up their custom emacs configs they won't be able to write up an explanation.
- astine 15y agoWhenever installing software for Emacs, it's usually worth checking ELPA http://tromey.com/elpa/ http://tromey.com/elpa/ (which comes installed on Emacs by default now,) to see if the package is there already. The ELPA provide both slime and clojure-mode and they work out of the box with swank-clojure. You'll still need to install Leiningen/Cake with swank-clojure separately, but there isn't much Emacs can do to help there.
- parfe 15y agoAh, but now you're not following the instructions provided by swank clojure which says to use marmalade (which is an elpa extension/replacement/clone/additional repository?) The clojure-mode available through elpa ( clojure-mode 1.7.x) is not new enough to deal with swank-clojure which needs 1.9.x (specifically I was after M-x clojure-jack-in) Plus, the elpa instructions don't include emacs23 because it allegedly comes with 23 (even though the elpa website does not say this). But elpa is not included in emacs 23 on Gentoo. And thus an evening of mine is lost to trying to get the same emacs environment running on my Gentoo desktop and Ubuntu laptop. Obviously my problems could be from a lack of experience with Emacs, but I hate that using a text editor is so hard. And another example is the pain of trying to build wanderlust from scratch which requires apel, flim and semi. Some of which were ONLY hosted on abandoned FTP servers. Luckily Dave Abrahams recently moved those scattered and abandoned packages to a single place https://github.com/wanderlust https://github.com/wanderlust
- hesitz 15y ago"org-mode developers, in turn, just ask a relevant big question: 'why use separate files when you can conveniently stick the stuff in one file, dammit?'" It surprises me that you could come away from org-mode thinking that the developers thought you should stick everything in one file. One of the main strengths of org-mode is the way it frees you to put stuff into separate files, wherever you want, and then use the agenda to consolidate them into a single view. Having said that, yes, org-mode is freaking awesome.
- deleted 15y ago[deleted]
- evangineer 15y agoWhen I fire up Aquamacs on my machine, the first thing that appears is the agenda based on four org files.
- dsmithn 15y agoI've spent the last month or so head first learning VIM - I forgot about org-mode before deciding on VIM. There are a number of clones but nothing seems complete. Any recommendations?
- evangineer 15y agoAs a former Vim user, I use viper-mode with emacs. Org-mode really is a mature, powerful killer app for emacs and there is a whole ecosystem of tools and addons that make it even more valuable. I would accept no substitutes at this stage.
- losvedir 15y agoWell the orgmode.org homepage calls out one[1] in particular: "2010-11-25 Thu: Maybe the times where Org mode could change hard-core vi users into honorable Emacs users are coming to an end? A Vim clone of Org mode is be written by Herbert Sitz, and judging by the videos it looks promising." Haven't used it, though. [1]https://github.com/hsitz/VimOrganizer https://github.com/hsitz/VimOrganizer
- hesitz 15y agoI'm the author of that clone. I'm making progress, and it's building up to a fairly nice subset of org-mode, but it's not something that would satisfy any truly hardcore org-mode power user. At least not any time in the near future. The previous poster complained that none of the Vim plugins that try to mimic or clone org-mode "seem complete". That is definitely the wrong way to look at things. Org-mode is a huge app that's been heavily developed for six or seven years now. In some ways org-mode is probably like Microsoft Word: probably 75% of its users access only about 25% of its features, although many of them access a different 25%. Why try to develop an org-mode clone in Vim, then? Mostly as a personal project I started for fun. I tried switching to Emacs just so I could use org-mode. Even with Viper and Vimpulse add-ons Emacs felt too clunky to me. I had previously worked on a Vim outliner and I knew that part wouldn't be too hard to replicate in Vim. I decided not to stop there and I've gone on to a lot of other features, although it's a fledgling project. In particular, I need to get some decent documentation done. There are a ton of features in my clone that users have no idea are even there. I think so far most of them (like most org-mode users?) use it mostly for simple outlining. The Vim clone uses a file format compatible with org-mode and actually calls out to an Emacs server to have org-mode do exports to LaTeX/PDF, HTML, etc. So pure document authoring (as opposed to PIM/task management stuff), is one task that the Vim clone probably can do a decent job of now. Adding footnote support is on the list (there's already a Vim footnote plugin that I plan to modify to work with the org-clone).
- pnathan 15y agoA few years ago I switched to emacs because I needed a cross-platform editor that worked with multiple languages and was available on command-line Linux. vi(m) was (and is) unintuitive. As you work with emacs and customize it to work with your flow, your hands, and your keyboard, it starts to feel as comfortable as old shoes. Over time, the incremental efficiencies add up, and it becomes clear that a non-customizable editor just isn't as useful. Contrary to parfe's experience, I've had good experience with Emacs packages, but then again, I don't use very intrusive addons, and keep my emacs pretty up-to-date.
- fernandotakai 15y agoHappened to me, on vim – i used to work with TextMate, and I really wanted a text editor that I could easily use on my servers as well as on my local computer. I started using vim, and at first, it was kind of hard to get used to all the commands and remember everything... but after a while (1~2 weeks) it felt so fluid and easy – everything makes kind of sense, it's easy to install new plugins (pathogen ftw!), it's easy to hack those plugins, themes (most of the time) just works.
- frsandstone 15y agobasically
- lelele 15y agoEmacs beats every other editor. Yes, including Vim both because you have a Vim clone inside Emacs and because once you start pushing the limits of Vim, just like the developer of Slim-Vim, you'll find yourself implementing Emacs. Vim's editing model is great - and that's what I use - but it ain't Emacs. Emacs has its warts, but it's your best choice if you want a serious editor. Bashing an editor because its support for programming languages whose programmers have chosen other platforms, is not fair. Comparing Emacs to Eclipse or Netbeans when it comes to Java development is not fair, just like comparing Eclipse or Netbeans to Emacs when it comes to Common Lisp development is not fair either. Using a general-purpose editor instead of a specialized tools means that everything you learn will serve you in every other editing task. If you are not serious about editing text, then you will be But, truth to be told, Emacs isn't even an editor: it is an Emacs Lisp interpreter which by default runs a program to edit text.
- lelele 15y agoContinued: If you are not serious about editing text, then you will be served by many other editors.
- lelele 15y agoDownvoting without explanation? Fine, I love my competitors using lesser tools.
- stevejohnson 15y ago* Being needlessly argumentative * Borderline trolling. You _know_ how these arguments go. * Fallaciously arguing that tools cannot be compared based on how well they get the job done (IDEs vs 'editors') rather than their implementation * Getting pissy about downvotes and posting multiple times instead of editing You've been here a year. You should know better.
- lelele 15y agoThank you for your clarification. I don't understand why I have been perceived as argumentative. I've been using Emacs for quite some time now, and before immersing myself into it, and even after, I've compared it to other major editors. Eventually, I realized that no other editor can stack against it, if you are really serious about getting the most out of your editor, and reaping the highest return of investment out of the time you spent learning it. Maybe some people don't like the idea, but just like there are superior languages, as PG as neatly demonstrated, there are superior tools. Things you can accomplish with Emacs, you really can't with other Blub editors. Oh, and when I talk about Emacs, I'm not talking about its editing model, which I agree, is somewhat cumbersome. Vim's editing model is way superior, and it's my editing model of choice, but Emacs' implementation is better. Vim enthusiasts are aware of the limits of their editor. For a story, read here: http://bradbeveridge.wordpress.com/2007/06/21/how-a-vim-user-converts-to-emacs/ http://bradbeveridge.wordpress.com/2007/06/21/how-a-vim-user...
- mhd 15y agoLots of professional authors use "advanced" text editors for their stuff. And sadly, that often means old editors, because they often tend to have features that modern word processors lack (or make it easier to accept then). And of course once you get used to something... There was a Salon article about people still using XyWrite[1]. As mentioned in the post, GRRM is one of the people[2] still using WordStar. I know that Steven Brust is using Emacs[3]. [1]: http://www.salon.com/21st/feature/1998/08/25feature.html/ http://www.salon.com/21st/feature/1998/08/25feature.html/ [2]: http://www.sfwriter.com/wordstar.htm http://www.sfwriter.com/wordstar.htm [3]: from the front matter of http://dreamcafe.com/firefly.html http://dreamcafe.com/firefly.html
- autarch 15y agoSteven Brust worked as a programmer before he was a full time novelist, according to his son, who is also a programmer.
- cema 15y agoAnother example: Vernor Vinge (sci fi author, and a former math and CS professor at San Diego State) uses emacs [http://www.norwescon.org/archives/norwescon33/vingeinterview.htm http://www.norwescon.org/archives/norwescon33/vingeinterview...]
- janv 15y agoYet another example would be Neal Stephenson: "I use emacs, which might be thought of as a thermonuclear word processor." - In the Beginning was the Command Line http://www.cryptonomicon.com/beginning.html http://www.cryptonomicon.com/beginning.html
- bitwize 15y agoThat was written before his conversion to Mac OS X. We don't know if it still applies.
- urlwolf 15y agoFor those who prefer a language with namespaces (python) sublime editor is a good modern alternative.
- shubble 15y agoI've been using emacs for a few months now (it's surprisingly good), and am starting to run into wanting to do little modifications. Speaking as a non-lisper, I really wish a rewrite existed in a more modern language. I don't wanna start an argument about lisp here but there is a reason people don't use it for major developments, and it's not the performance. But it would be unfair not to point out that you can extend emacs in a variety of languages including python. Its just a bit messier.
- aerique 15y agoFirst of all, various members of the Lisp family are used for major developments. Secondly, rewriting Emacs would be a major undertaking and which modern language would it be? My choice would be Common Lisp, for other developers it would be Clojure, Haskell, Python, Ruby, etc. Whatever choice it would be, you'd lose developers who would rather see Emacs rewritten in one of the other languages. Even worse they might spawn forks in their own favourite languages.
- jlongster 15y agoI resonate somewhat with the gripes about Emacs' crustiness. But on the other hand, I don't understand the complaints about it being ugly. I haven't heard that for a while. I'd like to think that my Emacs is quite pretty: http://jlongster.com/s/emacs.png http://jlongster.com/s/emacs.png There are things Emacs can do which VIM will never do. And vice-versa. They are separate editors embracing separate philosophies. Lastly, keep in mind that this is 40 year old software, and considering that it's done a great job keeping up with the times.
- technomancy 15y agoI think most of the "ugly" gripes come from people who either don't know how to change the font or haven't bothered to turn the tool bar off.
- jlongster 15y agoThat's true. I'm considering making a few screencasts that show how go from nothing to a full Emacs installation/customization on different platforms. I think that would be neat/fun.
- BrandonM 15y agoPlease do. Bonus points if you include something about Vimpulse (http://www.emacswiki.org/cgi-bin/wiki/vimpulse.el http://www.emacswiki.org/cgi-bin/wiki/vimpulse.el) to entice vim users to give it a try.
- ndaugherty18 15y agoTry out xiki (http://xiki.org http://xiki.org) its a wrapper on top of emacs that adds a bunch of shortcuts, and its built using el4r so all the extensions are ruby based.
- cicero 15y agoI'm pretty excited about this post. I first began using vi in 1983 and Emacs in 1986, and have switched back and forth between the vi/emacs families of editors as my needs have changed and their capabilities have changed. I've been on gvim for the last few years because of it's superior GUI integration, but it is not good for writing prose, which I do more and more of these days. I have not found something I really like for writing, and end up using MS Word by default, which does not make me happy. I had not heard of visual-line-mode, so I'm ready to give emacs a try again. I just installed Aquamacs, and I'm using it to write this comment in full-screen mode. I will also give org-mode a try because I'm always looking for better ways to organize my writing.
- cema 15y agoKeep in mind that while Aquamacs is better visually integrated in MacOs, some features may not work as well as in the standard (gnu) emacs.