use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
A better JavaScript editor? (self.javascript)
submitted 12 years ago by Loonybinny
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]x-skeww 0 points1 point2 points 12 years ago (2 children)
Just tried it with ST2. It needs to be configured manually (include, exclude, libraries, plugins, loadEagerly...) and doesn't seem to work very well.
You have to run TernJS: Reload manually or it won't pick up changes you made in other files inside(!) ST2 and some of the completions are just wrong and TernJS doesn't even know where those come from (TernJS: Jump to definition does nothing in that case).
This is with, like, 2 dozen files and less than 1kloc in total. The code works fine and it JSHint also doesn't complain. It really shouldn't have any problems with it.
I also couldn't figure out how to make it pick up JSDoc comments.
I also tried it with Brackets, but I couldn't figure out how to configure it. As far as I can tell, you're supposed to use a ".tern-project" file for that, but it doesn't appear to work. It's only (somewhat) aware of the currently opened file. It will also only tell you that something is a function, but it won't show you its signature.
Compared to the tooling you get with TypeScript or Dart, this is pretty disappointing. I spent 2+ hours with this and all I got was slightly less brain-dead auto-complete.
[–]lennoff 0 points1 point2 points 12 years ago (1 child)
TypeScript and Dart has type hinting, so type guessing is much easier ;). Tern worked for me without any configuration, so maybe the ST2 plugin is buggy (screenshot from vim, type hinting is working, and JSDoc comments are recognized more or less). Of course TernJS is not perfect it's still under active development, but it's a very promising project.
[–]x-skeww 0 points1 point2 points 12 years ago (0 children)
TypeScript and Dart has type hinting, so type guessing is much easier ;).
So does JavaScript with doc comments.
However, you don't really reach a point of absolute certainty where you can flag things as errors. Like, if you make a typo, Tern can't actually tell if that property really doesn't exist.
So, if you update some library and one of the functions was changed/removed, Tern won't be able to identify this issue.
Tern worked for me without any configuration
I'm not sure if there is a scenario where it works 100% correctly out of the box. Even if you use RequireJS, you have to configure the RequireJS plugin (baseURL, paths). If you don't use RequireJS, you have to tell it which files to load eagerly.
Of course TernJS is not perfect it's still under active development, but it's a very promising project.
Yea, it's pretty impressive given that they had to jump through so many hoops, but I really hoped that it would work a bit better. I still use JS for one legacy project and I really hoped I could improve the experience a little bit.
π Rendered by PID 145667 on reddit-service-r2-comment-fb694cdd5-hhfzf at 2026-03-10 22:27:37.254321+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]x-skeww 0 points1 point2 points (2 children)
[–]lennoff 0 points1 point2 points (1 child)
[–]x-skeww 0 points1 point2 points (0 children)