The Sublime Text editor has a lot of features and shortcuts for the modern coder to play with. I will show you the basic features of sublime and keyboard shortcuts that are being tested on Linux and Windows operating system.
Features of Sublime Text
- Column selection and multi-select editing
This feature allows users to select entire columns at once or place more than one cursor in text, which allows for simultaneous editing. - Auto-completion
Sublime Text will offer to complete entries as the user is typing depending on the language being used. It also auto-completes variables created by the user. - Syntax highlight and high contrast display
The dark background on Sublime Text is intended to reduce eyestrain and increase the amount of contrast with the text. - In-editor code building
This feature allows users to run code for certain languages from within the editor, which eliminates the need to switch out to the command line and back again. - Snippets
This feature allows users to save blocks of frequently used code and assign keywords to them. The user can then type the keyword and press tab to paste the block of code whenever they require it. - Goto anything
This feature is a tool that allows users to switch between open, recent or project files and also navigate to symbols within them.
Keyboard shortcuts for Sublime [Linux & Windows]
Use this shortcuts to control Linux (all Linux based OS) and Windows version of Sublime Text editor. here listed shortcuts are being tested on Linux, Ubuntu, and Windows.
NOTE: Keyboard shortcuts are may vary as per your environment configuration.
Go to Preferences → Key Bindings - Default to explore all default shortcuts and read instructions for packages you installed to find out about their custom key bindings.
Key Overview | ||
---|---|---|
Ctrl | Control key | |
⇧ | Shift key | |
⏎ | Return or Enter key | |
⌫ | Backspace key | |
⌦ | Delete key | |
↑ | Up arrow key | |
↓ | Down arrow key | |
← | Left arrow key | |
→ | Right arrow key | |
Editing | ||
Ctrl + X | Cut line or selection | |
Ctrl + C | Copy line or selection | |
Ctrl + V | Paste from clipboard | |
Ctrl + ⇧ + V | Paste and indent correctly | |
Ctrl + ⌦ | Delete word forwards from the cursor | |
Ctrl + ⌫ | Delete word backward from the cursor | |
Ctrl + ] | Indent line or selection | |
Ctrl + [ | Unindent line or selection | |
Ctrl + / | Toggle single line comment | |
Ctrl + ⇧ + / | Toggle block comment | |
Ctrl + ⏎ | Insert line after | |
Ctrl + ⇧ + ⏎ | Insert line before | |
F9 | Short Lines | |
Ctrl + F9 | Short Lines (Case Sensitive) | |
Alt + . | Close current HTML tag | |
Alt + ⇧ + W | Wrap selection in HTML tag | |
Ctrl + Space | Auto-complete. Repeat to select next suggestion | |
Alt + / | Show completion Note : This shortcut works in Linux, for Windows use Ctrl + Space | |
Ctrl + ⇧ + D | Duplicate line or selection | |
Ctrl + ⇧ + K | Delete line or selection | |
Ctrl + KK | Delete from cursor to end of line | |
Ctrl + K + ⌫ | Delete from cursor to start of line | |
Ctrl + J | Join line below to end of current line | |
Ctrl + Y | Redo, or repeat last keyboard shortcut command | |
Ctrl + U | Soft undo. Movement undo. jumps to your last change before undoing change when repeated | |
Ctrl + ⇧ + U | Soft redo. Movement redo. | |
Alt + Q | Hard wrap line to ruler column setting | |
Selecting Text | ||
Ctrl + A | Select all | |
Ctrl + L | Select line. Repeat to select next lines | |
Ctrl + ⇧ + L | Split cursors in to lines. (Multi cursor) adds a cursor to each line of current selection at end of the line. | |
Ctrl + Click | Multi select editing | |
Ctrl + ⇧ + Space | Expand selection to scope | |
Ctrl + D | Quick select word or selection. Repeat select others occurrences in context for multiple editing | |
Ctrl + KD | Skip and quick add next. (while repeating Ctrl + D) | |
Ctrl + ⇧ + M | Expand selection to brackets/parentheses | |
Ctrl + ⇧ + J | Expand selection to indentation | |
Ctrl + ⇧ + A | Select contents into tag | |
Ctrl + ⇧ + ← | Select word from cursor to left. Repeat for next | |
Ctrl + ⇧ + → | Select word form cursor to right. Repeat for next | |
Alt + ⇧ + ↑ | Column selection up Note : This shortcut works in Linux, for Windows use Ctrl + Alt + ↑ | |
Alt + ⇧ + ↓ | Column selection down Note : This shortcut works in Linux, for Windows use Ctrl + Alt + ↓ | |
Ctrl + Alt + ↑ | Column selection up Note : This shortcut works in Windows, for Linux use Ctrl + ⇧ + ↑ | |
Ctrl + Alt + ↓ | Column selection down Note : This shortcut works in Windows, for Linux use Ctrl + ⇧ + ↓ | |
Ctrl + ⇧ + ↑ | Move line or selection up | |
Ctrl + ⇧ + ↓ | Move line or selection down | |
Ctrl + ⇧ + Home | Select text from cursor to starting of file | |
Ctrl + ⇧ + End | Select text from cursor to end of file | |
General | ||
Ctrl + ⇧ + P | Open sublime command prompt | |
Ctrl + P | Quick open files by name. Open command palette | |
Ctrl + G | Goto line in current file | |
Ctrl + R | Goto methods or symbol | |
Ctrl + ⇧ + R | Goto methods in project | |
Ctrl + ; | Goto word in current file | |
Ctrl + ` | Toggle console | |
Ctrl + ⇧ + Alt + P | Show scope (status bar) | |
Ctrl + N | New file | |
Ctrl + O | Open file | |
Ctrl + S | Save file | |
Ctrl + ⇧ + S | Save as | |
Ctrl + ⇧ + N | Open new window | |
Ctrl + ⇧ + W | Close current window | |
Ctrl + W | Close file | |
Ctrl + Q | Quit sublime Note : This shortcut works in Linux, for Windows use native shortcut like Alt + F4 (This will close only current window not entire Sublime) | |
F11 | Enter full-screen mode | |
⇧ + F11 | Enter distraction free mode | |
Code Navigation | ||
Ctrl + KC | Goto current selection | |
Ctrl + 0 | Focus on sidebar | |
Ctrl + KB | Toggle sidebar | |
Esc | Exit form prompt window. Exit form multiple cursor. focus back to edit area when focus on sidebar | |
Ctrl + M | Jump to closing parentheses. Repeat to jump to opening parentheses | |
Home | Go to line starting with indentation. repeat for starting of line and indentation. | |
End | Go to end of line | |
Ctrl + Home | Go to starting of file | |
Ctrl + End | Go to end of file | |
Ctrl + → | Jump to end of word at right side | |
Ctrl + ← | Jump to start of word at left side | |
Alt + - | Jump back (position) | |
Alt + ⇧ + - | Jump forward (position) | |
Ctrl + ↓ | Scroll down one line | |
Ctrl + ↑ | Scroll up one line | |
Split Window Layout | ||
Alt + ⇧ + 1 | Revert view/layout to single column | |
Alt + ⇧ + 2 | Split view/layout into two columns | |
Alt + ⇧ + 3 | Split view/layout into three columns | |
Alt + ⇧ + 4 | Split view/layout into four columns | |
Alt + ⇧ + 5 | Set view/layout to grid (4 groups) | |
Alt + ⇧ + 8 | Split view/layout into two rows | |
Switching to File, Project and Group | ||
Ctrl + Alt + P | Switch project Note : This shortcut works in Linux for windows i will update the shortcut whenever i found | |
Ctrl + Page Down | Switch to next file | |
Ctrl + Page Up | Switch to previous file | |
Ctrl + Tab | Switch to next file in stack | |
Ctrl + ⇧ + Tab | Switch to previous file in stack | |
Alt + [NUM] | Select tab where NUM is 1-9 | |
Ctrl + [NUM] | Jump to group where NUM is 1-4 | |
Ctrl + ⇧ + [NUM] | Move file to specified group where NUM is 1-4 | |
Code Folding | ||
Ctrl + ⇧ + [ | Fold selection | |
Ctrl + ⇧ + ] | Unfold selection | |
Ctrl + KT | Fold tag attributes selection Note : This shortcut works in Linux for windows i will update the shortcut whenever i found | |
Ctrl + K1 | fold all | |
Ctrl + KJ | Unfold all | |
Bookmarks | ||
Ctrl + F2 | Toggle bookmark | |
F2 | Next bookmark | |
⇧ + F2 | Previous bookmark | |
Ctrl + ⇧ + F2 | Clear bookmarks | |
Alt + F2 | Select all bookmarks | |
Marks | ||
Ctrl + K + Space | Set mark | |
Ctrl + KA | Select from cursor to mark | |
Ctrl + KW | Delete from cursor to mark | |
Ctrl + KX | Swap with mark | |
Ctrl + KG | Clear mark | |
Ctrl + KY | Yank | |
Find and Replace | ||
Ctrl + F | Find in current file | |
F3 | Find next occurrence of searched text | |
⇧ + F3 | Find previous occurrence of searched text | |
Ctrl + I | Incremental find in current file | |
Ctrl + H | Replace | |
Ctrl + ⇧ + H | Replace next occurrence | |
Ctrl + F3 | Quick find. find next occurrence of current word | |
Alt + F3 | Quick find all. select all occurrences of current word for multiple editing | |
Ctrl + E | Use selection for find | |
Ctrl + ⇧ + E | Use selection for replace | |
Ctrl + ⇧ + F | Find in files | |
Text Manipulation | ||
Ctrl + KU | Transform selection or current word to uppercase | |
Ctrl + KL | Transform selection or current word to lowercase | |
Ctrl + Plus | Increase font size | |
Ctrl + Minus | Decrease font size | |
Spell Check | ||
F6 | Toggle spell check | |
Ctrl + F6 | Next Misspelling | |
Ctrl + ⇧ + F6 | Previous Misspelling |
You can put comment if you found new shortcuts that are not being listed here. also you can suggest if any of above given shortcut is not working. i will try to improve this article as soon as possible.
I have a big request to you if think my post is helpful
Please do Subscribe / Share! :)
Thanks for shearing this kind of information sublime
ReplyDelete