Skip to main content

Sublime 2 Keyboard Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.


Ctrl+Ccopy current line (if no selection)
Ctrl+Xcut current line (if no selection)
Ctrl+⇧+Kdelete line
Ctrl+↩insert line after
Ctrl+⇧+↩insert line before
Ctrl+⇧+↑move line (or selection) up
Ctrl+Lselect line (repeat to select next lines)
Ctrl+Dselect word (repeat select others occurrences in context for multiple editing)
Ctrl+Mjump to closing bracket for current code, repeat to jump to opening bracket
Ctrl+⇧+Mselect all contents of the current brackets (curly brackets, square brackets, parentheses)
Ctrl+KKdelete from cursor to end of line
Ctrl+K+⌫delete from cursor to start of line
Ctrl+]indent current line(s)
Ctrl+[un-indent current line(s)
Ctrl+⇧+Dduplicate line(s)
Ctrl+Jjoin line below to the end of the current line
Ctrl+ /comment/un-comment current line
Ctrl+⇧+/block comment current selection
Ctrl+Yredo, or repeat last keyboard shortcut command
Ctrl+⇧+Vpaste and indent correctly
Ctrl+Spaceselect next auto-complete suggestion
Ctrl+Usoft undo (somehow undoes your movements; it jumps to your last change before undoing it when you repeat this command)

Navigation/Goto Anywhere

Ctrl+Pquick-open files by name in your project (doesn’t seem to need an actual project set up, it just searches in the directories around the currently-opened file
Ctrl+Rgoto symbol (functions and classes) in the file. Same as Ctrl+P, then type @
Ctrl+;goto word in current file. Same as Ctrl+P, then type #
Ctrl+Ggoto line in current file. Same as Ctrl+P, then type :


Ctrl+⇧+Pcommand prompt
Ctrl+KBtoggle side bar


Ctrl+⇧+Ffind in files


Ctrl+⇧+topen last closed tab (just like in your browser)
Ctrl+PgDncycle down through open tabs, cycle up with Ctrl+PgUp
Ctrl+⇆cycle through last tabs (repeat to go back further in history)

Split window

Alt+⇧+2split into two columns
Alt+⇧+1revert to single column
Alt+⇧+5grid (4 groups)
Ctrl+[1,2,3,4]jump to “group” (pane)
Ctrl+⇧+[1,2,3,4]move file to specified group


Ctrl+F2toggle bookmark
F2next bookmark
⇧+F2previous bookmark
Ctrl+⇧+F2clear bookmarks

Text manipulation

Ctrl+KUupper case
Ctrl+KLlower case


ananth said…
Sublime has changed a lot. But some keyword combination brought me here. kudos.


Rails Engine - How To Keep Your Engine Migrations Abstracted From Your Host Rails App

Have you ever worked on building a Rails Engine and wanted to keep the models, the migrations and everything inside the engine rather than using a generator to copy paste them into your host Rails App? That's a problem everybody faces one time or the other when building Rails Engines to abstract out your huge Rails App. I have found one such solutions that can be helpful for you to keep them separate. Here is a solution for it.
Problem Statement: Instead of using

    rails g my_engine:install
to copy paste the migrations from engine to your rails app, you want to just keep the migrations inside the Rails Engine and do not bother about it.
Solution:  Add the following lines to your engine, so that your engine's migration files are added to the rails app as well.

Now you can do the following from your rails app to run your migrations as you always do:

rake db:migrate
Hope it helps you! If it does help you, give me a shoutout below!

Talk to me on Twitter, Facebook, LinkedIn or Web…

Popular Posts

You will receive wonderful short stories written by him and inspirational articles once every month.