16 ms·
When you finally learn to master and config Emacs, you run circles around all other editors. Emacs is so much more than just an editor. But even if you only use
by submeta 6y ago
When you finally learn to master and config Emacs, you run circles around all other editors. Emacs is so much more than just an editor. But even if you only use it for coding: Magit is the best git client I have used in years (coming from PyCharm + Git Tower App, which is nice), then there‘s Ztree-Diff (excellent folder diff tool; previously using Kaleidoscope app), then Eshell for interacting with the server from within Emacs (programmatically if you like), Tramp for remote editing, excellent integration of ripgrep and silversearcher (ag) into Emacs for code navigation, yasnippet as an excellent templates/snippet manager, and many more packages.
What makes Emacs exceptional is you can link all these packages together, create your own workflows by scripting Emacs in Lisp. And I write the docu in Emacs in org-mode, with org-babel I can run shell-scripts / python-scripts and other code in my org-file and see the output underneath it (like Jupyter notebooks), link to code fragments in my org files etc
I manage several projects with it and switch contexts with one key-combination: Vagrant box is started, project folder is changed, necessary files opened, ready to hack, build, deploy, do server restarts with a single key stroke.
I think VS Code is a nice coding environment with good defaults and many things done right (compare installing packages in VS Code to Sublime! What an improvement) but nowhere near the capabilities and the productivity of Emacs.
- qppo 6y agoYou can do all that and more in vscode as well... you just have to "learn to master and config" it with your own plugins in JS. It's not that hard.
- umvi 6y agoI tend to let other people "master and config" VSCode and then I just go download their extensions. IMO that's the beauty of VSCode - critical mass
- sedev 6y agoThat's also available with emacs, though, it has its own extension ecosystem that's about as easy to access as VSCode's.
- vopi 6y agoI don't think its as easy imo. vscode auto recommends extensions if you open a new file type and from what I remember (been a number of years since I installed a package in emacs), the extension "browser"/"market" was not as user friendly (in terms of raw info about the extension and in discoverability).
- voxl 6y agoYeah no, emacs package system is a giant mess, it's only "easy" if you've already drunk the emacs kool aid. Sorry I just really hate emacs.
- thom 6y agoHave you found that other extension authors have this in mind? Most extensions don't seem to be built with hooks in mind so you're kinda stuck with either the existing extension or rolling your own. There also aren't very good primitives for most use cases because of this. I assume VSCode will get there though.
- qppo 6y agoVSCode extensions are driven through "commands" that are exposed through the package.json of the plugin (which can be parsed by other plugins if you wanted) and issuable through another plugin, or using a task (this is kind of annoying though and not a first class use of tasks).
- mercer 6y agoI use VSCode for my day to day coding, so I have nothing against it, but explain to me how I can 'do' Magit and the like in VSCode...?
- moocowtruck 6y agohttps://github.com/kahole/edamagit https://github.com/kahole/edamagit
- Steltek 6y agoI use Edamagit but I still find myself popping open emacs+magit sometimes. I guess I haven't completed the assimilation into VSCode yet.
- ashtonian2 6y agoLiterally anything you can do in emcas there is an extension for or at least one in dev. Vscode will outgrow emcas given its critics mass and momentum.
- akho 6y ago“Critics mass” of whom? VS Code is very disappointing, given the hype. Can you give an example of something in the VS Code ecosystem that can impress an Emacs user enough to switch, beyond chrome? Chrome will always attract crowds, of course.
- indymike 6y agoThe question is will it grow in the right direction? Org-mode, magit and a pure terminal interface (can run on remotes through an SSH sesion) are still missing. Still love the ergonomics of vs code.
- bubblesorting 6y agoVS Code runs on remote hosts through SSH, containers, or WSL: https://code.visualstudio.com/docs/remote/remote-overview https://code.visualstudio.com/docs/remote/remote-overview Kinda like a parallel universe swank/slime.
- r-zip 6y agoVSCode isn't as flexible at all though. You can't even create a keybinding that executes multiple commands (macro). There aren't hooks. You can't just write a function in a file and execute it. There isn't the same level of introspection. In a lot of ways, VSCode is more convenient, but its extensibility doesn't come close to matching Emacs'.
- throwawaybchr 6y agoFor many who don't have experience, lisps are intimidating
- ignoramous 6y agoReminds me Ryan Dahl's quip from way back when: > I love Go so much (SO MUCH), but I cannot get past the fact that goroutines share memory or that it's statically typed. I love Erlang but I cannot get the past the syntax. I do not like the JVM because it takes too long to startup and has a bad history of XML files and IDE integration - which give me a bad vibe. https://news.ycombinator.com/item?id=4310723 https://news.ycombinator.com/item?id=4310723
- sedev 6y agoFrom a recent HN discussion, I learned that emacs has had a sampling profiler built in — not on MELPA or something, first-party! — since about 2013. How many widely-used applications these days contain a facility for asking "why is the command I just issued executing slowly?" and for _doing something about it?_ As far as I'm concerned, that's now table stakes for a programming environment: you should be able to not just run a profiler on whatever program you're using the editor to interact with, but to do robust profiling on your editor itself.
- lima 6y agoIn terms of IDEs, IntelliJ also comes with built-in profiling. And every modern web browser has robust built-in profiling tools.
- lordgrenville 6y agoI think you're referring to (its wrapper around) Python cProfile, not a profiler for the IDE itself?
- heartbreak 6y agoIntelliJ has a profiler for the IDE itself, too.
- mhh__ 6y agoAutomated profiling is one of the best things to get right over a few weekends. I'm slowly putting together something for the D language to do it but it's a bit of a pain. Anyone know of CI service that can have use rdpmc/perf_events on the cheap?
- a_e_k 6y agoThere's also M-x emacs-init-time if you want to know how much a change to your configuration impacted start-up time.
- thotsBgone 6y agoTo be fair, of all of the editors I've used, emacs is the slowest and needs a profiler the most.
- cannabis_sam 6y agoI’m kinda in love with VSCode at the moment, even though I have used Emacs (or at least some mac customized version, maybe SpaceEmacs?) for agda-mode When I tried to go outside of the agda-mode documentation, to try to learn emacs properly, I kinda struggled to find a reliable tutorial or introduction that got me started on how emacs and the culture/ecosystem works. (Maybe it was just me who got tripped up by my unfamiliarity with it.) Do you have a good recommendation for a way or a book to get into emacs? It does seem nice to run your editors in terminals, instead of the other way around.. haha
- monroewalker 6y agoI've had a similar experience to yours. Even when I'm curious and motivated to learn, I find it hard to learn more and improve. There seems to be a lot of assumed knowledge from most tutorials and articles about where to place code snippets, configure things, what ui elements are called, etc. One thing I'd recommend is joining the spacemacs discord/slack and just asking for help on the questions you get stuck on.
- submeta 6y agoI do admit VSCode is a very polished product. Just like the other tools I mentioned (PyCharm, Kaleidoscope for diffs, Tower App as git client etc). What makes Emacs different - when you look beyond the simple looking interface - is the possibility to make the packages / plugins work together not intended by the original authors by creating hooks that change the return value of the packages, and you can tie together the tools by writing Elisp scripts. As to where to start: There are many young and ambitious hackers who are re-developing Emacs + Lisp for creating their custom dev / hacking / writing environment, and who create wonderful youtube videos. Magnar Sveen started doing this several years ago (emacsrock.com), then there are (among others) Protesilas Stavrou or the channel of "System Crafters". When you prefer reading books: "An Introduction To Programming In Emacs Lisp" from Robert Chassell is excellent for learning the basics of Elisp. Mickey Petersens "Mastering Emacs" is excellent. Harley Hahn's Emacs Field Guide is recommended as well. Also, r/emacs and r/orgmode are excellent communities. Give yourself time. Don't hurry. Emacs is a tool that will keep your company in twenty years from now, when all the hyped tools are long gone (Textmate users moved to Sublime, then some of them to VS Code, who know's what's next?).
- monroewalker 6y agoDo you mind sharing a bit more about your setup and workflows? Or a link to anywhere where you've discussed it before?
- diragon 6y agoNaah, not really. I've done that emacs exercise countless of times over a few decades and now I use vscode. I don't feel like I'm missing much.
- tyingq 6y agoI can see that for most people. It is really something, though, to watch someone really good with Emacs or Vim fly though something like a complex refactoring.
- brandonmenc 6y agoYou can refactor with IDEs too, and I don't remember emacs being better at this than JetBrains is.
- tyingq 6y agoSure, I assume you can, but since Emacs/Vim is a sort of environment that encourages terse keybindings, fast call outs to the shell, etc, that's where I've seen more people that can seem to do stuff almost subconsciously.
- markmark 6y agoI've seen a few text editor pros who just weren't aware of what modern ides are capable of, particularly with strongly typed languages. They thought grep, regex and keyboard shortcuts were impressive.
- stnmtn 6y agoThere is something that I think most programmers have, which is that seeing someone type an arcane-looking combination of characters, press enter, and suddenly a variable has been renamed in every file in the directory is more impressive then clicking on UI elements to get to find and replace, then clicking the "execute" button. They both do the same thing, probably take the same amount of type to actually complete, but our brains are wired to see the keyboard-only method as some sort of cyberpunk magic. Or maybe that's just me!
- 2pEXgD0fZ5cF 6y agoCompared to many I am a relatively new emacs user, back when I began programming I let myself get intimidated by the scary stories told about Emacs and Vim configuration. Turns out a huge emacs configuration is not needed, in fact I notice my emacs config actually started to become smaller over the recent times. It's hard to express how much I value emacs now and the only regret I have is that I did not give it a chance earlier when I still exclusively used "modern" editors and IDEs. Another aspect I see rarely mentioned is the emacs evil[1], it basicelly provides a full vi layer, it's much more than your average "vi keybindings" plugin. Emacs vs Vim? Not a question I have to give any thought when I can use both and switch between them without much effort. [1]: https://github.com/emacs-evil/evil https://github.com/emacs-evil/evil
- omaranto 6y agoEvil is rarely mentioned? I guess we hang out in different parts of the internet.
- monadic3 6y agoI'm a little suprised they didn't mention DOOM or Spacemacs.
- 2pEXgD0fZ5cF 6y agoCompared to the uncountable amount of "Emacs vs. Vim" discussions? Yes, absolutely. And when someone talks about getting a vim workflow in emacs they likely only mention a big framework like Spacemacs...
- omaranto 6y agoOh, maybe my brain counts every mention of Spacemacs or Doom as an implicit mention of Evil.
- jackcviers3 6y agoYeah, mine is like 500 lines with use-package and lsp-mode. And it works on Mac osx, windows, and Linux, works with Java, scala, typescript/Javascript, python, yaml,c#, xml, html, haskell, ruby, c, and c++. Haven't done any Android or ios work, but I'm sure it would work with that as well.
- tyingq 6y agoTo me, it depends on the language. An IDE helps a lot with verbose languages that have somewhat complicated environments or runtimes. Like Java. I can fly with VIM and Perl though.
- ashtonkem 6y agoYeah, this is very language dependent. Trying Emacs with Java is pure pain, even if you love Emacs. Like most open source things, the quality of support maps closely to the density of users who are trying to accomplish something similar. This is why Emacs has fantastic support for languages like JS and Ruby, and massively subpar support for Java and C#.
- cle 6y agoI’ve been using Emacs for Java dev for a year now using LSP and it’s been great.
- higerordermap 6y agoI don't quite "get" magit, can someone tell what's great about it / for what type of git workflow?
- disgruntledphd2 6y agoIt's much quicker to do simple git things, the logs are integrated, it's super easy to stage hunks into separate commits, and it seems to make everything possible with git a little easier and more consistent (you do still need to know git though).
- jpeloquin 6y agoThis is what sold me on magit: 1. In the magit status buffer (equivalent of git status), you can selectively stage changes by highlighting the relevant lines and pressing "a". Basically an interactive git add -p. There's also line-specific unstage and discard. This makes it easy to tidy up before committing. 2. If the cursor is on a commit, commands (show, interactive rebase, push) will take that commit ID as a default argument. It feels like you're interacting with the commits directly, which makes it easier to reason through an interactive rebase or partial push. Simple rebases like reordering or squashing recent commits take only a few seconds. 3. It seems to mostly rely on calling the core git commands and parsing their text output. The core git commands are reliable. Many git clients will hang on large (> 200 GB) repos; magit doesn't. An exception is diff colorization, but if colorization is taking too long on a big diff, Ctrl-g will make magit fall back instantly to the plain diff. 4. Has decent submodule support, in that submodules can be interacted with much like commits in the parent repo. 5. Has git annex support. (Technically, I think this is provided by another package that extends magit.) It's not really tailored to any particular git workflow as far as I can tell. The design intent seems to be that every displayed entity should be interactive, regardless of where it is displayed.
- GordonS 6y agoIn VSCode, you can selectively stage lines in files too, just select them in the diff, right-click, "stage selected" - I love being able to do that so easily within such a nice UI.
- hibbelig 6y agoIt's very interesting. I used Emacs for a long time, but slowly got weaned off it. - I used it for email, then I had to collaborate with people who wrote "please see my comments in orange below". (Of course, they were Outlook users.) Emacs did not show that orange color, so I didn't know... Maybe these days it's possible to read Outlook emails nicely in Emacs. - I used it for development, then the Java software I worked on got too big to internalize all APIs and Eclipse completion and refactoring really helped. I did try to build the Eclipse "quickfix" thing in Emacs, but all I got done was to add a missing import (because JDEE, I think it was, provided that functionality). - I switched from Linux to Windows because the world around me was like that, and so I could help junior colleagues with their EOL problems... - I used Mercurial (hg) for a while and TortoiseHg was really nice, so I didn't feel the need to use Emacs for this. It's a pity, really. Some aspect here, some aspect there, and then you get pulled away from Emacs. Now, with LSP, perhaps Emacs could offer code completion and refactoring, but the Java app I work on builds with gradle, and I have no clue how to tell the Java/LSP thing about the class path... So I'm on IntelliJ...
- dleslie 6y ago> I switched from Linux to Windows This is where many people leave Emacs. It's not that there's better tools on Windows, it's that Emacs on windows is terrible. Magit is orders of magnitude slower, for instance, and external tool integration is grossly impeded by the poor availability and quality of package management on Windows. Maintaining Emacs on windows takes considerable effort. Personally, I make do with WSL1 and Emacs. WSL2 is intolerably broken when working on NTFS folders, so it's a nonstarter. This means Docker is broken (mounts don't work) but Emacs works well. Yah, it sucks.
- mbrumlow 6y agoWell with wsl2 I gave windows a go for my work dev environment. And so far emacs had been amazing via wsl2 and a x server. I should note I did modify the xserver to allow me to toggle individual windows going fullsceen. And am running native emacs (which is blazing fast)
- augustk 6y ago> When you finally learn to master and config Emacs, you run circles around all other editors. I quit Emacs when I realized that I spent too much time on configuration rather than solving first hand problems; it can almost become an obsession. Now I use Pluma.
- brandonmenc 6y ago> I manage several projects with it and switch contexts with one key-combination: Vagrant box is started, project folder is changed, necessary files opened, ready to hack, build, deploy, do server restarts with a single key stroke. When I single-click to open a project in a JetBrains IDE, the same sequence of events happens (albeit using Docker Compose instead of Vagrant).
- na85 6y ago>When you finally learn to master and config Emacs, Should be "if" and not "when", in my opinion. It's so incredibly frustrating to watch emacs from the outside. Maybe they don't want emacs to become popular? Certainly given the state of Hurd that could be true, and perhaps merely the fact that a Free editor exists is enough for them. For me, I really like emacs. It's great. But it has flaws/warts/roadblocks that routinely turn away new users and the grognards that seem to form the most influential portions of the emacs community seem to care more about freedom than about making an editor that's welcoming to new users and that people actually want to use.
- craigsmansion 6y ago[Never mind]
- na85 6y agoWhether intentionally or not you seem to have directly reinforced the argument I was making. >Why from the outside? You're, quite literally, one command away from being on the inside: "M-x ielm" I have no idea what point you're trying to make here. By opening with what I'm sure is an oh-so-witty commit like this you signal that you aren't going to engage honestly in this debate. >Emacs is very popular amongst emacs-users It's like you didn't even read what I wrote, and instead you've constructed a straw man to argue with. I think it's pretty obvious I was using "more popular" to refer to "attracting new emacs users". >GNU nano, GNU ed, GNU moe, GNU emacs Again, not sure what the point of just listing a bunch of editors is. Your entire comment is pretty much one giant non-sequitur. >Obviously the emacs community is going to care about software freedom. I don't understand how anyone would expect differently. Again, it's like you didn't want to respond to what I actually wrote. You seem to be responding to what you wish I wrote. I never implied that I expect the Emacs project not to care about freedom at all, merely that I think it's silly to prioritize freedom at the expense of everything else. Is Free Software of any utility if nobody uses it? Or is it merely intellectual masturbation? The default emacs experience is clunky, ugly, and dated. It turns people away. This is an objective truth. I categorically reject the idea that polished software is mutually exclusive of free software. I think emacs would do a better job of promoting the use of free software if emacs had a better onboarding experience and was more user-friendly, and I think it can achieve this goal without betraying the principles of Freedom on which it was founded. And yet at any suggestion of this, RMS and the other grognards are content to ridicule and belittle (just as you have done here) rather than engage honestly in the arguments being presented. >The very least one can do when addressing perceived flaws/warts/roadblocks, is to accompany them with a snippet of code, so users/developers can actually experience these suggested improvements. Are you seriously suggesting I should post a patch to HN? It's comments like this that leave the very distinct impression you're just trying to shield yourself from any criticism rather than have to confront viewpoints that challenge the status quo of the emacs project.
- chishaku 6y ago> When you finally learn to master s/When/If
- agumonkey 6y agoI wonder what other editors allow to dynamically extend/adapt much about anything. I remember trying turbo pascal 7.0 on dosbox. I was shocked by how brilliant that tiny program was for its era. So light, so packed with features, so fast. Yet at the first editing ergonomic need I had, I was stuck.. my brain couldn't stop thinking .. 'this would already have been fixed in emacs'.
- Barrin92 6y agoin theory I agree with this, the problem is just that Emacs very often shows its age. On large codebases the performance of completion frameworks is for me often abysmal, language server connections sometimes give in without discernible reason and I need to restart. A lot of things that should be done asynchronously aren't and so the UI locks up. As a long term Emacs user I find myself going for VSCode a lot these days just because of how smooth it is and how well done the integration of major plugins is.
- intrasight 6y agoMy holiday project was to re-tool my development environment. I am going to try using both VS Code and Emacs on my current .Net 5 project. I installed the Emacs keybindings extension for VS Code. I upgraded from an ancient version of Emacs to version 27. I do really want to do development in both so as to decide what works best for me. Emacs configuration is a labor of love as any Emacs user can attest to. I'm already at 50 hours and guestimate that I've got another 20 hours to go before it's where I'd like it to be. This has required multiple tech support discussions on Stack Overflow and Github and Reddit. I constantly ask myself if it's worth it, and only time will tell. But I've been using Emacs for 30 years and it's a tough habit to break. Still, I can easily justify the effort as I'll be using Emacs until my last keystroke. The open question is will I be using it for C#/.Net development. I do wish to give VS Code a fair go. And certainly it makes sense to be proficient in that editor.
- brnt 6y agoCustomization is a liability. It it practical to be able to work with any hammer, not just your own. Also practical that you can lend your hammer out when the need arises, without instructing the other on the particulars of your version. Computers are cattle, software too.
- gkya 6y agoI can use almost any editor, ed(1) included, fairly efficiently without any config (well not exactly efficiently with ed). I also have a 7kLoC init.el, and a couple little packages I've written. Just because you wouldn't starve eating grain, olives and the occasional cheese shouldn't mean you can't eat a prime cut and have a nice glass of wine with it when you have the chance.