Summary of sublime shortcut key and common plug-in configuration

Time:2021-1-23

1. Shortcut key

CTRL + ~: open the console
CTRL + Shift + P: open the command panel
CTRL + P: search for files in a project
CTRL + G: jump to line
CTRL + W: close the currently open file
CTRL + Shift + W: close all open files
CTRL + Shift + V: paste and format
CTRL + D: select a word. Repeat to select the next same word
CTRL + L: select row, repeat to select the next row
CTRL + Shift + L: select multiple lines
CTRL + Shift + Enter: inserts a new line before the current line
CTRL + X: delete current line
CTRL + M: jump to the corresponding bracket
CTRL + U: soft undo, undo cursor position
CTRL + J: select label content
CTRL + F: find content
CTRL + Shift + F: find and replace
CTRL + H: replace
CTRL + R: go to method
CTRL + N: new window
CTRL + K + B: switch sidebar
CTRL + Shift + M: select the current bracket content, repeat and select the bracket itself
CTRL + F2: set / delete tag
CTRL + /: comment current line
CTRL + Shift + /: insert comment at current position
CTRL + Alt + /: block comments, and focus to the first line to write comments
CTRL + Shift + A: select before and after the current label to modify the label
F11: full screen
Shift + F11: full screen no disturb mode, only edit the current file
Alt + F3: select all the same words
Alt +.: close label
Alt + Shift + number: split screen display
Alt + number: switch to open the nth file
Shift + right click drag: the cursor is used to change or insert column contents
The forward and backward keys of the mouse can switch the tab file
Press Ctrl, click or select to edit multiple positions
Press Ctrl + Shift + up and down to wrap the line

Select words with Ctrl + D (press the shortcut key repeatedly to continue down and select the next same text for editing at the same time)
CTRL + G jump to the corresponding line
CTRL + J merge (when multiple lines to merge are selected)
CTRL + L select the whole line (press and hold – continue to select the next line)
CTRL + m move the cursor to the beginning or end of the bracket
CTRL + T word exchange
CTRL + U soft undo
CTRL + P to find the file in the current project and search quickly; enter @ to find the main title / function of the file; or enter: jump to a line of the file;
CTRL + R quickly list / jump to a function
CTRL + K backspace delete from the cursor to the beginning of the line
CTRL + K + B turn sidebar on / off
CTRL + KK delete from cursor to end of line
CTRL + K + T collapse properties
Change Ctrl + K + u to uppercase
Change Ctrl + K + L to lowercase
CTRL + K + 0 expand all
After inserting a line (fast wrap)
CTRL + Tab tab tab in the current window
CTRL + Shift + a select cursor position parent label pair
CTRL + Shift + D copies the entire line of the cursor and inserts it before the line
CTRL + Shift + F searches in a folder. Unlike ordinary editors, sublime allows you to add multiple folders to search
CTRL + Shift + K delete entire line
CTRL + Shift + L select multiple lines (press the shortcut key) to edit them at the same time
CTRL + Shift + m select the contents in brackets (hold – continue to select parent brackets)
CTRL + Shift + P opens the command panel
CTRL + Shift + / comment selected
CTRL + Shift + ↑ can move this line of code to swap with the uplink
You can move this line of code and swap it with the next line
CTRL + Shift + [collapse code
CTRL + Shift +] expand code
CTRL + Shift + enter insert row before cursor
The CTRL + pagedown and Ctrl + pageup files are switched in the order before and after opening
CTRL + Z undo
CTRL + y redo undo
CTRL + F2 set / cancel bookmark
CTRL + / comment the whole line (if the content has been selected, the same as “Ctrl + Shift + /” effect)
You can select multiple texts to edit at the same time by using Ctrl + left mouse button
Shift + right mouse button (or middle mouse button) can be used for vertical multi line selection
Shift + F2 previous bookmark
Shift + Tab remove indent
Alt + Shift + 1 (non keyboard) window split screen, restore the default 1 screen
Alt + Shift + 2 left and right split screen – 2 columns
Alt + Shift + 3 left and right split screen – 3 columns
Alt + Shift + 4 left and right split screen – 4 columns
Alt + Shift + 5 divided into 4 screens
Alt + Shift + 8 vertical split screen – 2 screens
Alt + Shift + 9 vertical split screen – 3 screens
CTRL + Shift + Split Screen sequence number assigns the current focus page to the split screen sequence number page
Alt +. Close current label
Alt + F3 select the text and press the shortcut key to select all the same text for editing at the same time
Tab indent auto complete
F2 next bookmark
F6 detects syntax errors
F9 row sort by A-Z
F11 full screen mode

2. Install package control

https://packagecontrol.io/installation

2.1 command line installation:

Press the shortcut key Ctrl + ~ to call up the named control line and enter the following command:

