Difference between revisions of "Sublime Text cheat sheet"
 (→Basics)  | 
				|||
| Line 10: | Line 10: | ||
! Comments  | 
  ! Comments  | 
||
|-  | 
  |-  | 
||
|colspan="4"|   | 
|||
|   | 
  |||
===''Basics''===  | 
  ===''Basics''===  | 
||
| || ||  | 
  |||
|-  | 
  |-  | 
||
|   | 
  |   | 
||
| Line 38: | Line 37: | ||
|  | 
  |  | 
||
|-  | 
  |-  | 
||
|colspan="4"|   | 
|||
|  | 
  |||
| ⚫ | |||
| ⚫ | |||
| || ||  | 
  |||
|-  | 
  |-  | 
||
|  | 
  |  | 
||
==== Select the current line====  | 
  ===== Select the current line=====  | 
||
| Ctrl + L  | 
  | Ctrl + L  | 
||
| Cmd + L  | 
  | Cmd + L  | 
||
| Line 50: | Line 47: | ||
|-  | 
  |-  | 
||
|   | 
  |   | 
||
====Split selection in multiple lines====  | 
  =====Split selection in multiple lines=====  | 
||
| Ctrl + Shift + L  | 
  | Ctrl + Shift + L  | 
||
| Cmd + Shift + L  | 
  | Cmd + Shift + L  | 
||
| Line 56: | Line 53: | ||
|-  | 
  |-  | 
||
|   | 
  |   | 
||
====Select the current word====  | 
  =====Select the current word=====  | 
||
| Ctrl + D  | 
  | Ctrl + D  | 
||
|   | 
  |   | 
||
| Line 62: | Line 59: | ||
|-  | 
  |-  | 
||
|  | 
  |  | 
||
====Find the next word====  | 
  =====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 70: | Line 67: | ||
|  | 
  |  | 
||
====Find and select all words====  | 
  =====Find and select all words=====  | 
||
like the selected and add multiple cursors.  | 
  like the selected and add multiple cursors.  | 
||
| Alt + F3  | 
  | Alt + F3  | 
||
| Line 77: | Line 74: | ||
|-  | 
  |-  | 
||
|   | 
  |   | 
||
====Column selection====  | 
  =====Column selection=====  | 
||
|  | 
  |  | 
||
* Shift + RightBtn - to select a column  | 
  * Shift + RightBtn - to select a column  | 
||
| Line 86: | Line 83: | ||
|-  | 
  |-  | 
||
|   | 
  |   | 
||
====Multiple selection with Regexp====  | 
  =====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  | 
||
Revision as of 13:46, 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 | |
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 | ||
Find the next wordlike the selected and add to the multiple cursors.  | 
Ctrl + D | To skip the current word: Ctrl+K, Ctrl+D. To undo the last selection: Ctrl+U | |
Find and select all wordslike 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 | |