Difference between revisions of "Sublime Text cheat sheet"
(→''Basics'') |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Here I keep a cache of shortcuts for a quick reference. |
Here I keep a cache of shortcuts for a quick reference. |
||
{| border=1 cellspacing=0 cellpadding=2 |
{| border=1 cellspacing=0 cellpadding=2 style="border:solid 4px gray;" |
||
|- |
|- |
||
! Task |
! Task |
||
Line 14: | Line 14: | ||
|- |
|- |
||
| |
| |
||
Move the current line up |
|||
| Ctrl + Shift + Up |
| Ctrl + Shift + Up |
||
| Cmd + Shift + Up |
| Cmd + Shift + Up |
||
Line 20: | Line 20: | ||
|- |
|- |
||
| |
| |
||
Goto line |
|||
| Ctrl + ` |
| Ctrl + ` |
||
| Cmd + ` |
| Cmd + ` |
||
Line 26: | Line 26: | ||
|- |
|- |
||
| |
| |
||
Goto method |
|||
| Ctrl + R |
| Ctrl + R |
||
| Cmd + R |
| Cmd + R |
||
Line 32: | Line 32: | ||
|- |
|- |
||
| |
| |
||
Goto parenthesis |
|||
| Ctrl + M |
| Ctrl + M |
||
| Cmd + M |
| Cmd + M |
||
Line 38: | Line 38: | ||
|- |
|- |
||
| |
| |
||
Select between parenthesis |
|||
| Ctrl + Shift + M |
| Ctrl + Shift + M |
||
| |
| |
||
Line 44: | Line 44: | ||
|- |
|- |
||
| |
| |
||
Transform to Uppercase |
|||
⚫ | |||
Transform to Lowercase |
|||
| |
|||
Ctrl + KU |
|||
Ctrl + KL |
|||
| |
|||
Cmd + KU |
|||
Cmd + KL |
|||
| |
|||
|- |
|||
| |
|||
⚫ | |||
| Ctrl + ` |
| Ctrl + ` |
||
| Cmd + ` |
| Cmd + ` |
||
| |
| |
||
|- |
|- |
||
|colspan="4"| |
|colspan="4"| |
||
===''Multiple Selection''=== |
===''Multiple Selection''=== |
||
|- |
|- |
||
| |
| |
||
Select the current line |
|||
| Ctrl + L |
| Ctrl + L |
||
| Cmd + L |
| Cmd + L |
||
Line 59: | Line 75: | ||
|- |
|- |
||
| |
| |
||
Split selection in multiple lines |
|||
| Ctrl + Shift + L |
| Ctrl + Shift + L |
||
| Cmd + Shift + L |
| Cmd + Shift + L |
||
Line 65: | Line 81: | ||
|- |
|- |
||
| |
| |
||
Select the current word |
|||
| Ctrl + D |
| Ctrl + D |
||
| Cmd + D |
| Cmd + D |
||
Line 72: | Line 88: | ||
| |
| |
||
Find the next word |
|||
like the selected and add to the multiple cursors. |
like the selected and add to the multiple cursors. |
||
| Ctrl + D |
| Ctrl + D |
||
Line 80: | Line 96: | ||
| |
| |
||
Find and select all words |
|||
like the selected and add multiple cursors. |
like the selected and add multiple cursors. |
||
| Alt + F3 |
| Alt + F3 |
||
Line 87: | Line 103: | ||
|- |
|- |
||
| |
| |
||
Column selection |
|||
| |
| |
||
* Shift + RightBtn - to select a column |
* Shift + RightBtn - to select a column |
||
Line 96: | Line 112: | ||
|- |
|- |
||
| |
| |
||
Multiple selection with Regexp |
|||
| Ctrl + F, <Select Regexp icon (.*)>, <type your regexp>, Alt + Enter |
| Ctrl + F, <Select Regexp icon (.*)>, <type your regexp>, Alt + Enter |
||
| Cmd + F, <Select Regexp icon (.*)>, <type your regexp>, Opt + F |
| Cmd + F, <Select Regexp icon (.*)>, <type your regexp>, Opt + F |
Latest revision as of 14:59, 16 October 2014
Sublime Text editor is the magic any programmer needs. Here I keep a cache of shortcuts for a quick reference.
Task | shortcut in Linux | shortcut in OSX | Comments |
---|---|---|---|
Basics | |||
Move the current line up |
Ctrl + Shift + Up | Cmd + Shift + Up | Also works for Down |
Goto line |
Ctrl + ` | Cmd + ` | |
Goto method |
Ctrl + R | Cmd + R | |
Goto parenthesis |
Ctrl + M | Cmd + M | |
Select between parenthesis |
Ctrl + Shift + M | ||
Transform to Uppercase Transform to Lowercase |
Ctrl + KU Ctrl + KL |
Cmd + KU Cmd + KL |
|
Show console |
Ctrl + ` | Cmd + ` | |
Multiple Selection | |||
Select the current line |
Ctrl + L | Cmd + L | Repeat to select next line(s) |
Split selection in multiple lines |
Ctrl + Shift + L | Cmd + Shift + L | |
Select the current word |
Ctrl + D | Cmd + D | |
Find the next word like the selected and add to the multiple cursors. |
Ctrl + D | Cmd + D | To skip the current word: Ctrl+K, Ctrl+D. To undo the last selection: Ctrl+U |
Find and select all words like the selected and add multiple cursors. |
Alt + F3 | ||
Column selection |
|
||
Multiple selection with Regexp |
Ctrl + F, <Select Regexp icon (.*)>, <type your regexp>, Alt + Enter | Cmd + F, <Select Regexp icon (.*)>, <type your regexp>, Opt + F |