Amazing, but it could be even more awesome if you could provide API that could be integrated with other editors.
Tern – Intelligent JavaScript editing
11–20 of 82 posts
Re: Tern – Intelligent JavaScript editing
#12I do wonder how it will compare to Eclipse Orion's JavaScript content assist which is using Esprima as parser.
http://contraptionsforprogramming.blogspot.nl/2012/02/better...
Re: Tern – Intelligent JavaScript editing
#13The closest I've seen to something that works well is IntelliJ IDEA 12, when working with ActionScript, Closure annotated JS (JsDoc'ed libraries), or by comparison, the Dart editor.
With IntelliJ 12, if you're looking at a library with enough JsDoc on functions, the type inferencing seems to be a lot more accurate. Find Usages, Go to Definition, code-assist, all seem to be more pleasurable to use.
I don't like Flash, but ActionScript3 in IntelliJ is as close to the Java/C#/et al experience you'll get with respect to accuracy of assist. Probably wouldn't hard to port this over to JSX or Typescript which have similar syntax.
Re: Tern – Intelligent JavaScript editing
#14Backed. Like everybody who touches JavaScript should do. Also. mmmm finally decent vim bindings for javascript? I do wonder how it will compare to Eclipse Orion's JavaScript content assist which is using Esprima as parser. http://contraptionsforprogramming.blogspot.nl/2012/02/better...
It compares very favorably. The Orion approach, as I understand it (I only did some quick messing around with scripted, am not an expert) is very local, whereas Tern tries to do whole-program analysis. This should allow it to pick up much more information.
Re: Tern – Intelligent JavaScript editing
#15I find most of these attempts to code-completion in JS to be annoying, like bad speech recognition, if the accuracy is poor, it becomes frustrating. Not to knock their attempt, but I find that if codeassist isn't like 98% accurate, it often becomes more work to step through all of the wrong entries and not find what I want, then to just type it out. The closest I've seen to something that works well is IntelliJ IDEA…
Slightly related, I'm working on a feature where it distinguishes wild guesses from probably correct information by showing a different icon in the completion list.
Re: Tern – Intelligent JavaScript editing
#16Re: Tern – Intelligent JavaScript editing
#17I find most of these attempts to code-completion in JS to be annoying, like bad speech recognition, if the accuracy is poor, it becomes frustrating. Not to knock their attempt, but I find that if codeassist isn't like 98% accurate, it often becomes more work to step through all of the wrong entries and not find what I want, then to just type it out. The closest I've seen to something that works well is IntelliJ IDEA…
If you're using completion to verify that a thing has the type you thought it has, then yes, Tern won't help you much. If you're using it to save keystrokes, it certainly will. Slightly related, I'm working on a feature where it distinguishes wild guesses from probably correct information by showing a different icon in the completion list.
Re: Tern – Intelligent JavaScript editing
#18Backed. Like everybody who touches JavaScript should do. Also. mmmm finally decent vim bindings for javascript? I do wonder how it will compare to Eclipse Orion's JavaScript content assist which is using Esprima as parser. http://contraptionsforprogramming.blogspot.nl/2012/02/better...
(I'm the author of Tern -- I'm obviously biased.) It compares very favorably. The Orion approach, as I understand it (I only did some quick messing around with scripted, am not an expert) is very local, whereas Tern tries to do whole-program analysis. This should allow it to pick up much more information.
Re: Tern – Intelligent JavaScript editing
#19Earlier quoted context omitted.
(I'm the author of Tern -- I'm obviously biased.) It compares very favorably. The Orion approach, as I understand it (I only did some quick messing around with scripted, am not an expert) is very local, whereas Tern tries to do whole-program analysis. This should allow it to pick up much more information.
Is it able to track all dependencies in a web page for autocomplete? I mean, keywords defined in dependent files - do they automagically work?
The one exception is requirejs-style dependencies. Those, if you give Tern some information on where to look, it will resolve and automatically include. I'll do something similar for node.js-style require calls in the future.
Re: Tern – Intelligent JavaScript editing
#20Well, that looks really nice. I am not a IDE type, but I do enjoy nice coding helpers when I write. This, well integrated into say, Vim, would make Javascript programming really comfortable.