Skip to content

Instantly share code, notes, and snippets.

@wannabefro
Created November 12, 2013 22:00
Show Gist options
  • Save wannabefro/7439543 to your computer and use it in GitHub Desktop.
Save wannabefro/7439543 to your computer and use it in GitHub Desktop.
sublime stuff

Sublime Text Tips & Tricks

Command P || Command T

Press Command + T or Command + P, type in the name of the file you wish to access (fuzzy finder), and, without even pressing Enter, you’ll instantly be transported to that file.

Shift Command P

We can use Sublime’s command palette by accessing the Tools menu, or by pressing Shift + Command + P, on the Mac.

Whether you need to visit a Preferences page, or paste in a snippet, all of that can be accomplished here.

Multiple Selection

To enable multi-selection, you have several options:

  • Press Alt or Command and then click in each region where you require a cursor.
  • Select a block of lines, and then press Shift + Command + L.
  • Place the cursor over a particular word, and press Command + D repeatedly to select additional occurrences of that word.
  • Alternatively, add an additional cursor at all occurrences of a word by typing Ctrl+Command+G on the Mac. Amazing!!

Window Management

Use Option Command Number (number of windows you want) to vertically split the window this many times. Use Ctrl Number (the pane number you want) to access that pane.

Snippets

To quickly access the snippets palette use Control Y.

To install HeroicErics snippety snippets do the following:

  • if using Sublime Text 2 run:

git clone git@github.com:HeroicEric/snippity.git /YOUR_USER/Library/Application Support/Sublime Text 2/Packages/User/

  • if using Sublime Text 3 run:

git clone git@github.com:HeroicEric/snippity.git /YOUR_USER/Library/Application Support/Sublime Text/Packages/User/

If you browse through package control (Shift Command P to access the command palette then type install then hit enter) and search for snippets you will find a load of snippets that the lovely sublime community have made for us. I recommend installing snippets for ERB, javascript, css, scss and anything else that happens to take your fancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment