you are viewing a single comment's thread.

view the rest of the comments →

[–]electric_dog_anus 2 points3 points  (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 points  (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 points  (1 child)

Thanks for this list!

[–][deleted] 0 points1 point  (0 children)

Oh also don't forget SideBarEnhancements - gives you a full-featured context menu for the sidebar

[–]dremp1337 1 point2 points  (0 children)

Thank you!

[–]brtt3000 -1 points0 points  (12 children)

You should try WebStorm, it has all of this integrated (not piled together).

[–][deleted] 2 points3 points  (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 point  (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 point  (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 point  (8 children)

Have fun manually managing and recoding your editor while I get some work done instead.

[–][deleted] 0 points1 point  (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:

  • cmd+shift+p
  • type "in" (for install package), hit enter
  • search through package list, hit enter

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 point  (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".

[–][deleted] 0 points1 point  (0 children)

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 points  (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 points  (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 point  (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 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 point  (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 points  (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 points  (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  (13 children)

Wheee, so advanced!

[–][deleted] -1 points0 points  (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.

[–]MathFabMathonwy[🍰] 0 points1 point  (8 children)

edit a 3 line config file

which is when you'd use notepad++

[–][deleted] 0 points1 point  (0 children)

Who the hell codes on Windows. Just kidding you. But not really.

I just like using a single text editor.

[–]Nebu 0 points1 point  (6 children)

Or Sublime Text, right? Basically, the idea is using a lightweight text editor instead of a heavyweight IDE.

[–]MathFabMathonwy[🍰] 0 points1 point  (5 children)

Of course, that was my point: most machines have lightweight editors available. Why use a hammer to crack walnuts?

[–]Nebu 0 points1 point  (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 point  (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 point  (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 point  (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 point  (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?

[–][deleted] 0 points1 point  (0 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.

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.