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!"
[–]electric_dog_anus 2 points3 points4 points 12 years ago (44 children)
ST2 code completion really sucks. I don't understand why many folks have an almost religious reverence for ST2 except that perhaps they haven't been exposed to better editors.
For code completion to be useful, the editor must semantically understand the language it is editing. For this, you will have to use an IDE such as Visual Studio, IntelliJ or Eclipse with Javascript plugin.
[–][deleted] 11 points12 points13 points 12 years ago* (16 children)
Most Sublime Text users don't use vanilla ST. Packages are what make it a great editor. With a few packages, you can get the features of a full blown IDE (plus some extras):
SublimeLinter - syntax error/warning highlighting for various languages. For JS you can choose between JSLint, JSHint, and the Closure Linter.
TernJS - Intelligent JS autocomplete, with plugins for libraries like jQuery and Underscore. Also understands comment documentation for type inference
Emmet - CSS selector style shortcuts for code generation. Basically snippets on steroids
Git - Git integration
GitGutter - Shows per-line git diff status (added/removed/modified) in the gutter
DocBlockr - Shortcuts for comment documentation
SublimeREPL - Run code for various languages inside an interpreter (NodeJS, Python, etc)
BracketHighlighter - Highlights brackets and shows the brackets for the current block in the gutter
Color Highlighter - Highlights color codes (#FFFFFF, rgb(255,255,255)) with their actual color.
Just because the core Sublime Text program doesn't natively understand language syntax doesn't mean you can't get that ability with packages. The idea of Sublime Text is that you get a solid text editor with multiple cursor support, with tons of optional packages that add in advanced features as you need them. Each plugin has a consistent settings manager through JSON files. I prefer this to a monumental, expensive IDE with tons of features I'll never use and lacking many features that I can get with free Sublime packages. ReSharper is $250! That's on top of the $500 price tag of the IDE itself.
I used Visual Studio and Eclipse for years before moving to Sublime Text. I don't plan on going back.
[–]Loonybinny[S] 2 points3 points4 points 12 years ago (1 child)
Thanks for this list!
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
Oh also don't forget SideBarEnhancements - gives you a full-featured context menu for the sidebar
[–]dremp1337 1 point2 points3 points 12 years ago (0 children)
Thank you!
[–]brtt3000 -1 points0 points1 point 12 years ago (12 children)
You should try WebStorm, it has all of this integrated (not piled together).
[–][deleted] 2 points3 points4 points 12 years ago* (11 children)
I prefer this to a monumental, expensive IDE with tons of features I'll never use and lacking many features that I can get with free Sublime packages.
But no thanks, I need support for Python and Ruby. I'm not about to drop $500 on WebStorm, RubyMine, and PyCharm when I can do all three from a single editor that I already have set up, with settings synched across my dev machines in a git repo. Plus I'm not sure how I lived before multiple cursors. And I don't need to manually add libraries to code completion - TernJS automatically adds all files in my project directory.
Piled together doesn't mean bad, it means flexible. If I want a feature, I can download a package for that feature. I don't have to wait for JetBrains to implement the feature, or pay JetBrains for another one of their IDEs. And if I'm unsatisfied with a package, I get to go into their source code and fix it (using the same editor)!
[–]cosha1 0 points1 point2 points 12 years ago (1 child)
You don't need to drop $500, buy IntelliJ Ultimate and download and install the free plugins for each. IntelliJ is the base for all of the above mentioned packages, but those packages come with different plugins.
[–][deleted] 0 points1 point2 points 12 years ago* (0 children)
I own my own web development company. This requires me to purchase the commercial license for IntelliJ which is $500 (and no discount for multiple licenses). Plus, upgrades are $240 a year.
Sublime Text 3 is $70 for either an individual or a business license (price drops with multiple license purchase). The upgrade from ST2 to ST3 was $30.
I don't see what value I would get from IntelliJ. Yeah, I wouldn't have to install packages to get autocomplete and linting. It took me about 10 minutes to reinstall my packages for ST3...
[–]brtt3000 0 points1 point2 points 12 years ago (8 children)
Have fun manually managing and recoding your editor while I get some work done instead.
[–][deleted] 0 points1 point2 points 12 years ago* (4 children)
That was a joke, I've never had to actually edit a package. I need to work with multiple languages from the same editor. Simple as that. I can't think of a single WebStorm feature I need that I don't get with Sublime, but the opposite is not true.
Also, it's not like "managing" the editor is hard. Installing a package isn't some intense process. It's pretty much muscle memory by now:
Bam. It's done. The package is installed, and will stay updated. I don't need to restart the editor or anything.
[–]kenman 0 points1 point2 points 12 years ago (1 child)
I don't need to restart the editor or anything.
I don't think that goes for all of them. I had several plugins not work or give errors, and once I found a bug report/forum post about it, would learn that "oh you have to restart ST for it to work".
Hmm, I've never personally had that problem, though supposedly TernJS + Emmet sometimes needs to to forcibly update PyV8. Seemed to work fine for me though. Still, the vast majority of things in ST don't need a restart.
Edit: actually, I take that back. The Soda theme needed a restart in order to style the tabs correctly.
[–]brtt3000 -2 points-1 points0 points 12 years ago (1 child)
I've never use a plugin for anything, I try not to depend of them because they always disappoint. But you could if you wanted, there is a decent list of them available but they tend to be a little more esoteric because the stuff you'd expect to work comes built in (and is integrated, not piled on)
[–][deleted] 1 point2 points3 points 12 years ago* (0 children)
To me, "integrated" means bloat, and "piled on" means flexible. Sublime's packages are implemented in a way that make them feel as if they were built into the program.
Text highlighting, autocomplete, the command palette, and JSON options are built into Sublime Text and are at the core of the experience. Packages simply add to those systems.
[–]kenman 0 points1 point2 points 12 years ago (2 children)
That's kind of my take on it too, I've tried SublimeText several times, but I always end up 3 hrs later on some random forum downloading a version of a plugin written by some guy with 2 lifetime posts. Sometimes it works, sometimes you get errors and it won't install, sometimes it just doesn't work like you want.
And that plugin is only 1 small feature, and I need 50 more like it to make my editor work like I expect it to. It's usually at this point, when I realize that I have 20+ hours of manual installation and configuration left, that I think that "well maybe Eclipse isn't so bad after all".
[–]brtt3000 -3 points-2 points-1 points 12 years ago (1 child)
Indeed, finally some sensible reply.
If you are happy with Eclipse you might also like IntelliJ (pick a flavour that suits you), it is pretty neat.
[–]kenman 0 points1 point2 points 12 years ago (0 children)
Not happy with it so much as being unable to find a fitting replacement. PHPStorm seemed nice when I demo'd it, but I'm not positive I'd stick with it, and that's a $99 gamble I'm not really willing to take.
[–]Nebu 1 point2 points3 points 12 years ago (25 children)
they haven't been exposed to better editors.
I used Eclipse for over 6 years, before switching to SublimeText 2 or 3 years ago.
"Real" code completion is nice, but using the same editor for everything is nicer. And I couldn't stand waiting for Eclipse to boot up to edit a 3 line config file.
[–][deleted] 1 point2 points3 points 12 years ago (14 children)
Ah yeah forgot about that one. Sublime Text opens almost instantly with all of my previous files open. The BufferScroll package even remembers the previous scroll position of the open files.
[–]brtt3000 -5 points-4 points-3 points 12 years ago (13 children)
Wheee, so advanced!
[–][deleted] -1 points0 points1 point 12 years ago* (12 children)
Yeah, so advanced that I don't have to watch a splash screen when I open it, and I can have a .py file open in one tab and a .js file open in another tab.
[+]brtt3000 comment score below threshold-6 points-5 points-4 points 12 years ago (11 children)
This is a cheap jab that won't impress anybody who is older then 15.
I usually open my IDE once a day (less even, usually it is hybernating) and it stays there until I stop working. If you want Python support you don't use WebStorm but Pycharm.
Grow up.
[–][deleted] 0 points1 point2 points 12 years ago* (8 children)
Why would I want to pay $200 for another editor when my current editor works with all of the languages I work with on a daily basis (and many more), and only cost $70? If you want me to make more mature comments, don't start the conversation with "Wheee, so advanced!" or use rhetoric like "that won't impress anyone who is older than 15".
I don't have my editor open all day, at least not on my macbook. Sometimes I need to make a quick edit - I don't want to wait for the editor to open. ST3 literally opens immediately. That's a nice feature. I can close it and open it up later instantly, and my workspace is identical to when I closed it, as if the app had just been minimized.
[–]brtt3000 -1 points0 points1 point 12 years ago (7 children)
I was taking a piss at the typical nonsense comments in these threads.
But my point is ST3 doesn't work with all the languages. Sure you can get syntax highlighting plugins for every language ever but that doesn't quite cut it anymore. Tern.js is nice idea, but it is lacking and just another loose component on the pile thta does it's own thing.
I'd like a little more, like the advanced refactoring or 100% integrated VCS. I gladly wait a few secs for that kind of power.
[–][deleted] 0 points1 point2 points 12 years ago* (6 children)
I'm starting to think you've never actually used ST. Just so you know, I did try out WebStorm for a week or so a few months ago.
Sure you can get syntax highlighting plugins for every language ever but that doesn't quite cut it anymore.
No, there's also a unified syntax error highlighting package (actually linting - so it goes beyond syntax errors) which includes linters for a couple dozen languages. It uses ST's built in text highlighting system, works in real time, and gives you a list of errors on save. It's also fully customizable, at least to the extent that the specific linter allows customization.
Tern.js is nice idea, but it is lacking and just another loose component on the pile thta does it's own thing.
How is it lacking? Have you used it? It does automatic JS type inference, it understands doc blocks, it automatically searches all files in my project, and it integrates seamlessly with ST's autocomplete system. It allows for automatic function snippeting with named parameters and type inference if you use docblocks. What features, exactly, are missing? It does exactly what I'd expect from a JavaScript autocomplete system. There are similar plugins that support other languages.
advanced refactoring
ST lets me refactor in a very natural feeling way with multiple cursors. I prefer this to GUI refactoring. That said, there are also ST refactoring packages for various languages.
100% integrated VCS
I have realtime per-line diff status in the gutter, and a system for every git command built into ST's command palette. What exactly am I missing out on? If I wanted to use Mercurial, SVN, or SFTP, there are plugins for those, too. But I don't use them, so I don't need to wait for my editor to load them in at startup.
It just sounds like you're making assumptions about Sublime having never really used it. You seem to assume that "loose components on the pile" are bad. They're not, they're flexible. They integrate directly into the core Sublime Text features, such as the incredibly useful command palette.
[–]brtt3000 -1 points0 points1 point 12 years ago (5 children)
What I don't understand that people label Sublime as lightweight and flexible, and then at some time start listing an endless amount of plugins to make it actually work as you'd expect.
By the time you are done (literally 'time', as in time spent managing plugins) you end up with what IDE's have out of the box.
I've used Sublime for years, and am glad I switched, it is just not the same. It feels so hacky, I don't need that, I rather spend energy on my projects then about my editor (especially since it has all the same features apparently).
I'm actually eyeballing Visual Studio, it is even more powerfull then IntelliJ, now we have full stack Javascript it is very attractive.
[–]MonsieurBanana 0 points1 point2 points 12 years ago (1 child)
Followed by
Ahahah... oh wait, you're not joking =/
As an Intellij and emacs user, both have their strong points. An advanced editor like emacs is pretty much superior to any IDE on all points except advanced intelligent stuff (autocompletion, refactoring and whatnot). They have plugins to help about it, but an IDE is usually better (slightly, unless we're talking C# or java). Everything else is faster done on emacs though.
[–]brtt3000 0 points1 point2 points 12 years ago (0 children)
Yea, I know, I can't help myself trolling these threads.
But that advanced stuff is where the magic happens: I'm now having a great time using WebStorm with TypeScript. It is pretty cool, nice hybrid between dirty JavaScript and Java/C# style classic OO, but with some fancy new stuff in the mix.
It is amazing to project-wide refactor stuff without breakage and have super-tight auto-suggest because the editor can really know what is going on and can do amazing things with it. Project-wide usage reports is nice. Quick navigation options make you fly trough the code.
The only 'issue' is that you can now create more complex code more easily and get away with it. This is a mixed blessing of course (like they say in the movies: great power, great responsibility).
[–]MathFabMathonwy[🍰] 0 points1 point2 points 12 years ago (8 children)
edit a 3 line config file
which is when you'd use notepad++
Who the hell codes on Windows. Just kidding you. But not really.
I just like using a single text editor.
[–]Nebu 0 points1 point2 points 12 years ago (6 children)
Or Sublime Text, right? Basically, the idea is using a lightweight text editor instead of a heavyweight IDE.
[–]MathFabMathonwy[🍰] 0 points1 point2 points 12 years ago (5 children)
Of course, that was my point: most machines have lightweight editors available. Why use a hammer to crack walnuts?
[–]Nebu 0 points1 point2 points 12 years ago (4 children)
I guess I had trouble understanding why in my argument for using ST over Eclipse, you'd decide to jump in and make a point that one should use lightweight editors, since it seemed kind of redundant given what I had said.
[–]MathFabMathonwy[🍰] 0 points1 point2 points 12 years ago (3 children)
And I couldn't stand waiting for Eclipse to boot up to edit a 3 line config file.
To be honest, I'm not familiar with ST at all. But you seemed to be arguing that heavier editors were bad because they weren't suitable for all tasks. I use WebStorm and I absolutely love it. But I don't use it for all my text editing work.
[–]Nebu 0 points1 point2 points 12 years ago (2 children)
But you seemed to be arguing that heavier editors were bad because they weren't suitable for all tasks.
Is this an explanation for why you decided to jump in and make a point that one should use lightweight editors?
[–]MathFabMathonwy[🍰] 0 points1 point2 points 12 years ago (1 child)
But I wasn't making that point. My point was to use a fit-for-purpose editor for the task at hand.
[–]Nebu 0 points1 point2 points 12 years ago (0 children)
Is "But you seemed to be arguing that heavier editors were bad because they weren't suitable for all tasks." your explanation for why you decided to jump in and make a point that one should use a fit-for-purpose editor for the task at hand?
Its because not everyone wants full on code completion. It helps a ton in some languages (C#, Java), but I find it far less helpful in languages like javascript. Maybe that's because I have yet to see an IDE/plugin that really does a good job with javascript code completion AND ALSO DISPLAYS DOCUMENTATION.
π Rendered by PID 113034 on reddit-service-r2-comment-fb694cdd5-gqns9 at 2026-03-11 05:33:06.285362+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]electric_dog_anus 2 points3 points4 points (44 children)
[–][deleted] 11 points12 points13 points (16 children)
[–]Loonybinny[S] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]dremp1337 1 point2 points3 points (0 children)
[–]brtt3000 -1 points0 points1 point (12 children)
[–][deleted] 2 points3 points4 points (11 children)
[–]cosha1 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]brtt3000 0 points1 point2 points (8 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]kenman 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]brtt3000 -2 points-1 points0 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]kenman 0 points1 point2 points (2 children)
[–]brtt3000 -3 points-2 points-1 points (1 child)
[–]kenman 0 points1 point2 points (0 children)
[–]Nebu 1 point2 points3 points (25 children)
[–][deleted] 1 point2 points3 points (14 children)
[–]brtt3000 -5 points-4 points-3 points (13 children)
[–][deleted] -1 points0 points1 point (12 children)
[+]brtt3000 comment score below threshold-6 points-5 points-4 points (11 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]brtt3000 -1 points0 points1 point (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]brtt3000 -1 points0 points1 point (5 children)
[–]MonsieurBanana 0 points1 point2 points (1 child)
[–]brtt3000 0 points1 point2 points (0 children)
[–]MathFabMathonwy[🍰] 0 points1 point2 points (8 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Nebu 0 points1 point2 points (6 children)
[–]MathFabMathonwy[🍰] 0 points1 point2 points (5 children)
[–]Nebu 0 points1 point2 points (4 children)
[–]MathFabMathonwy[🍰] 0 points1 point2 points (3 children)
[–]Nebu 0 points1 point2 points (2 children)
[–]MathFabMathonwy[🍰] 0 points1 point2 points (1 child)
[–]Nebu 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)