Skip to content

Instantly share code, notes, and snippets.

@jesseleite
Last active August 28, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseleite/2ddf6961ffcce2c50e13 to your computer and use it in GitHub Desktop.
Save jesseleite/2ddf6961ffcce2c50e13 to your computer and use it in GitHub Desktop.
Editor Wars and Sublime Text

I see 3 main types of code editors...

On one end of the spectrum we have powerful neckbeard editors like Vim and Emacs. These editors are language agnostic, offer a ton of raw text editing power, and can be heavily extended. These are CLI editors with no real GUI. They have the steepest learning curve.

At the other end of the spectrum we have powerful IDEs like PHPStorm, Visual Studio, etc. These editors are developed from the ground up around a specific set of languages. They encourage mouse use, and offer a ton of debugging and refactoring tools, etc. The main downside is speed, mostly due to their project indexing and code intelligence features.

The third type of editor bridges the gap between the above types. I think the two most popular editors right now are Sublime Text and Atom. My favourite of the two is Sublime Text. Sublime is blazing fast, and offers both neckbeard-like editing power and IDE-like code intelligence features through community packages. Here's my list of must-haves:

Package Control: Install this before you install anything else. This one allows you to install/remove/enable/disable packages very quickly using the command palette within Sublime.

Vintageous: My favourite package! Best vim emulation I've ever used. PHPStorm has IdeaVim, but it's not as well supported or as feature rich as Vintageous. IdeaVim also feels a lot slower (but this is likely due to PHPStorm, not IdeaVim). Either way, slow is very un-vim-like. TL;DR... Grow a neckbeard and stop using your mouse! Heck, get your hands away from those distant arrow keys! Once you HJKL, you won't go back ;)

Sublime Code Intel: This one adds some code intelligence for certain languages. The features I like most are project indexing and the "Jump to Symbol Definition" option. This one just makes Sublime feel a bit more like an IDE.

PHP Companion: This one adds yet a few more IDE-like features, like namespace importing, etc.

DocBlockr: Rapidly generate docblocks. I admit, this one definitely doesn't seem as slick as PHPStorm's docblock generating/refactoring, but nice to have nonetheless.

Emmet: Write blazing fast HTML and CSS using shorthand. This is available for a ton of editors, and a must have if you are working with HTML/CSS.

Sublime Git and Git Gutter: These two packages bring common everyday git commands into Sublime's UI. SublimeGit is very keyboard friendly too, so I don't need to be reaching for my mouse. I still use CLI git for more advanced git workflow, but SublimeGit keeps me in Sublime for the common stuff.

Todo Review: Allows me to create todos, bug notes, etc. within the comments of my code. Todo Review can then compile and display in a nicely organized text file.

Package Syncing: I use this with dropbox to keep my Sublime setup synchronized between computers.

Some other useful packages: All Autocomplete, Browser Refresh, Sidebar Enhancements, Color Picker, Chain Of Command, Fix Mac Path, Toggle Minimap On Scroll

Gravity theme: My Sublime SetupEnlarge Image

Conclusion: To be honest, I'm jealous of some of the code intelligence and refactoring features in PHPStorm. However, everytime I try it, I'm taken back by it's speed. I'll probably go back to it again, but Sublime feels like home to me.

PS. Feel free to comment on this gist with your must-have Sublime package recommendations :)

@davestewart
Copy link

A great review Mr Milker! I'll likely get Sublime and your recommended extensions running on my new MacBook when I get it in the next few weeks.

@CuthbertLi
Copy link

Why not finish git commands in terminal? Then your sublime can be even more light-weighted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment