reddit / emacs
How would you rate vanilla emacs against vanilla VSCode for a student?
[deleted] · 2022-10-27 01:39
[deleted]
JohnathanDee · 2022-10-27 01:45
VS Code is much, much easier to use.
But Emacs' steep, non-linear learning curve is, IMO, 100% worth it.
That said, it depends. If you're planning on working in lower level languages like C/++ then for sure... Learn Emacs.
If you're planning to stick with web dev or other high-level languages, it may not be worth it to you.
tb877 · 2022-10-27 01:49
>That said, it depends. If you're planning on working in lower level languages like C/++ then for sure... Learn Emacs
Newbie question: why is it more useful for C than web dev? Quick access to the terminal? Shortcuts for building projects? What else?
JohnathanDee · 2022-10-27 01:58
Yes, all that, plus integration with cmake, gcc, g++, etc. Great for Rust, too. You never have to leave Emacs.
Not that it *isn't* useful for web devs. I do a lot of web dev in Emacs... It's more about how serious you are about digging in and really grokking computer programming, rather than tinkering with high-level frameworks etc. Both are needed and valid.
But the packages for, say, PHP, are not nearly as well-written as the more difficult languages. They do the trick. I'm satisfied. But... It depends. If I spent ALL my time in PHP and HTML etc, I might look at a less generic solution. Maybe an IDE. But... I only spend maybe 10% of my time in those languages.
Emacs isn't for everybody. Some folks just won't find it worthwhile to learn. And that's OK.
[deleted] · 2022-10-27 02:10
[deleted]
PhantomSeahorse · 2022-10-27 02:28
VSCode definitely has a much nicer out of the box experience compared to emacs
tb877 · 2022-10-27 02:35
>Yes, all that, plus integration with cmake, gcc, g++, etc. Great for Rust, too. You never have to leave Emacs.
Right, pretty much my experience, thanks for the reply. All the new students in my physics department uses heavy IDEs like VScode or pycharm or whatever for C/fortran/python, still can't figure out why. Doing things is so much faster in emacs.
Maybe the only thing I've always missed is code autocompletion/tooltips with function calls when learning new languages. But otherwise I always find myself going back to emacs when I'm unfaithful for a brief period.
xer0d0g · 2022-10-27 02:47
What are you trying to accomplish? If you're you're looking for the easiest, lowest-effort solution then VS Code all the way. If you want to learn a tool that will serve you for your entire programming career and don't mind a few months of suck in the process, then it's Emacs by a mile.
[deleted] · 2022-10-27 03:00
[deleted]
jondiced · 2022-10-27 03:24
You have to start them on Emacs early before they learn there are easier options!
tapesales · 2022-10-27 03:25
Horribly. Go for doom emacs and then peel back layers / roll your own config later. Otherwise just go with VS code - too much messing around starting from vanilla.
xer0d0g · 2022-10-27 03:32
I'm not a web developer, so I can't speak to that portion. My advice would be to try Emacs for a good bit. If it clicks for you, great. If not it will be just as easy to start using VS Code a year from now as it is today.
Agling · 2022-10-27 03:54
I hate vanilla emacs. But like vanilla ice cream, you can dress it up just the way you want it and it's great.
sconey_point · 2022-10-27 04:11
I do web dev, installing lsp-mode or eglot + flymake-eslint, as well as company for auto completions, will get you 99% of the way there. The rest is just getting familiar with key binds and the help system, which the emacs tutorial works great for. Installing those aforementioned packages shouldn't take much of a config at all, and in my opinion it's probably faster to learn by starting off with as little elisp as possible, and simply getting emacs to a point that works (for you) and using it. I imagine this requirement of initial configuration is probably why not many others are recommending it for web development.
MunsterPlop · 2022-10-27 04:17
Webdev in emacs is fine, I've done that for a few years and it hasn't really been an issue.
Something like VSCode is obviously easier though and it being based on web technologies has its perks.
The benefits you get from emacs are more about integration and automation and it's all directly proportional to how well you know Emacs Lisp.
Even if I've had to use VSCode or any other IDE, I've always kept Emacs open on the side for all the things it's really good at.
It will support your work in many ways beyond just coding.
As for webdev, it is the easiest entry for new programmers in terms of getting a decently paid job without knowing too much CS.
Even if you're self taught, showing that you can create some decent webapps using something like react can get you a job.
Heck, you can even make a living by freelancing and making vitrine websites for your neighbors.
In comparison, if you want hard-mode, try gamedev as an indie where you have to know a shit ton of stuff just to get one game out of the door without being sure it's gonna work and that you're gonna be paid/keep being paid.
Off the top of my head, mobile dev is also okay and nowadays, it's relatively easy to leverage your webdev knowledge to make apps.
[deleted] · 2022-10-27 04:35
[deleted]
[deleted] · 2022-10-27 04:37
[deleted]
[deleted] · 2022-10-27 04:42
[deleted]
Extension_Try_6870 · 2022-10-27 04:54
What are you missing in emacs for web dev ? I find that php-mode/web-mode and all the LSP works great.
jdeville · 2022-10-27 05:15
Honestly with language servers you can go a long ways with Emacs these days for web developments. That said, it might be worth focusing on the course and then adopting Emacs later, as stated, the leaving curve is non-trivial
RepublicWorried · 2022-10-27 05:41
Just stripped my config yesterday to about 400 loc. With eglot built in now, you can have a clean experience with that. After 5 years of emacs, I am steel learning but wouldnt want to trade in the navigation speed if it with a ordinary ide. Vscode might be lightweight, bit all these extensions slow it down
OldMansKid · 2022-10-27 05:49
One should use the right tools for their problems. I use emacs to develop vanilla cmake c++ projects. It can be used even in Termux on Android. But emacs is pretty much useless when you develop games such as Unity and Unreal projects. I do all sorts of things, and in my experience even when dealing with TS/HTML/CSS , VS code has better support for the languages as well as browser integration out of box. Although doable, the effort spent on configuring emacs for web or HTML games isn't worth it.
MitchellMarquez42 · 2022-10-27 05:52
There's a difference, though: with vanilla ice cream, the vanilla flavor (yes vanilla is a flavor) is always there underneath. But in Emacs, you can redefine the vanilla parts, or even disable them. There is no plain emacs, but custom emacs can have 0% vanilla. There is plain ice cream.
Not sure what this means, take it as you will.
Agling · 2022-10-27 05:57
Almost agree, but not quite. Emacs does have stuff that is near impossible to make the way you want it. I have a very long init and have put a ton of hours into emacs config but I still can't make it behave just like vim in the ways I want. Emacs is very flexible and extensible, but not quite enough of either to really claim to have no vanilla, pretty much regardless of how much customization you do.
grewil · 2022-10-27 05:57
Learn Emacs if you are serious about programming. Code is a distraction in comparison - you can use it too, on the side, while progressing into a master level in Emacs that is not possible in Code.
perkinslr · 2022-10-27 06:10
It depends on what you want. If you *like* old-school terminal editors like `nano` or even `vi` to a less extent, then emacs in its base form is like a superpowered version of those. It's usually already installed on OSX machines, which is useful if you need to be able to walk into a campus computer lab or are assigned a machine at a clients place or similar.
VS Code has a decent reputation, but I've never used it. In python and web development, the JetBrains suite (PyCharm, CLion, and similar) are well made, and similar to VS Code in reputation and style. I switched to emacs from pycharm. You lose out on some fancy features like the ability to extract code into its own module through a right click context menu, and code linting and similar need extra packages. But the raw text editing in emacs is so much better. The ability to record macros, kill sentences, words, paragraphs, undo-tree, and cycling the kill-ring, as well as things like saving locations to the registers and jumping around your code base make raw editing much faster in emacs.
Which means if you spend most of your time refactoring your project through the right-click context menu, emacs is going to lose. If you spend most of your time actually writing new code, emacs is the clear winner.
chaiale · 2022-10-27 06:20
Self-taught here, switched from VSCode to Emacs to learn Common Lisp, stayed for Emacs’ versatility. I liked that I can use the same feature-rich editor for pretty much any language I want. Maybe Emacs offers extra goodies for low-level programming, I wouldn’t really know, but Emacs is still a worthwhile investment for web dev too. Admittedly, that’s because I found the cost of Emacs low enough that the benefits are generally pretty worth it; it’s a few weeks of steep learning curve, no doubt, but after that I was about as comfy and productive as I’d been in VSCode, and over a year later, I’m *significantly* more productive.
Because I started in Emacs with Common Lisp, I was using Portacle, which has a lightweight config over vanilla Emacs. Using someone else’s fairly sparse config gave me some sane defaults without becoming so complex as to be incomprehensible to a beginner like Doom or Spacemacs would have been. With the lightweight vanilla approach, I was able to start tinkering with my config pretty quickly. There are many collections of sample Emacs configs, and that might be a good place to start.
Emacs isn’t really a “try it out real quick and see if it clicks” piece of software, but for what it’s worth, I *do* think its difficulty is oversold. And if you’re really interested in making a go of it as a programmer, investing in your editor will provide years—if not decades—of return, no matter which one you choose.
No_Statistician_9040 · 2022-10-27 06:48
For both editors only using vanilla would be like buying a sports car but only driving on first gear..
If you want a vanilla experience you sould look for one of those huge bloated ide's with intellisense out of the box.
The power, and reason for using emacs is the fact that it can be configured to your liking, running it vanilla is a waste imo
thriveth · 2022-10-27 06:57
The whole Vim layer in Doom is optional. It asks you to choose. I personally think the Vim bindings are worth it in the long run but one step at a time.
I also think there is one huge advantage to Doom, which is its discoverability. You can get the same in Vanilla Emacs using plug-ins like Vertico or Ivy but Doom enables it out of the box. It lets you hit M-x and then narrow down command options. If you later decide to scratch it and roll your own, it will have fast-tracked you to knowing a ton of functionality.
That said, if you choose to roll your own, I recommend installing Which-Key and the Vertico+Consult+Marginalia+Embark combo to highly enhance discoverability in the same style. It has seriously helped me get comfortable in Emacs. I started with Spacemacs myself, then went on to roll my own.
(I'm a physicist and using Emacs for computations and data analysis mainly in Python, so I can't speak for or against it as a webdev tool).
MikeSeth · 2022-10-27 07:00
Emacs is a tool for life long use in every aspect of your digital life. That's all there's to it really.
No_Statistician_9040 · 2022-10-27 07:10
If you want a long term payoff in an editor i would lightly recommend learning vim instead of emacs, or even using emacs in evil mode (giving it vim bindings)
By far the best editing method you will ever try. Check up theprimegan on yt he should have a quick start guide
ekd123 · 2022-10-27 08:23
Vanilla Emacs (ie. no config at all) is too alien to today's people. It is not really competitive in any regard, either, though usable.
Doom Emacs and Spacemacs have much better onboarding experience. Both of them can be configured to use native Emacs keybindings.
There are also some smaller and less opinionated starter kits, like prelude and better-defaults. They encourage you to fork them to create your own config, unlike Doom and Spacemacs.
[deleted] · 2022-10-27 08:27
[deleted]
dirtycimments · 2022-10-27 08:34
Discoverability is sooo nice!
I am not at all a programmer and learning evil keybindings (at least well enough to zoom around in documents) only took a few days.
Doom gives me so much, i cant imagine doing my daily note taking and article writing in anything but doom emacs for now (might dive in and do my own config some day, but not in a hurry)
deaddyfreddy · 2022-10-27 09:23
> OSSU
As I can see, it uses Standard ML, Racket, and Ruby as programming languages, in this case, Emacs is pretty fine, though some packages have to be installed for better support (e.g. Geiser for Racket).
Horrih · 2022-10-27 11:48
You can see vanilla emacs as a big set of lego.
It's basically unusable out of the box (compared to modern standards) but you can build it the way you want, and building is quite fun. But it takes some time and you learn *a lot* along the way.
I like starting from vanilla : not much is enabled by default compared to doom/space macs so you can learn to add packages one after the other and use them just the way you want.
If you choose this route, here is a roadmap example for what you describe.
- learn emacs basic commands with the built in tutorial (C-h t)
- learn the elisp basics with the manual (C-h i to access the manual index, then go to Emacs Lisp Intro). Not necessary to go in depth, but enough to be able to understand the elisp code in your config
- install use-package with the package manager : it's used almost everywhere nowadays to easily enable packages and configure them
- if you are into vim key bindings, install evil-mode
- install which-key and helm : they greatly help with autocompletion and discoverability of features.
- download a theme or enable one of the built ins. If you like vscode's dark theme, you can use the package vscode-dark-plus-theme
- install eglot or lsp-mode : they will provide completion and jump to definition features, provided that you have installed a language server for your programming language. This step will probably take some time for you to get it right, but it's worth it !
There you go, you can have a look at my (imo well documented) config [here](https://github.com/Horrih/config/blob/main/.emacs) to help you configure most packages listed here, (plus many useful options circa line 100). Don't use
It raw though, the second half defines my really weird keybindings
burningEyeballs · 2022-10-27 12:01
At various point in my career I’ve been told that NetBeans, Eclipse, BBEdit, Sublime, Atom, and now Visual Studio is The Editor to learn. It is The Best and that soon everyone will use it. And those editors were all great in their own way. And certainly I think for a straight-out-the-box solution VS is probably the best thing going right now. Will it be the best thing in ten years? Probably not if history is any indication. That isn’t to say you can still be productive with it, just like there are still devs out there who prefer to use Eclipse.
I mention this because during all of that time emacs has been quietly chugging along. And 30 years from now it will still be here doing its thing. To me, that is the real sign of a quality tool when it can outlive all the competition.
So if you are genuinely looking for a text editor for the long term, I would recommend emacs. The amount of utility you can get out of elisp customizations is unparalleled.
styrg · 2022-10-27 12:12
I actually do web dev all day and think emacs is perfect for this.
Honestly i just hate vscode, especially the source control tools, and their vim emulation plugins are buggy and incomplete.
But OP, you probably arent opinionated yet so just use vscode! I did that in school and picked up "real" editors later
[deleted] · 2022-10-27 12:51
[deleted]
[deleted] · 2022-10-27 12:53
[deleted]
[deleted] · 2022-10-27 12:58
[deleted]
pedzsanReddit · 2022-10-27 13:06
Slightly off topic to your question but more reply to your quest. System Crafters on YouTube has a play list of 3 tutorials [Emacs from Scratch](https://youtube.com/playlist?list=PLEoMzSkcN8oNmd98m_6FoaJseUsa6QGm2). They also have one on how to set up [LSP Mode](https://youtu.be/E-NAM9U5JYE).
Note if you search in their videos for "Emacs from Scratch", there are 13 hits. I'm not sure why the playlist just has 3 of them.
mickeyp · 2022-10-27 13:09
> It's basically unusable out of the box (compared to modern standards)
No, it isn't.
[deleted] · 2022-10-27 13:13
[deleted]
[deleted] · 2022-10-27 13:15
[deleted]
[deleted] · 2022-10-27 13:17
[deleted]
[deleted] · 2022-10-27 13:19
[deleted]
[deleted] · 2022-10-27 13:23
[deleted]
[deleted] · 2022-10-27 13:26
[deleted]
[deleted] · 2022-10-27 13:28
[deleted]
[deleted] · 2022-10-27 13:31
[deleted]
[deleted] · 2022-10-27 13:33
[deleted]
[deleted] · 2022-10-27 13:34
[deleted]
[deleted] · 2022-10-27 13:35
[deleted]
[deleted] · 2022-10-27 13:36
[deleted]
[deleted] · 2022-10-27 13:37
[deleted]
[deleted] · 2022-10-27 13:38
[deleted]
[deleted] · 2022-10-27 13:41
[deleted]
kikechan · 2022-10-27 13:43
Oh boy, looks like it's time for the weekly "vanilla emacs is devoid of features / too difficult" thread.
No_Statistician_9040 · 2022-10-27 14:03
You should be able to apply most of the elisp stuff to common lisp.
you don't "need" to be a good lisp programmer to configure emacs, you can just copy paste stuff from the internet and it will probably work, being able to know the basics are nice though.
Soupeeee · 2022-10-27 14:08
Web dev stuff requires a lot of extra stuff to do things like autocomplete and having multiple active modes that just doesn't fit very well with how some of the Emacs tools work. Here are some examples:
+ Some IDEs like IntelliJ can autocomplete CSS classes in css files which are defined in the HTML that imports them. I'm sure it's possible, but I don't know how you would implement that in Emacs.
+ Similarly, editing JS and CSS embedded in HTML has gotten much better, but still kinda sucks.
+ I use Angular at work, and the language server it ships with doesn't seem to play well with LSP-mode. I'll have to try Elgot.
It still offers the best text editing experience on Earth, but a lot of the niceties that many modern devs expect still need some work.
AlanYx · 2022-10-27 14:23
If you're focusing on editing code, vanilla VScode is going to be easier.
However, if you're doing knowledge-management/planning (org-mode) or writing technical papers (AuCTeX), vanilla emacs absolutely wipes the floor with vanilla VScode.
Of course, if you're willing to spend some time mastering your tools and moving beyond vanilla, emacs can take you further.
JohnathanDee · 2022-10-27 15:23
I agree! I don't use LSP, but I do use Emacs for web dev. My point was, rather, that if you're only doing web dev, there are IDEs like PHPStorm etc that are much easier to learn and with features that might... Might... Make them preferable to learning Emacs.
xer0d0g · 2022-10-27 22:50
This is good advice and something I forgot to mention in my answer. Learn Vim first no matter what. If you do end up using emacs, you'll want to use the vim keybindings to avoid some of the well-known RSI issues with emacs.
Horrih · 2022-10-28 17:02
As much as I love emacs, try asking a fresh graduate to do this basic stuff without access to a search engine:
- change keybindings
- setup autocompletion for python
They might read the tutorial then spend a few days learning elisp and emacs from the manual. More likely they'll give up in no time
In vscode and friends they will do this in a few clicks