Sublime Text - Useful Shortcuts for Linux and Windows



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
CtrlControl 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 + XCut line or selection
Ctrl + CCopy line or selection
Ctrl + VPaste from clipboard
Ctrl + ⇧ + VPaste 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
F9Short Lines
Ctrl + F9Short Lines (Case Sensitive)
Alt + .Close current HTML tag
Alt + ⇧ + WWrap selection in HTML tag
Ctrl + SpaceAuto-complete. Repeat to select next suggestion
Alt + /Show completion
Note : This shortcut works in Linux, for Windows use Ctrl + Space
Ctrl + ⇧ + DDuplicate line or selection
Ctrl + ⇧ + KDelete line or selection
Ctrl + KKDelete from cursor to end of line
Ctrl + K + ⌫Delete from cursor to start of line
Ctrl + JJoin line below to end of current line
Ctrl + YRedo, or repeat last keyboard shortcut command
Ctrl + USoft undo. Movement undo. jumps to your last change before undoing change when repeated
Ctrl + ⇧ + USoft redo. Movement redo.
Alt + QHard wrap line to ruler column setting
Selecting Text
Ctrl + ASelect all
Ctrl + LSelect line. Repeat to select next lines
Ctrl + ⇧ + LSplit cursors in to lines. (Multi cursor) adds a cursor to each line of current selection at end of the line.
Ctrl + ClickMulti select editing
Ctrl + ⇧ + SpaceExpand selection to scope
Ctrl + DQuick select word or selection. Repeat select others occurrences in context for multiple editing
Ctrl + KDSkip and quick add next. (while repeating Ctrl + D)
Ctrl + ⇧ + MExpand selection to brackets/parentheses
Ctrl + ⇧ + JExpand selection to indentation
Ctrl + ⇧ + ASelect 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 + ⇧ + HomeSelect text from cursor to starting of file
Ctrl + ⇧ + EndSelect text from cursor to end of file
General
Ctrl + ⇧ + POpen sublime command prompt
Ctrl + PQuick open files by name. Open command palette
Ctrl + GGoto line in current file
Ctrl + RGoto methods or symbol
Ctrl + ⇧ + RGoto methods in project
Ctrl + ;Goto word in current file
Ctrl + `Toggle console
Ctrl + ⇧ + Alt + PShow scope (status bar)
Ctrl + NNew file
Ctrl + OOpen file
Ctrl + SSave file
Ctrl + ⇧ + SSave as
Ctrl + ⇧ + NOpen new window
Ctrl + ⇧ + WClose current window
Ctrl + WClose file
Ctrl + QQuit sublime
Note : This shortcut works in Linux, for Windows use native shortcut like Alt + F4 (This will close only current window not entire Sublime)
F11Enter full-screen mode
⇧ + F11Enter distraction free mode
Code Navigation
Ctrl + KCGoto current selection
Ctrl + 0Focus on sidebar
Ctrl + KBToggle sidebar
EscExit form prompt window. Exit form multiple cursor. focus back to edit area when focus on sidebar
Ctrl + MJump to closing parentheses. Repeat to jump to opening parentheses
HomeGo to line starting with indentation. repeat for starting of line and indentation.
EndGo to end of line
Ctrl + HomeGo to starting of file
Ctrl + EndGo 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 + ⇧ + 1Revert view/layout to single column
Alt + ⇧ + 2Split view/layout into two columns
Alt + ⇧ + 3Split view/layout into three columns
Alt + ⇧ + 4Split view/layout into four columns
Alt + ⇧ + 5Set view/layout to grid (4 groups)
Alt + ⇧ + 8Split view/layout into two rows
Switching to File, Project and Group
Ctrl + Alt + PSwitch project
Note : This shortcut works in Linux for windows i will update the shortcut whenever i found
Ctrl + Page DownSwitch to next file
Ctrl + Page UpSwitch to previous file
Ctrl + TabSwitch to next file in stack
Ctrl + ⇧ + TabSwitch 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 + KTFold tag attributes selection
Note : This shortcut works in Linux for windows i will update the shortcut whenever i found
Ctrl + K1fold all
Ctrl + KJUnfold all
Bookmarks
Ctrl + F2Toggle bookmark
F2Next bookmark
⇧ + F2Previous bookmark
Ctrl + ⇧ + F2Clear bookmarks
Alt + F2Select all bookmarks
Marks
Ctrl + K + SpaceSet mark
Ctrl + KASelect from cursor to mark
Ctrl + KWDelete from cursor to mark
Ctrl + KXSwap with mark
Ctrl + KGClear mark
Ctrl + KYYank
Find and Replace
Ctrl + FFind in current file
F3Find next occurrence of searched text
⇧ + F3Find previous occurrence of searched text
Ctrl + IIncremental find in current file
Ctrl + HReplace
Ctrl + ⇧ + HReplace next occurrence
Ctrl + F3Quick find. find next occurrence of current word
Alt + F3Quick find all. select all occurrences of current word for multiple editing
Ctrl + EUse selection for find
Ctrl + ⇧ + EUse selection for replace
Ctrl + ⇧ + FFind in files
Text Manipulation
Ctrl + KUTransform selection or current word to uppercase
Ctrl + KLTransform selection or current word to lowercase
Ctrl + PlusIncrease font size
Ctrl + MinusDecrease font size
Spell Check
F6Toggle spell check
Ctrl + F6Next Misspelling
Ctrl + ⇧ + F6Previous 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! :)

Comments

Post a Comment