top | item 5069542

My Top Sublime Text 2 Plugins

260 points| phatbyte | 13 years ago |henriquebarroso.com | reply

156 comments

order
[+] JonnieCache|13 years ago|reply
If you use a dark color scheme, you should install a theme that has a similarly dark background for the sidebar.

The "Soda Dark" theme goes well with the default color scheme. (The ui theme is separate from the syntax highlighting color scheme, you don't have to use the text colors seen on the github examples)

https://github.com/buymeasoda/soda-theme/

In terms of plugins, apart from the ones mentioned here, Quick File Creator is indispensable: https://github.com/noklesta/SublimeQuickFileCreator

Not a plugin, but if you haven't realised it yet, know that the multiple cursors each come with their own separate clipboard. Learning how to combine this with the move and select by word and the parenthesis-movement commands is what will make the vim users eventually respect you.

Oh and you can hack your language syntax definition files to make more things apart from function definitions turn up in the function browser. This is especially useful for ruby DSLs, sinatra etc.

[+] jscheel|13 years ago|reply
I'm a big fan of the Nil theme (https://github.com/nilium/st2-nil-theme). I really love the modified indicator on the tabs. Just be sure to follow the instructions when installing, because you have to turn on a sublime setting. Also, be sure to restart when switching themes, sometimes not everything works right unless you do. This goes for every theme though.
[+] pearkes|13 years ago|reply
If you write Go, definitely check out GoSublime[1]. It's very powerful and gives you an IDE like environment inside Sublime Text 2.

[1] https://github.com/DisposaBoy/GoSublime

[+] swdunlop|13 years ago|reply
Seconded; GoSublime gives you a nice REPL for Go's build and test commands, package completion and linting. It is the second Sublime Package I install, after Package Control and before my own Antiki.
[+] lunixbochs|13 years ago|reply
sublimelint (not Linter) also has a decent wrapper around Go's checking.
[+] chesh|13 years ago|reply
Why I love ST2: multi-platform, fuzzy search, plugins, multiple cursors, JSON config files.

My setup:

- Package Control plugin: the very first thing you should setup after installing ST2 (it should really be a part of ST2)

- Next step sync config files over Dropbox to get exactly the same editing environment from Win, Mac, and Linux

  - move the /User folder under "Sublime Text 2/Packages" over to Dropbox/ST2/User

  - in Win goto CMD and from the %APPDATA%\Sublime Text 2\Packages folder enter: mklink /D "User" "path to\My Dropbox\ST2\User"

  - in Mac OSX/Linux goto the Packages folder (you can find the location under >Preferences>Browse Preferences) and enter: ln -s pathto/Dropbox/Sublime\ Text\ 2/User ./User

  - the fantastic thing with this setup is that in any new machines, Package Control will automatically take care of installing any missing plugins
- Keybindings: tons of customizations to suit what I am used to and work across all OS's

- Theme: Soda Dark

- Colors: Made of Code

- My favorite plugins: Alignment, Bracket Highlighter, Emmett, FileDiffs, SublimeCodeIntel, SublimeLinter, Tag

ST2 is the best investment I have made in software apart from open source.

[+] unwiredben|13 years ago|reply
Thanks for the tip on linking the config folder to Dropbox. That's super effective!
[+] benatkin|13 years ago|reply
If you bring Sublime into a unix environment, please make it add line endings. This is what vim and emacs do by default. https://github.com/editorconfig/editorconfig/wiki/Newline-at...
[+] Silhouette|13 years ago|reply
If you bring Sublime into a unix environment, please make it add line endings.

Could you clarify this? I work with text files on both Windows and Linux all the time, and

View -> Line Endings -> {Platform}

seems to convert between EOL conventions on the different platforms as I would expect.

[+] notJim|13 years ago|reply
This is interesting. I guess it's so that if you cat a file, it doesn't clobber your cursor? I've always noticed that git will say "No new line at end of file", but I've never really known if that's a bad or good thing, or why it matters.
[+] groovy2shoes|13 years ago|reply
I still have a habit, even in vim, of putting a newline at the end of the file (such that now I end up with two newlines). Old habits die hard, I guess.
[+] slurry|13 years ago|reply
Not to go all Stallmanesque here, but doesn't it bother you to use a proprietary text editor when there are so many excellent free/open-source ones around?
[+] dkulchenko|13 years ago|reply
Not at all. Speaking for myself here, but while I much prefer open source to proprietary software, I find Sublime Text 2 blows any other editor I've used out of the water and I'm not going to not use it just because it's proprietary (same reason I use OS X, Photoshop (versus GIMP), etc).
[+] notJim|13 years ago|reply
This question really only makes sense to me from a Stallmanesque standpoint though (unless you don't have much money for some reason, in which case the financial considerations come into play.)

Surely unless you have some ideological reason to pick a FOSS editor, you'll simply use the best one available.

[+] laureny|13 years ago|reply
> Not to go all Stallmanesque here, but doesn't it bother you to use a proprietary text editor when there are so many excellent free/open-source ones around?

Use the best tool for the job. Screw extreme philosophies.

[+] frewsxcv|13 years ago|reply
I don't want to start a flame war; I don't consider myself a die hard vim user: What are reasons why I should switch to Sublime Text 2?
[+] notJim|13 years ago|reply
I switched to vim a year ago, and I fucking love it. The one thing I miss from ST2 is column editing/multiple cursors. Column editing fulfills the same kind of need as basic usage of vim macros, I think (i.e., applying some kind of sequence of edits to multiple rows), but it's visual and you get instant feedback (across all rows), which makes it easier and something you can sort of feel out iteratively.

For example, supposed I have a row like (making up these names as I go, and suppose the list is longer):

  Controller_Section
  House_Model
  Person_To_Category_Selector
and I want to insert after the first underscore the word class, so I'd get Controller_Class_Section and so on (this is a contrived example, but one has to do these kinds of things sometimes.)

In vim, I think I'd record a macro, but I'd probably forget some parts (like moving to the next line at the end) and have to undo and whatnot (could use a regex too, but that's a bit harder--I'm practicing recently to be able to do it more effortlessly.)

In ST2, what you do first is create a cursor at the beginning of each row (option + down arrow on OS X.) Then you move ahead one word (Opt + Right arrow on OS X.) Now the cursor is right before the underscore, even though the underscore is in a different position on each row. You can see that it's in the right place on each row, so it's hard to make a mistake, and if you need to do something more complicated, that remains true. Then, you just type _Class, and it types live on each row, once again making it so you get instant feedback, and it's hard to make a mistake.

That to me is the biggest actual advantage of ST2 over VIM, but there are other reason to not switch, like vim's steeper learning curve (when most of us are already busy, and learning other stuff at the same time), and the fact that some people prefer the mouse, which behaves strangely in vim.

[+] roryokane|13 years ago|reply
I use Sublime Text 2 for its GUI powers: proportional-width fonts (I use Verdana), the code minimap, and the pretty file-browser sidebar with easy-to-click disclosure triangles.

I also like that it’s easier to remember most Sublime Text 2 commands – the Command Palette (⇧⌘P) lets you fuzzy search all commands. So you can search for “syntru” and find the option “Set Syntax: Ruby” instead of having to remember Vim’s “:setf ruby”.

Finally, I use Expand Selection to Word (⌘D) to quickly select multiple instances of a variable whose name I want to change – it’s slightly more convenient than it would be in Vim.

On the other hand, I miss Vim’s editing model. It’s a lot more cumbersome to edit line-wise or move the cursor with Sublime Text’s keyboard shortcuts. And Sublime Text’s “Vintage” Vim emulation mode is a poor substitute. As another commenter said, Vintage is in the uncanny valley. Every now and then you run into a Vim command that just doesn’t work and it breaks your flow. For example, Escape is overloaded as both “go from Insert mode to Normal mode” and “collapse multiple carets into one”, and I never remember which it will do when I have a multiple selection in Insert mode.

[+] grayrest|13 years ago|reply
I've been in the process of switching from Vim to ST2 for a couple months (custom plugins in both, not in a hurry) and the main reason for doing it is because Python and the extension API are MUCH better than the Vim equivalents. If you don't do custom plugins, it really doesn't matter.

Part of the reason for the delay is the lack of equivalent Vim workflows in Vintage. This has been improving a lot thanks to the people working on Vintage and at this point the only holes in my set are c-i/c-o and surround.vim shortcuts. I had to re-train myself to go from Esc to ctrl-[ since Esc conflicts heavily in ST2 but I've been meaning to do that for years in Vim anyway so I consider that a benefit.

[+] nshankar|13 years ago|reply
No reasons really. I have found Vim better at tweaking. None can match that.
[+] tednaleid|13 years ago|reply
Sublime Text 2 plugin writing is surprisingly easy via python. I recently wrote a plugin (SublimeJump https://github.com/tednaleid/SublimeJump) to let you jump to any visible character with a couple of keystrokes. It's similar to AceJump (emacs) or EasyMotion (vim) if you're familiar with those.
[+] mode80|13 years ago|reply
I've been waiting for this! Thanks tednaleid.
[+] swah|13 years ago|reply
I think we might get ST3 soon - there haven't been updates for half an year now.
[+] JonnieCache|13 years ago|reply
He earned a 6 month holiday considering the workrate he put in on those early builds, and the amount of cash he must have made in the intervening time.

It's not like the thing is riddled with outstanding issues.

[+] stinos|13 years ago|reply
I really like the general way of working with SublimeText, but there's one major reason I simply cannot use it for the job: it is terribly slow with large files. One of the things we have to do often is open a >10mb logfile on a cifs share and quickly search through it. It takes ST2 over 10seconds to open the file. The same for each refresh of the file. Even wordpad on Windows loads the file faster, so there seems to be something quite off at the core side of things.
[+] ditoa|13 years ago|reply
I have the same issues regarding load speed on large files. I am a long time UltraEdit user and it is the fastest editor on Windows for working with large files that I have found. Unfortunately UltraEdit has a pretty awful UX compared to modern software. It is still very much a Windows 9x app which kind of sucks. Also it has some annoying as hell Unicode issues which is why I ended up switching to Sublime Text for 99% of my work and just keep UltraEdit around for those one a month moments.
[+] mobweb|13 years ago|reply
This also bothers me. It gets even worse when using a linter plugin. Sometimes when I open a complex file (for example a huge minified JS library), the whole editor will just crash because of the linter plugin. :/
[+] javajosh|13 years ago|reply
It's spelled "Emmet" (docs.emmet.io) and it's more widely known as "Zen Coding". (I asked the author about the name change and forgot why now - some sort of trademark dispute).
[+] nobleach|13 years ago|reply
Yeah, it seems like Emmet removed one of my favorite features with Zencoding. I could hop into a string of HTML attributes and hit "." or "#" and it would create a new attribute of class="|" or id="|" respectively, and place the cursor in between the quotes.
[+] dubcanada|13 years ago|reply
I dont know if I would call it zencoding. Zencoding is a different package entirely.

Emmet is kind of version 2 of zencoding. But for as far as you should concern yourself they are two different plugins.

[+] phatbyte|13 years ago|reply
Fixed the typo, thanks for hint ;)
[+] visarga|13 years ago|reply
Does it have decent SFTP out of the box or as a free plugin? I'd like one of those persistent SFTP browsers, not the default one which does not follow the principle of least astonishment - it uses a custom interface where I have to select the SFTP server every time I want to open another file and there is no multiple selection. It looks like an original UI design invented by a programmer with no UI design experience, reinventing the wheel.
[+] mambodog|13 years ago|reply
I found SublimeCodeIntel to be unreliable, so I use SublimeCTags[1]. I've also bound mouse3 to navigate to a function definition in my User .sublime-mousemap file:

    {
    	"button": "button3",
    	"count": 1,
    	"press_command": "drag_select",
    	"command": "navigate_to_definition"
    }
However, it doesn't work as well for OO code.

[1] https://github.com/SublimeText/CTags

[+] dreeves|13 years ago|reply
The one thing holding me back from Sublime Text is fonts. I really want the Fixed 6x13 font (like xterms use) which requires anti-aliasing turned off.

Does anyone know if that's possible in Sublime Text?

Link to the xterm font: http://yootles.com/outbox/FixedMedium6x13.dfont

PS: It also needs the line spacing set to .8 which I've found a way to do in TextMate and Terminal.app.

[+] maebert|13 years ago|reply
#1 should be SublimeCodeIntel, not SublimeLinter - otherwise thanks for this list, I didn't use Emment before but will certainly give it a spin.
[+] Osiris|13 years ago|reply
I've never gotten that plugin to work well with my PHP code. Code complete is awful. I've switched over to PhpStorm for PHP code because it has static analysis and refactoring.
[+] phatbyte|13 years ago|reply
You are totally right, fixed, thanks :)
[+] SeanDav|13 years ago|reply
I tried using ST2, but it lacks one basic feature that is essential to me. It will automatically update a loaded file with any changes made externally. This is fine, except when you don't want it to do this and then discover there is no way to toggle this behaviour.

It should just be a simple configuration option but until it is added then this is a deal breaker.

[+] mobweb|13 years ago|reply
I just tested this because ST has notified me in the past when an item was changed, see: http://i.minus.com/jVzFslpF9xhuo.png

BUT it seems that this doesn't always work. I just tested with a newly created file and for some reason there was no warning, it just reloaded the file.