import urllib.request,os,hashlib; h = ‘df21e130d211cfc94d9b0905775a7c0f’ + ‘1e3d39e33b79698005270310898eea76’; pf = ‘Package Control.sublime-package’; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( ‘http://packagecontrol.io/’ + pf.replace(‘ ‘, ‘%20’)).read(); dh = hashlib.sha256(by).hexdigest(); print(‘Error validating download (got %s instead of %s), please try manual install’ % (dh, h)) if dh != h else open(os.path.join( ipp, pf), ‘wb’ ).write(by)

2.2 manual installation

  1. Preferences > Browse Packages
  2. Enter the installed packages / directory from the upper directory
  3. Package Control.sublime -Copy the package to the installed packages / directory
  4. Restart sublime text

3. Plug in installation and uninstall

3.1 online installation

Shortcut key: Ctrl + Shift + P (menu – tools – command palette), enter install, select install package and enter to search for plug-in installation

3.2 offline installation

Download the plug-in on GitHub, unzip “preferences” – > “browse packages”, open the package location, copy the plug-in folder, and restart

3.3 plug in unloading

Shortcut key: Ctrl + Shift + P, enter remove package, and select Delete

4. Common plug-ins

【emmet】

Efficient writing of HTML and CSS
https://github.com/sergeche/emmet-sublime

Emmet shortcut

(1) Generate the structure code of HTML5
! + tab
(2) Generate ID name and class name
Tag name. Class name? ID name + Tab
No tag name. Class name + Tab = > div
(3) Generate subclass label
Tag name > sub signature > sub signature + Tab
(4) With fixed number of labels:
ul>li5 + tab
(5) Name with serial number
ul>li.abc$3 + tab
(6) Generate tags with content
ul>li>a{data}*5 + tab
(7) css
w30+tab => width:30px
h30+tab => height:30px
mg30+tab => margin:30px
pd30+tab => padding:30px
lh12px+tab => line-height:12px
bg+tab => background

SublimeLinter】

Code verification plug-in, support HTML, CSS, JS, PHP, Java, C + + and other 16 languages
http://sublimelinter.com
Note: you need to install the related lint in sublime and the node plug-in globally to make it effective

Related lint

SublimeLinter-jshint
SublimeLinter-jsxhint
SublimeLinter-csslint

Global installation of node plug-ins

$ npm install -g jshint
$ npm install -g jsxhint
$ npm install -g csslint

【html-css-js prettify】

CTRL + Shift + H format code
https://github.com/victorporof/Sublime-HTMLPrettify

【CSScomb】

CSS finishing
http://csscomb.com/

【sublimeCodeintel】

Automatic prompt of Shift + Ctrl + space code
https://packagecontrol.io/packages/SublimeCodeIntel

【All Autocomplete】

Search all open files for matching prompts

【AutoFileName】

Automatic search prompt related file path, such as JS, CSS, IMG, etc

【BracketHighlighter】

Highlight the selected bracket and support code folding

【Color Highlighter】

Color highlight

【FileHeader】

Add header automatically
Template path: data / packages / fileHeader / template/

【DocBlockr】

Function Comments
https://github.com/spadgos/sublime-jsdocs

【Trimmer】

CTRL + Alt + s clear some unnecessary spaces due to errors or other reasons when writing code
https://github.com/jonlabelle/Trimmer

【jQuery】

https://github.com/sublimetext/jquery

【SublimeServer】

Start the local server debugging and select start sublimeserver from the tools menu

【gbk support】

Chinese support, sublime text does not support GB2312, need to install plug-ins
https://github.com/chengsu/sublime-gbk-support

【ConvertToUTF8】

Note: you need to modify the shortcut key settings of “data / packages / converttoutf8 / default. Sublime keymap”, such as “Ctrl + Alt + Shift + C, to avoid conflict with colorpicker

【SideBarEnhancements】

Sidebar right click enhanced
https://github.com/titoBouzout/SideBarEnhancements/tree/st3

【SublimeGit】

Throughctrl + shift + pUsing git function

 git config –global user.name “username”
git config –global user.email “[email protected]

 http://sublimegit.readthedocs.io

【GitGutter】

Highlight the row that changed relative to the last submission
Modify configuration

{
“git_binary”: “C:\\Program Files (x86)\\Git\\bin\\git.exe”
}

【AutoPrefixer】

ctrl + shift + pInput call to complete CSS3 private prefix automatically

https://github.com/sindresorhus/sublime-autoprefixer

【Terminal】

Use the terminal to open, support the use of shortcut keys
Open current folder
ctrl + shift + tOpen project folder
ctrl + alt + shift + t
https://github.com/wbond/sublime_terminal

【ColorPicker】

ctrl+shift+cCall color picker
http://weslly.github.io/ColorPicker

【Clipboard History】

shift + ctrl + vClipboard history
https://github.com/Jimbly/SublimeClipboardHistory

【CTags】

Function jump

Other plug ins

【javascript & Nodejs Snippets】
Shortcut code, which can be viewed by inputting snippets through Ctrl + Shift + P

【Can I Use】
compatibility check
http://timkl.xyz/sublime-text-caniuse

【FileDiffs】
Document comparison
https://github.com/colinta/SublimeFileDiffs

【Colorcoder】
Highlight all variables

【MarkdownEditing】
Markdown editing support
MDI + Tab insert picture
Link generation with MDL + Tab
https://github.com/mdesantis/MarkdownEditing

【OmniMarkupPreviewer】
Preview markdown
Ctrl+Alt+O: Preview Markup in Browser.
Ctrl+Alt+X: Export Markup as HTML.
Ctrl+Alt+C: Copy Markup as HTML.
https://github.com/timonwong/OmniMarkupPreviewer

【PackageResourceViewer】

View and edit the different packages that come with sublimetext
https://github.com/skuroda/PackageResourceViewer

【soda-theme】

Add “theme” to setting user: “soda light 3. Sublime theme”
http://buymeasoda.github.io/soda-theme

Hex to HSL: automatically convert color values
Jsminifier: automatically compress JS files
Yui compressor: compress JS and CSS files
SFTP: directly edit files on FTP or SFTP server
Ftpsync: FTP SSH upload configuration, install successfully, configure host
Actualvim: using VIM

5. Others

5.1 modify the default font

Modify settings – user

“font_ Microsoft YaHei,
“font_size”: 14,