
A List of Sublime Text 2 Hotkeys - caffeinewriter
http://wrttn.in/2395c6
======
micampe
If you are on OS X, check out <http://www.grandtotal.biz/CheatSheet/> to see
shortcuts for any application, not just ST2.

~~~
habosa
Awesome tip. I can't believe I've never heard of that before. Just submitted
it to HN, I think a lot of people will like it as much as I do.

------
hayksaakian
Not sure how to read this

<http://www.imgur.com/6PZkdHU.png>

~~~
sanswork
I'm on a mac desktop and they still don't line up.

------
brbcoding
Funny, I literally just created one of these yesterday...

[https://github.com/CodyHenshaw/Misc_Repo/blob/master/sublime...](https://github.com/CodyHenshaw/Misc_Repo/blob/master/sublime-
keyboard-shortcuts.md)

~~~
carsonm
That's an even better one, nice work.

~~~
brbcoding
Thanks... Markdown makes anything look good. :)

------
lttlrck
Awesome vertical middle alignment on IOS... makes it a bit tricky to use.

~~~
hamburglar
Not just IOS. Desktop Chrome here and the lines don't line up. Since when is
"here is a screenful of mundane information, badly presented" Hacker News
material?

------
up_and_up
Here is a better version as Gist.

For mac: <https://gist.github.com/lucasfais/1207002>

and Windows: <https://gist.github.com/hileon/1311735>

~~~
xrt
Is there any way to view the .textile files rendered properly w/in Github?
They are rendering the same as raw for me. Am I missing something?

------
nnq
Tip (not really ontopic): learn Vim, then use whatever editor or IDE you want
with Vim keybindings mode or a Vim-emulating plugin - you'll end up with an
_universal_ set of keybindings you will learn once and use everywhere and you
will be able to be productive in any editor and any IDE (yeah, there are
always limitations, nothing emulates Vim perfectly and this is way I advise
you "not to learn too much of real vim", just the most usefull keys, but
nowadays there is at leas one good vim mode/plugin for any other serious IDE
or editor, including ST2).

~~~
newishuser
While you are correct, you are completely off topic and not really helping.
Plus, it's not like HN needs another reminder of vim's infallibility.

~~~
nnq
it's not about vim's infallibility - I consider vim ugly, weird, too powerful
and ad the same time limited and I'm a ST user. I was just referring to the
fact that by learning its keys and basic modal principles, you can afford _not
to learn_ 70% of the fucked-up keystrokes and menu driven functionality of
other otherwise good editors or IDEs. Just learn the 30% that is really unique
and useful (GUI stuff, advanced refactoring etc.) and "drive it like it's vim"
for other features. This way it becomes like driving cars: 90% of car
functionality is the same for all cars so I can jump into any car and drive it
- maybe not for best safety and performance, but it works for me.

------
mercuryrising
It would be really nice if there was a way to configure a key command in ST2
to run a specific script depending on the language you're writing.

I don't usually write C unless I'm writing stuff for Arduinos. The Arduino IDE
isn't very nice, but they have the magical commands "Control+U" and
"Control+Shift+U" that upload code either through the FTDI board or a
programmer. If I had that in ST2, I would be in heaven (right now I write in
ST2, copy, paste into Arduino IDE, then upload).

~~~
bpatrianakos
Write a plugin for yourself complete with the key bindings you want. ST2
plugins are just Python scripts. Granted you have to know Python but I assume
since you're writing C and mesing with Arduino you either already know it or
can pick it up with no problem.

~~~
CJefferson
While I know they are in python, I have never been able to find any
documentation about how to build plugins, and what they can do. Could you
point me to such a thing?

~~~
bpatrianakos
Yeah, definitely! Here are the two I used - fair warning, one is a Nettuts
article. It's not the best tutorial ever but I had never written any Python
before reading it and I was able to pull out the useful bits and apply them to
my own plugin.

[http://net.tutsplus.com/tutorials/python-tutorials/how-to-
cr...](http://net.tutsplus.com/tutorials/python-tutorials/how-to-create-a-
sublime-text-2-plugin/) \- If nothing else, this will at least teach you how a
Sublime plugin works (like where it lives and how you add it to the editor and
such)

After that, the Sublime API will take it from there -
<http://www.sublimetext.com/docs/2/api_reference.html>

I took bits about how ST2 plugins are structured from the first article, then
looked for 'how to do X n Sublime' in the second and once I got those down it
was just a matter of Googling for "how to do Y in Python".

The basic gist of it is that a plugin for Sublime is just a Python script that
lives in Sublime's packages directory (~/Library/Application Support/Sublime
Text 2/Packages on a Mac). Create a folder named after your plugin, drop the
python script in there, and then use Python + the Sublime API methods to
interact with the browser.

------
swah
If you go to your Preferences file, you can always get the complete list of
shortcuts, and will also realize how easy it is to set new ones.

------
johtso
That's some pretty bad markup, the rows don't even line up. Oh right, it's a
single row with two cells..

------
klapinat0r
Speaking of Mac/Windows, do anyone know the Mac shortcut for _Swap Line
up/down_?

In Windows it's _Ctrl+Shift+Up/Down_ , but I've been unable to find the Mac
equivalent.

EDIT: Sorry, I spoke too hastly. _Ctrl+Super+Up/Down_ in case anyone else
wonders.

------
prophetjohn
Want a comprehensive list? Preferences > Key Bindings > Defaults.

------
castles
For sublime text 3, a QuickPanel plugin to show keybindings/settings:
<https://github.com/sublimator/EditPreferences>

------
nacho2sweet
Sick table markup brah.

------
cjh_
I think I'm missing something, but I'm sure I have used plenty of hotkeys that
are not in this list (ie; insert line before current).

Can someone explain?

------
andys627
Unusable. Stuff needs to line up

------
overload119
I think this is less about Sublime Text 2 Hotkeys, and more about how awesome
wrttn.in is! Going to be using it from now on.

~~~
bpatrianakos
If you like wrttn.in check out Write.app. Same deal except with a Sublime Text
2 plugin and a bunch more ways to store and share notes than just the web
interface. <https://writeapp.me>

------
waltz
how about copy the current line?

~~~
prophetjohn
ctrl+C/cmd+C

That's gets the whole line including carriage return when nothing is
highlighted. You could also cmd+L (expand selection to line) and then cmd+C if
you already had something selected.

