Live data from Hacker News

Emacs vs. WebStorm for Node.js Development

spin.atomicobject.com

71–80 of 105 posts

Re: Emacs vs. WebStorm for Node.js Development

#72

"Symbol and definition lookup is another great feature of WebStorm. While Emacs can find symbols and definitions in a single file via Tern, ..." Actually, tern has tern-find-definition which works not only in a single file. You can jump in to other modules in your project or to node_modules. And there is tern-pop-find-definition to return back. For methods of native js objects tern even opens browser with related MDN…

>Actually, tern has tern-find-definition which works not only in a single file. I haven't been able to make this work outside my current file. Perhaps I'm just configuring tern wrong :(

This .tern-project config works for me:

  {
    "libs": [
      "browser"
    ],
    "plugins": {
      "node": {},
      "es_modules": {}
    }
  }
Your project files must have "correct" format, e.g. require('relative_path') for imports and module.exports/exports for exports (or es6 import and export). Example for AMD format (requireJS) can be found here - http://ternjs.net/doc/manual.html#configuration

Re: Emacs vs. WebStorm for Node.js Development

#73
post #68

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 obje…

That's how I write Ruby in Emacs. I have pry running in one pane, where I can write code with full context, then pull it across into the implementation.

This doesn't sound like the same thing. Do you use an Emacs mode that is able to talk to the Pry REPL and retrieve information about the code you are working with?

In addition to the other stuff I mentioned, Geiser also gives me symbol autocompletion, automatically shows me the printed representation of the value under the point, shows me the signature for the current procedure I'm working with, and shows docstrings if I press a special key combo. Maybe I didn't make this clear in my previous post, but Geiser does all of these things in the source buffers themselves, not just in the REPL buffer. If there's anything resembling this for Ruby or JavaScript I would love to know about because those are the two languages I am paid to work with.

Re: Emacs vs. WebStorm for Node.js Development

#74

I tried Emacs many times, but I still can't understand its appeal. Yes, everything can be changed, but there are layers and layers and layers of legacy code, cryptic keystrokes and shortcuts from 30 years ago, conflicting packages, elisp (I don't have anything against Lisp in general, but this particular dialect is quite quirky), etc etc.

And all that stuff will still be exactly the same, whichever language you're working in. It will also probably still be there in ten years' time - or, if not, it will have changed only quite slowly in the meantime.

(I know some people like to shake themselves up by doing the text editor equivalent of putting their shoes on the wrong feet, then once they get used to that, switching to walking on their hands to stop themselves from getting too comfortable - but I'm not one of them.)

Re: Emacs vs. WebStorm for Node.js Development

#76

I tried Emacs many times, but I still can't understand its appeal. Yes, everything can be changed, but there are layers and layers and layers of legacy code, cryptic keystrokes and shortcuts from 30 years ago, conflicting packages, elisp (I don't have anything against Lisp in general, but this particular dialect is quite quirky), etc etc.

try spacemacs! http://spacemacs.org/

As cool as spacemacs is, there are some pain points with it. Try following the documentation to add the mega theme pack. Insert the line that the docs say to insert. (into the file in which they tell you to insert it) Restart Emacs, find yourself stuck in pure emacs. Google how to exit emacs... or open a file and edit it. (If you have no experience with Emacs previously) Yes this is a doc issue, but the point is any misconfiguration, and you find yourself without any Vim-ishness at all.

Re: Emacs vs. WebStorm for Node.js Development

#77

I tried Emacs many times, but I still can't understand its appeal. Yes, everything can be changed, but there are layers and layers and layers of legacy code, cryptic keystrokes and shortcuts from 30 years ago, conflicting packages, elisp (I don't have anything against Lisp in general, but this particular dialect is quite quirky), etc etc.

try spacemacs! http://spacemacs.org/

This makes Emacs great. It is a night and day difference. Multiple times I've tried to transition to Emacswithout it and just couldn't see why people love it. Spacemacs is a great default distribution and solves some major pain points of initial setup and "sane" defaults. There's still a couple things that I'm not quite hip with (installing new 'layers' without restarting, among a few others), but it's probably because I don't know enough about it yet.

Re: Emacs vs. WebStorm for Node.js Development

#78
I had never heard of WebStorm. Apparently, it's "The smartest JavaScript IDE".

I started my career writing Perl CGI's, and have used, at various times, PHP, Python, Tcl, Ruby, Erlang, Java, Javascript and of course a lot of other stuff. Emacs has always done a good job, even if perhaps there was some editor/IDE that was a bit better for that specific langauge.

Re: Emacs vs. WebStorm for Node.js Development

#79

I tried Webstorm when embarking on a React Native project. What turned me back to emacs was that neither worked well with jmx in my experience. I tried Atom which did manage jmx excellently but it crashed and or locked occasionally which was a deal breaker. I do love jetbrains products so I will probably try again with Webstorm at some point, but for now emacs will do. I use emacs for org-mode project planning as wel…

[deleted]

Re: Emacs vs. WebStorm for Node.js Development

#80
post #78

I had never heard of WebStorm. Apparently, it's "The smartest JavaScript IDE". I started my career writing Perl CGI's, and have used, at various times, PHP, Python, Tcl, Ruby, Erlang, Java, Javascript and of course a lot of other stuff. Emacs has always done a good job, even if perhaps there was some editor/IDE that was a bit better for that specific langauge.

> "The smartest JavaScript IDE"

Lives up to that, IMO. I switched to WebStorm a couple months ago after using a combination of vim/Sublime and would never go back.

I do have the same issues the author has re: the Vim plugin though, could be much better.

Post reply on HN