
Setting up Sublime Text 2 - superchink
http://drewbarontini.com/setup/sublime-text/
======
twerquie
One of the things I like most about Sublime is that it just works right out of
the box. Sure almost everyone uses a plugin or two, but to me it's the editor
that doesn't need blog posts about how to configure it, it doesn't require you
to keep a git repository of your thousand-line configuration, it doesn't
require an understanding of esoteric key commands to get started.

To me, Sublime is an editor for people who don't want to spend man-weeks
fucking with their editor and just want to get to work.

~~~
derefr
It's half-way there. It could go a lot further. I'm really surprised there
isn't a single (featureful) editor that follows the OSX/GNOME aesthetic of
"convention over configuration; no preferences/options/modes if possible".
Key-bindings are the same everywhere you go. Every command is available on
every instance of the editor on everyone's machine, everywhere in the world.
You never have to re-learn anything; you can just sit down and use all the
features.

I would personally imagine something a bit _like_ Sublime, but where all the
"plugins" were actually just code contributed to the central codebase, and
delivered by updates. (Specifically, I'm imagining it would work like
Cloudflare's <https://github.com/cdnjs/cdnjs> for plugins.)

Given that the editor would then have "everything" in-the-box, it'd then
probably have to have emacs-like modes, as well, to allow all the plugins'
various key-bindings to live together.

~~~
beefsack
I'd suggest you should download every plugin for ST and see how bloated it
becomes, you'd end up with something as slow and ungainly as Eclipse.

To me, one of the largest benefits of ST is having a very powerful editor
which is fast, simple, and very usable, and wouldn't want to see the core
become much heavier than it already is (although I'm loving the code
navigation functionality coming in ST3).

~~~
nobleach
I have loaded a TON of plugins at one point. It was nowhere near Eclipse's
"oh, you wanted to keep typing? No, sorry I'm going to block while the JVM
does a GC sweep, and I try and figure out what auto-completion to show you".

With everything I had loaded in Sublime, it just took a couple of seconds
longer to start up. Which plugins were you loading specifically?

~~~
winter_blue
> No, sorry I'm going to block while the JVM does a GC sweep, and I try and
> figure out what auto-completion to show you".

I've experienced this quite often, mainly on large code bases.

------
josteink
I know Sublime Text has a lot of momentum, especially on this site, but the
one main ting which keeps me from adopting Sublime text is that I can't run it
from a terminal. Simple as that.

If I'm going to invest time, effort and know-how into something as fundamental
as a text-editor, I want to know that I can run it everywhere I need it.

I'm going to guesstimate that I spend at least 20% of my text-editing via
terminals, via SSH, via remote sessions somehow. And there I can't use Sublime
Text at all.

In those remote sessions I'm probably editing the same things I do locally, so
why should I need to change my entire environment to suit that 20% of the same
workload? It just doesn't make sense.

Other objections to Sublime text would be that it's not open source. With more
and more (new) arm-based platforms popping up left and right, that becomes
increasingly important. I want to know that I can take my tools with me to the
places I go. Not being open-source severely limits those possibilities.

~~~
ary
You can use the built in 'subl' command to launch Sublime Text 2 from the
terminal.

<http://www.sublimetext.com/docs/2/osx_command_line.html>

Editing remote files is as simple as an SFTP mount.

~~~
josteink
That is for OSX, which I refuse to use on an principle of ethical software
conduct. Apple is hostile to open software and computers as open platforms.
They want to take away the open nature of computers which allowed them to
exist in the first place and they use BS patent-lawsuits to hinder competitors
willing to provide just that.

They are _evil_ and I refuse to support them with a penny or any significant
effort or attention.

Apart from that, talking about SFTP mounts is completely missing the point.

Sometime I'm in a terminal, on a router, NAS, cloud-server or whatever, and
need to edit some files in the current folder.

What I do then is "$ emacs file", not change context, go to another local
terminal and fuse-mount some completely remote FS with whatever keys and
credentials I need to provide, in /mnt/remote/, and then fire up a local
editor for /mnt/remote/the/actual/directory/i/was/working/in/file.

That's extremely inefficient.

When I say I need something to work in a terminal to be a proper solution, I
mean any terminal.

~~~
Shorel
In every sublime text thread there's someone praising Vim.

If you want a terminal text-only editor, and already have one like emacs, then
you don't need or want sublime text.

Sublime Text does not try to work in the terminal and I love that it doesn't.

Very different use cases. I suspect you are simply a very subtle forum troll.

------
xSwag
There are a lot more keyboard shortcuts for this editor, makes you much faster
if you don't have to touch a mouse.

Here's a "cheat sheet": <http://i.imgur.com/yGrUAL8.png>

~~~
anonfunction
Printing as I type, thanks so much for sharing this. Saw a few that I didn't
know about and others that I google far too regularly.

------
kaolinite
Nice guide. I'm surprised Aqua didn't make it to the themes section - a theme
to make Sublime look more native on OS X: <http://github.com/cafarm/aqua-
theme>

CommandOnSave is a nice plugin that I've been using recently, very useful for
automatically running Makefiles on save, etc.

Also, if you want to browse Hacker News via Sublime Text, here's a small plug
for my plugin: "Hacker News" (<https://github.com/kaolinite/HackerNews-
SublimeTextPlugin>)

~~~
drewbarontini
I've updated the article to add the Aqua theme link. I'm surprised I missed
that one.

------
Zren
Here are a few plugins I rely upon that make Sublime much easier to use (that
weren't on that list).

* GitGutter: Adds symbols beside the line # on modified lines. A feature widespread in other editors with Git integration. I haven't found a plugin to mark modified files in the sidebar (which is also another common feature). - <https://github.com/jisaacks/GitGutter>

* Missing Palette Commands: Adds a few commands like setting the indentation for the specific file only. You can see a full list in the link. - [https://github.com/fjl/Sublime-Missing-Palette-Commands/blob...](https://github.com/fjl/Sublime-Missing-Palette-Commands/blob/master/Missing.sublime-commands)

* Open Folder: Open up the selected folder in explorer/etc.

* Terminal: Open the selected folder in the terminal. - <http://wbond.net/sublime_packages/terminal>

~~~
jameswyse
GitGutter is awesome, thanks for sharing :)

------
fredoliveira
This video taught me a ton of stuff I had no idea about:
<http://www.youtube.com/watch?v=TZ-bgcJ6fQo>

Quite long, but definitely worth it. Not affiliated with whoever did it.

~~~
evo_9
Great video, thanks for sharing. The automator osX hack to get right-click
open project in Sublime is worth it alone!

------
anonfunction
Been using Sublime Text for awhile now and I'm always finding something new.
One thing I'd like to point out is that it actually supports multiple
selections by default and you don't need to enable VIntage mode to take
advantage of the huge timesaver:
[http://www.sublimetext.com/docs/2/multiple_selection_with_th...](http://www.sublimetext.com/docs/2/multiple_selection_with_the_keyboard.html)

------
baghali
GoSublime [1] is also an awesome plugin if you write Go code.

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

------
rickhanlonii
Great guide, it covers most of the must have plugins.

While everyone is talking about themes, if there are any Intellij 12 users out
there that fancy the Darcula theme, I've created a theme for both Intellij 12
and Sublime Text 2 which is a blend of Solarized and Darcula:
<https://github.com/rickhanlonii/Solarized-Darcula>

------
DigitalSea
Amazinginly helpful article (especially for first timers). Another addition
I'd like to add to the list if you use LESS is the LESS Build plugin:
<https://github.com/berfarah/LESS-build-sublime> — allows you to compile LESS
stylesheets by hitting control + B on Windows to compile.

------
shriphani
I really enjoy working with ST2 and I would be super happy if there was a
faster workflow for file / folder creation. I would really like to see
something that helps me Cmd-Shift-P and type "New Folder" or "New File", type
the name and be able to do tab-completion in it (and thus also map it to some
keystrokes).

~~~
peterstensmyr
Have you tried the AdvancedNewFile plugin? It uses ctrl+alt+n by default, lets
you create folders when you specify your new file and also has tab completion.

------
_smaugh
this is a tutorial worth watching for beginners and advanced users,
[https://tutsplus.com/course/improve-workflow-in-sublime-
text...](https://tutsplus.com/course/improve-workflow-in-sublime-text-2/) an
hour or two of investment, could save countless hours of work.

------
SippinLean
Anyone have a plugin that prevents ST2 from showing the contents of binary
files? For example, clicking on a JPG in the sidebar shows the contents,
requiring you to somehow close the window before you can continue.

~~~
joshschreuder
Not sure on a plugin, but perhaps adding image formats to your
file_exclude_patterns could be a workaround?

~~~
SippinLean
Thanks for the suggestion, but I still need to be able to see them in the
sidebar :(

------
thibaultCha
And I suggest you to install Sublime hacker News Reader too :) (from Package
Control)

<https://github.com/Dimillian/Sublime-Hacker-News-Reader>

------
alexpopescu
It was only yesterday that I thought about using animated GIFs for demoing
code typing. That's what I liked most about this post!

~~~
landr0id
I disliked how I had to watch the gifs a couple of times though in order to
read exactly what he typed for the first snippet to see how it related to what
it filled. Text underneath would help, but it does indeed look nice.

~~~
drewbarontini
Good point. I just updated the post to fix that.

------
floor
Wow, it's as complicated as setting up a bare bones linux install.

------
Aeiper
How do you put downloaded themes into Sublime Text 2?

~~~
purephase
Is there a particular theme you're interested in?

Two options:

1\. Download package control [1] (first config listed in OP) and then search
for themes.

2\. Visit the individual theme repos (mostly on GH) and follow instructions.

[1] <http://wbond.net/sublime_packages/package_control>

------
neopba
DetectSyntax is called now ApplySyntax

