30+ Sublime Text 3 shortcuts to code a lot faster.
Tags: productivity, tutorial, shortcuts
Published: 2020-01-09 07:44:47

I have seen several posts about keyboard shortcuts for VS Code, and they were all really informative and well-written.

But unfortunately I haven't seen any about Sublime Text yet, even though those who use it, like myself, would probably find it very useful.

So since there isn't one yet, I decided to write one myself.
I've collected 30+ shortcuts for Sublime Text 3 I find the most useful.

<a name="top"></a>
*Before every shortcut you will find an arrow which leads back here*
##**Post content**
* [Jump to file](#ctrl-p)
* [Jump to line](#ctrl-g)
* [Open command prompt](#ctrl-shift-p)
* [Reopen last closed file](#ctrl-shift-t)
* [Toggle Distraction-free mode](#shift-f11)
* [Search methods](#ctrl-r)
* [Toggle clipboard](#ctrl-k-v)
* [Toggle sidebar](#ctrl-k-b)
* [Select line](#ctrl-l)
* [Select duplicates](#ctrl-d)
* [Duplicate line](#ctrl-shift-d)
* [Select content of an element](#ctrl-shift-a)
* [Move active line/selection up/down](#ctrl-shift-up-down)
* [Add cursor to next/previous line](#ctrl-alt-up-down)
* [Insert new line before/after](#ctrl-shift-enter)
* [Replace two selection](#ctrl-t)
* [Jump by words](#ctrl-left-right)
* [Select by words](#ctrl-shift-left-right)
* [Delete from cursor to the start of active line](#ctrl-shift-k)
* [Delete from cursor to the end of active line](#ctrl-k-k)
* [Sort](#f9)
* [Select all occurrences of selected word(s)](#alt-f3)
* [Delete tab](#shift-tab)
* [Jump to matching brackets](#ctrl-m)
* [Lower/uppercase selection](#ctrl-k-u-l)
* [Close HTML tags](#alt-dot)
* [Skip selection](#ctrl-k-d)
* [Wrap selection in HTML tag](#alt-shift-w)
* [Find/search](#ctrl-f)
* [Find and replace](#ctrl-h)
* [Find/search in all opened file](#ctrl-shift-f)


#<u>**General**</u>


##**[⇧](#top)1.Jump to file** <a name="ctrl-p"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+P`      | `⌘ + P`/`⌘ + T`

You can directly jump to any of the opened files quickly. Also, as you are typing the name of the file, ST3 opens the most relevant one by itself.
It also keeps a track of which files you have opened the most often, so it will automatically put them on the top, thus opening it already.

![Jump to file](https://im6.ezgif.com/tmp/ezgif-6-08acba50760a.gif)

##**[⇧](#top)2.Jump to line** <a name="ctrl-g"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+G`      | `⌃+G`

You can directly jump to any line you want easily.

![Jump to line](https://im6.ezgif.com/tmp/ezgif-6-9e862937910b.gif)

##**[⇧](#top)3.Open command prompt** <a name="ctrl-shift-p"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+P`      | `⌘ + ⇧ + P`

With this you can open the command prompt where you can execute various commands, such as install package controll or package for example.

![Command prompt](https://im6.ezgif.com/tmp/ezgif-6-bf68c877a5e8.gif)

##**[⇧](#top)4.Reopen last closed file** <a name="ctrl-shift-t"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+T`      | `⌘ + ⇧ + t`

Accidentally closed a file? Yeah we all do that sometimes. So instead of opening the current folder(`CTRL+O`) and start looking for that file, just use this shortcut to open the file you have last closed.

![reopen](https://im6.ezgif.com/tmp/ezgif-6-46e42c27056e.gif)

##**[⇧](#top)5.Toggle Distraction-free mode** <a name="shift-f11"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `Shift+F11`      | `⌃ + ⇧ + ⌘ + F`

![distraction free](https://im6.ezgif.com/tmp/ezgif-6-9cb004a056a4.gif)

##**[⇧](#top)6.Search methods** <a name="ctrl-r"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+R`      | `⌘ + R`

This will toggle a list of all methods in your active file, and you can search them.

![search method](https://im6.ezgif.com/tmp/ezgif-6-146d24687a20.gif)

##**[⇧](#top)7.Toggle clipboard** <a name="ctrl-k-v"></a>


| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+K+V`      | `???`

With this you can toggle a popup with the last 15 of your copies.

![Toggle clipboard](https://im6.ezgif.com/tmp/ezgif-6-08e653086164.gif)

##**[⇧](#top)8.Toggle sidebar** <a name="ctrl-k-b"></a>


| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+K+B`      | `⌘ + K, ⌘ + B`

Many might not know, but Sublime Text has a sidebar too. Might not be as advanced by default as that of VSCode, but it can still be useful.

![Toggle sidebar](https://im6.ezgif.com/tmp/ezgif-6-9621b5e841f0.gif)



#**<u>Editing</u>**

##**[⇧](#top)1.Select line** <a name="ctrl-l"></a>


| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+L`      | `⌘+L`

Selects the current line. By repeating this command, you can keep on selecting the next lines.

![Lines](https://im6.ezgif.com/tmp/ezgif-6-6424dc16eafa.gif)

##**[⇧](#top)2.Select duplicates** <a name="ctrl-d"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+D`      | `⌘+D`


By repeating this command, you can select the occurrences of the current selection in the file.
Each time you use it, the next occurrence is being selected as well. By holding down the keys, it works a lot quicker.

![Duplicates](https://im6.ezgif.com/tmp/ezgif-6-f0076e64e06f.gif)

##**[⇧](#top)3.Duplicate line** <a name="ctrl-shift-d"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+D`      | `⌘ + ⇧ + D`

Duplicates the current line, or the selected area.

![Duplicate](https://im6.ezgif.com/tmp/ezgif-6-6e05032cc05e.gif)

##**[⇧](#top)4.Select content of an element** <a name="ctrl-shift-a"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+A`      | `⌘ + ⇧ + A`

You can easily select the whole content inside an element in HTML.

![Select content](https://im6.ezgif.com/tmp/ezgif-6-10a384346cf1.gif)

##**[⇧](#top)5.Move active line/selection up/down** <a name="ctrl-shift-up-down"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+Up/Down`      | `⌘ + ⇧ + Up/Down`

Move the active line or your selection up and down simply like that.

![Move up/down](https://im6.ezgif.com/tmp/ezgif-6-3f44ac09a0ab.gif)

##**[⇧](#top)6.Add cursor to next/previous line** <a name="ctrl-alt-up-down"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Alt+Up/Down`      | `⌃ + ⇧ + Up/Down`

You can add another cursor at the same position as the original one to the next/previous line.

![alt](https://im6.ezgif.com/tmp/ezgif-6-f66392821ca0.gif)

##**[⇧](#top)7.Insert new line before/after** <a name="ctrl-shift-enter"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL`(`+Shift`)`+Enter`     | `⌘ +`(`⇧`)`+↩`

With `CTRL+Shift+Enter` you can insert a new line before the cursor, with `CTRL+Enter` you insert one after the cursor.

![Add new line](https://im6.ezgif.com/tmp/ezgif-6-f11922aac39a.gif)


##**[⇧](#top)8.Replace two selection** <a name="ctrl-t"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+T`      | `⌘+T`

Simply replace two selections with this command, instead of doing it manually all the time.

![Replace selections](https://im6.ezgif.com/tmp/ezgif-6-3e7d763ee075.gif)

In case you don't know how to make multiple selection, just hold `CTRL` when selecting something.

##**[⇧](#top)9.Jump by words** <a name="ctrl-left-right"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+`(`Left`/`Right`)      | `⌘+`(`Left`/`Right`)

Instead of simply just holding down the right arrow to get the cursor where you want, just use this command to get there much quicker by skipping a whole word with each jump.

![Jump by words](https://im6.ezgif.com/tmp/ezgif-6-e585739f5b56.gif)

##**[⇧](#top)10.Select by words** <a name="ctrl-shift-left-right"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+`(`Left`/`Right`)      | `⌘ + ⇧ +`(`Left`/`Right`) 

You can also easily select multiple words easily by using the same method as above, but also holding `Shift` down. With this you will still jump by words, but you will also select everything.

![Select by words](https://im6.ezgif.com/tmp/ezgif-6-b2035067a159.gif)

##**[⇧](#top)11.Delete from cursor to the start of active line** <a name="ctrl-shift-k"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+K+Backspace`      | `⌘ + K + ⌫`

This will delete everything from the cursor's position to the start of the currently active line.

![Delete to start](https://im6.ezgif.com/tmp/ezgif-6-7e25eab01176.gif)

##**[⇧](#top)12.Delete from cursor to the end of active line** <a name="ctrl-k-k"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+K+K`      | `⌘ + K, ⌘ + K`

This will delete everything from the cursor's position to the end of the currently active line.

![Delete to end](https://im6.ezgif.com/tmp/ezgif-6-d8749d84be52.gif)

##**[⇧](#top)13.Sort** <a name="f9"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `F9`      | `F5`/`⌃ + F5`

You can sort the selected area by the first characters with a simple keypress if you want to.

![Sort](https://im6.ezgif.com/tmp/ezgif-6-328bf558b1bf.gif)

##**[⇧](#top)14.Select all occurrences of selected word(s)** <a name="alt-f3"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `Alt+F3`      | `⌘ + ⌃ + G`

Similar to `CTRL+D`, but this will select **all** occurrences of your selection if the active file.

![All occurrences](https://im6.ezgif.com/tmp/ezgif-6-1a66e68391ae.gif)

##**[⇧](#top)15.Delete tab** <a name="shift-tab"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `Shift+Tab`      | `???`

Simply delete a tab before the selected area.

![Delete tab](https://im6.ezgif.com/tmp/ezgif-6-f68fc2bd8665.gif)

##**[⇧](#top)16.Jump to matching brackets** <a name="ctrl-m"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+M`      | `⌃ + M`

Why you select an opening bracket, with this shortcut you can jump directly to the closing tag.

![Jump to matching brackets](https://im6.ezgif.com/tmp/ezgif-6-1fd2a9d39460.gif)

##**[⇧](#top)17.Lower/uppercase selection** <a name="ctrl-k-u-l"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+K+`(`U`/`L`)      | `⌘ + K, ⌘ + `(`U`/`L`)

You can quickly transform the selected section to lower or uppercase.
For lowercase, use `CTRL+K+L`, for uppercase use `CTRL+K+U`.

![Transform](https://im6.ezgif.com/tmp/ezgif-6-eb699ace2add.gif)

##**[⇧](#top)18.Close HTML tags** <a name="alt-dot"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `Alt+.`      | `⌘ + ⌥ + .`

Simply close all the tags that are missing the closing tag.

![Close tags](https://im6.ezgif.com/tmp/ezgif-6-52b74de1e465.gif)

##**[⇧](#top)19.Skip selection** <a name="ctrl-k-d"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+K+D`      | `???`

When selecting duplicates, you can skip the next with this shortcut.

![Skip selection](https://im6.ezgif.com/tmp/ezgif-6-8ba90b8e6b78.gif)


##**[⇧](#top)20.Wrap selection in HTML tag** <a name="alt-shift-w"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `Alt+Shift+W`      | `???`

Easily wrap the selection in a HTML tag. It is wrapped in a `p` tag by default, but just start typing and you will rename both the opening and closing tag

![Wrap selection](https://im6.ezgif.com/tmp/ezgif-6-e6c6879dc24f.gif)


#**<u>Find/replace</u>**

##**[⇧](#top)1.Find/search** <a name="ctrl-f"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+F`      | `⌘ + F`

This is a basic search command, to quickly find what you're looking for in your currently active file.

![Search](https://im6.ezgif.com/tmp/ezgif-6-28ea2297bb4b.gif)

##**[⇧](#top)2.Find and replace** <a name="ctrl-h"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+H`      | `⌘ + ⌥ + F`

With this you can find each occurrence of something in your active file, and can replace it with something else, one by one, or all of them immediately.
Use `CTRL+Shift+H` to replace them one by one, and `CTRL+Alt+Enter` to replace all.

![Replace](https://im6.ezgif.com/tmp/ezgif-6-ee10adb6c10b.gif)

##**[⇧](#top)3.Find/search in all opened file** <a name="ctrl-shift-f"></a>

| Windows        | MAC          
| ------------- |:-------------:
| `CTRL+Shift+F`      | `⌘ + ⇧ + F`

If you want to search for something in several/all files, this is your option to do it.
You can quickly search for anything in all opened files, and the search results will be opened in a new tab, listing all the matches, the file name and the line where the search value occurred.
Quickly open the results with `Alt+Enter` shortcut.

![Search in files](https://im6.ezgif.com/tmp/ezgif-6-5a1502272219.gif)