Live data from Hacker News

Emacs vs. WebStorm for Node.js Development

spin.atomicobject.com

21–30 of 105 posts

Re: Emacs vs. WebStorm for Node.js Development

#21
post #9
post #2

tl;dr: (everybody already know this) webstorm is better at debugging

Actually for me, this is much more important: "Symbol and definition lookup is another great feature of WebStorm. While Emacs can find symbols and definitions in a single file via Tern, WebStorm can actually inspect your whole project and find a definition, or at least give you a very pruned list of candidates to choose from." not being able to Ctrl-click a variable or function really reduces my efficency (especially…

This is possible in emacs to a certain extent, with the help of node itself. See my comment above:

https://news.ycombinator.com/item?id=10973687

Re: Emacs vs. WebStorm for Node.js Development

#22
post #15
post #9

Earlier quoted context omitted.

Actually for me, this is much more important: "Symbol and definition lookup is another great feature of WebStorm. While Emacs can find symbols and definitions in a single file via Tern, WebStorm can actually inspect your whole project and find a definition, or at least give you a very pruned list of candidates to choose from." not being able to Ctrl-click a variable or function really reduces my efficency (especially…

I'm not sure how other emacs users do this, but I use `projectile-grep` to grep for symbols in a project all the time. In the spacemacs this is bound to `SPC g s p`.

Projectile-grep is awesome. I use it too. Although I swapped out grep for platinum-searcher for freaky fast results (at the loss of certain regex features)

Re: Emacs vs. WebStorm for Node.js Development

#23
post #6
post #3

Partially offtopic. The author is doing > "complex edits [in Emacs] using Vim macros" This is a big surprise. I left vi for emacs in the early '90s when vi's macros were crippled, to say the least. I'm using vim for quick edits, mainly on servers or configuration files (sudo vi /etc/something). Did vim macros really become better than Emacs' ones?

not sure about "better", but i'm curious what was crippling back then? using them nowadays is a breeze and you get practically full functionality at your disposal.

You could have one macro per time and you had to type it in like this

:maappend chars to end of line( * )Jf:D

Then ^N to execute it, I think.

( * ) I don't remember how we quoted ESC

When I saw that emacs could record macros while I was typing that immediately sold me the editor. Multibuffer and multifile were nice features too.

Re: Emacs vs. WebStorm for Node.js Development

#24
post #3

Partially offtopic. The author is doing > "complex edits [in Emacs] using Vim macros" This is a big surprise. I left vi for emacs in the early '90s when vi's macros were crippled, to say the least. I'm using vim for quick edits, mainly on servers or configuration files (sudo vi /etc/something). Did vim macros really become better than Emacs' ones?

Same here, I use vim for editing a single file (often scripts or configs), always in a terminal.

For editing multiple files (mostly code) or a project folder, I use emacs with X11.

Re: Emacs vs. WebStorm for Node.js Development

#25
post #7

I personally moved to visual studio code (from WebStorm ) which has a good debugger for Nodejs and a few features that are really handy ( support for .d.ts definitions for node modules ... ). I usually don't use MS products but they did an impressive job with that IDE, no question.

I find the UX approach a little weird in VS Code. I like tabs. I've had tabs in my editors/ IDE's since I started out.

To make me switch to this 'working files' area really puts me off their product.

Re: Emacs vs. WebStorm for Node.js Development

#26
post #7

I personally moved to visual studio code (from WebStorm ) which has a good debugger for Nodejs and a few features that are really handy ( support for .d.ts definitions for node modules ... ). I usually don't use MS products but they did an impressive job with that IDE, no question.

WebStorm has support for .d.ts definitions for some time now.

See JavaScript > Libraries > Download... and make sure to choose TypeScript community stubs. You can also add your own manually.

Re: Emacs vs. WebStorm for Node.js Development

#27
What would take Node integration in Emacs to the next level would be to do something like the various Lisp implementations and their Emacs modes (SLIME, Geiser, etc.) do: Talk to a running program to get information.

When I develop Scheme with Geiser, it knows which module I'm working in currently and it knows how to jump to the definition of any symbol by inspecting the source information attached to any Scheme object. I can quickly jump to the REPL or evaluate arbitrary expressions. No ctags/etags or other static analysis tools, just a REPL. It's a really productive way to write and debug code.

Re: Emacs vs. WebStorm for Node.js Development

#28
post #15
post #9

Earlier quoted context omitted.

Actually for me, this is much more important: "Symbol and definition lookup is another great feature of WebStorm. While Emacs can find symbols and definitions in a single file via Tern, WebStorm can actually inspect your whole project and find a definition, or at least give you a very pruned list of candidates to choose from." not being able to Ctrl-click a variable or function really reduces my efficency (especially…

I'm not sure how other emacs users do this, but I use `projectile-grep` to grep for symbols in a project all the time. In the spacemacs this is bound to `SPC g s p`.

I use helm-ag for the same purpose, but it still generally isn't as fast as CMD-b in webstorm. I should hook up something to do helm-ag for the symbol under point...

Re: Emacs vs. WebStorm for Node.js Development

#30

Here are some helper commands I use to resolve JavaScript modules within emacs. The basic idea is to extract the string inside the require or import call, then ask a node subprocess to locate that file (using require.resolve), and use emacs to open that file. I'm sure someone more experienced with elisp can take it to the next level. See the interactive commands section towards the end of the file. https://github.com…

[deleted]
Post reply on HN