As a long time emacs user I’m comfortable with Emacs, but I heard so much about VSCode that I gave it a try.
It’s certainly nice, many things work out of the box, the command palette is a nice touch (though a far cry from using Emacs with Helm) and the fact that most thing is accessible via the keyboard makes it a viable alternative.
So it’s like Emacs for the modern ages. Accessible, programmable. I can see myself using it for something in case it provides better support for some langugage than Emacs, though I still prefer Emacs, especially if LSP gives it equal footing in the future in terms of language support.
I tried to create a simple extension too and it was not too hard, but it required trial and errors and reading other extensions’s codes, because the documentation is pretty sparse.
The main takeaway about extensions for me is that VSCode provides an API which you have to use and it’s adequate if it provides the necessary access, but also limiting, because you can’t do things for which the vscode devs haven’t added support yet.
Also, the process of writing an extension is much more convoluted. You have to create an extension template with an npm command which fetches lots of packages into node_modules. Then you code the extension in vscode and trying it involves firing up an other vscode instance. There were mysterious errors when the extension did not work, but there were no error messages anywhere in the debug panel (turns out a node module I tried to use was not installed, but it was never reported to me, I only saw the error: the extension failed to start or something.)
Compared to this in emacs you simply evaluate some code in a buffer and it instantly becomes part of the editor. You are not limited by an API, because you can access the whole editor system. You can override core functions, etc. Of course, the greater power comes with greater responsibilities: you can break the editor if you reach too deep and not careful enough.
Conclusion: VScode is really nice, I like it, but I stil prefer emacs, because it makes it so easy to write extensions, you don’t even have to think about it. A small piece of code would be handy for a quick task? You just write it and it’s part of the editor. No registering an extension, no attaching to specific contribution points, no providers, etc. You just access what you need.
No comments:
Post a Comment