Live data from Hacker News

Ask HN: Could VSCode be the new Emacs?

news.ycombinator.com

1–10 of 93 posts

Ask HN: Could VSCode be the new Emacs?

#1
TL;DR: Why isn't VSCode the new Emacs?

VSCode is clearly a code editor. Emacs is used by many as an operating system / UI framework / app platform.

Emacs's adepts have been using it for email, calendars, process management, taking notes, terminal GUI, coding (dah), and some even browse the web without leaving it.

I've been using Orgmode (+ org-roam) for a couple of years already and no other software can replace it for me.

I have huge respect for this almost 40 years old piece of technology and all the people keeping it alive and active. I love the hacker community around it.

All that said, I mostly hate using Emacs. It's slow (I have i7 with 4 cores and 32Gb of RAM). Emacs Lisp drives me crazy. I constantly mis-press some weird key chord and enter a state where I can't do anything unless I restart the app. It's hard for me to find docs on how to integrate with various parts of the UI, so I mostly rely on reading the source code of different extensions. Two years in, I still can't read Emacs Lisp well.

I feel unproductive when changing how Emacs behaves. And I've been coding for 7+ years, including functional programming.

---

Now, I've been using VSCode for quite a while (after 4 years of Vim).

I've noticed that, on the surface, VSCode extensions can do everything Emacs does.

If you think about it, VSCode is a UI framework too — there's an API for all the UI components such as the sidebar or the text editor area itself; and you can also add your custom commands that can be triggered in a number of ways.

Which means you can actually implement things like Orgmode in VSCode.

Also: - You are coding using the most popular ecosystem in the world (Web). - The community is larger than one of Emacs. - The docs are much friendlier.

---

From what I understand, the main difference is that with Emacs you can start hacking any part of the environment right from the start. It's designed to be played with.

With VSCode, you just have a strictly defined JSON config file, and everything else requires you to work with "extensions" which sounds like something less accessible and "oh, that sounds grand, I'm not sure how deep that rabbit hole is". You can't just open a file, define a new hook or whatever and now your VSCode behaves differently.

But are there any other reasons, technical or otherwise, why people don't seem to use VSCode for things beyond editing code?

If only you could open some special file, write some Typescript, and modify anything about VSCode in a dirty hacker manner, would you use it?

Re: Ask HN: Could VSCode be the new Emacs?

#2
A Unix novice came to Master Foo and said: “I am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?”

Master Foo nodded.

The novice continued: “Isn't it also the Unix way that the wheel should not be reinvented?”

Master Foo nodded again.

“Why, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practice the Unix way?”

Master Foo asked the novice: “If you have a text file, what tool would you use to produce a copy with a few words in it replaced by strings of your choosing?”

The novice frowned and said: “Perl's regexps would be excessive for so simple a task. I do not know awk, and I have been writing sed scripts in the last few weeks. As I have some experience with sed, at the moment I would prefer it. But if the job only needed to be done once rather than repeatedly, a text editor would suffice.”

Master Foo nodded and replied: “When you are hungry, eat; when you are thirsty, drink; when you are tired, sleep.”

Upon hearing this, the novice was enlightened.

EDIT - source: http://www.catb.org/esr/writings/unix-koans/shell-tools.html

Re: Ask HN: Could VSCode be the new Emacs?

#3
> I constantly mis-press some weird key chord and enter a state where I can't do anything unless I restart the app.

C-g

> You can't just open a file, define a new hook or whatever and now your VSCode behaves differently.

By that definition of extensibility, even gEdit "could be the new Emacs".

> the main difference is that with Emacs you can start hacking any part of the environment right from the start. It's designed to be played with.

You just answered your own question.

Re: Ask HN: Could VSCode be the new Emacs?

#4
Emacs selling point is that you can easily change any part of editor. You can introspect it, you can test your changes in the repl and commit them into your config file. And that happens almost immediately as you're starting to learn Emacs. I did not experience that workflow with vscode. It's more like vim for me and Emacs stands on its own.

Re: Ask HN: Could VSCode be the new Emacs?

#5
> From what I understand, the main difference is that with Emacs you can start hacking any part of the environment right from the start. It's designed to be played with.

I think you nailed the big difference right there.

I mostly use vim but configuring the editor is a gateway to programming new functionality. You start small by defining a function bound to a key. Then you start exploring more of the api and gluing functions together. Eventually you refactor it a bit if you find it worth sharing.

I've only used emacs for a bit and I understand it has more of that "OS" aspect to it where people stay in their editor for a lot of tasks that are more than just"edit text". But like vim, users can tweak functionality in a relatively accessible and not overly-limiting way. And they are introduced to this early on.

I've used vs code. It's pretty. It works well. I have the impression that to change functionality I either have to hope it already exists as a toggle somewhere or go read how to write a full vs code extension. At least in my experience, it lacks the incremental aspect described above.

Re: Ask HN: Could VSCode be the new Emacs?

#7
post #2

A Unix novice came to Master Foo and said: “I am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?” Master Foo nodded. The novice continued: “Isn't it also the Unix way that the wheel should not be reinvented?” Master Foo nodded again. “Why, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practic…

I am familiar with sleep, but I haven't used the other two UNIX commands yet. I've still got a long road to enlightenment.

Re: Ask HN: Could VSCode be the new Emacs?

#8
post #2

A Unix novice came to Master Foo and said: “I am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?” Master Foo nodded. The novice continued: “Isn't it also the Unix way that the wheel should not be reinvented?” Master Foo nodded again. “Why, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practic…

This is from Rootless Root: The Unix Koans of Master Foo - http://www.catb.org/esr/writings/unix-koans/shell-tools.html

Re: Ask HN: Could VSCode be the new Emacs?

#9
> But are there any other reasons, technical or otherwise, why people don't seem to use VSCode for things beyond editing code?

The best answer I've seen to this question is https://www.murilopereira.com/the-values-of-emacs-the-neovim...

Amongst other things, it lists different values that each tool prioritizes, and how "Core values are self-reinforcing. They attract like-minded people, who will then defend them."

Emacs: Extensibility, Freedom, Introspectability, Keyboard centrism, Stability, Text centrism.

VSCode: Approachability, Integration, Maintainability, Progressiveness, Velocity.

That is, even if VS Code achieves technical parity with Emacs (wrt introspectibility/extensibility), its community might not prioritize using VS Code for things beyond editing code.

Or maybe it will. These things are difficult to predict!

Re: Ask HN: Could VSCode be the new Emacs?

#10
post #2

A Unix novice came to Master Foo and said: “I am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?” Master Foo nodded. The novice continued: “Isn't it also the Unix way that the wheel should not be reinvented?” Master Foo nodded again. “Why, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practic…

Are these fill-in-the-blank parables of some sort (or parodies perhaps)? I feel like I've seen every kind of story put in this format. Is there some historical context that makes these interesting?
Post reply on HN