Sublime text3 most comprehensive shortcut keys

Sublime Text supports syntax highlighting of multiple programming languages , has excellent code auto-completion function, and also has the function of code snippets (Snippet), which can save commonly used code snippets and call them at any time when needed. Support VIM mode, you can use most commands in Vim mode. Macros are supported. Simply put, record the operation or write the command yourself, and then play the operation or command just recorded.

Sublime Text also has good scalability, fully open user-defined configuration and magical and practical editing status recovery function. Support powerful multi-line selection and multi-line editing. Powerful shortcut commands "can search for the corresponding commands, options, snippets and syntex in real time, and press Enter to execute them directly, reducing the trouble of searching. Instant file switching. Jump to any position of any file as you like. The multiple selection function allows multiple cursors to exist on the page at the same time.

The editor's unique interface is that it supports multiple layouts and code thumbnails. The file thumbnail slide bar on the right allows you to easily observe the position of the current window in the file. F11 and Shift+F11 are also provided to enter the full-screen DND mode. Code thumbnails, multiple tab pages and multiple layout settings are especially convenient when you need to edit multiple files on a large screen at the same time. Full-screen Do Not Disturb mode allows you to concentrate on editing. The function of code thumbnails already exists in the earlier editor TextMate , and TextMate has been open source. Sublime Text 2 supports folder browsing, you can open the folder, and there will be a navigation bar on the left, which is convenient for processing multiple files at the same time. 3. To edit multiple locations at the same time, hold down ctrl, select multiple locations with the mouse, and perform the same operation at the corresponding locations at the same time. [1] 

SublimeText also has the ability to restore the editing state, that is, when you modify a file but do not save, exit the software at this time, the software does not ask the user whether to save, because whether it is the user exits spontaneously or unexpectedly crashes and exits, the software will be launched next time After that, the previous editing state will be fully restored, just like before exiting.

The following are commonly used shortcut keys for sublime.

  Ctrl+Shift+P: Open the command panel

  Ctrl+P: Search for files in the project
Ctrl+G: Jump to the first few lines
Ctrl+W: Close the currently open file
Ctrl+Shift+W: Close all open files
Ctrl+Shift+V: Paste and format
Ctrl+D
Ctrl+L: Select a word, repeat to add the next same word Ctrl+L: Select a line, repeat to add the next line in turn
Ctrl+Shift+L: Select multiple lines
Ctrl+Shift+Enter: Insert a new line before the current line
Ctrl +X: Delete the current line
Ctrl+M: Jump to the corresponding bracket
Ctrl+U: Soft undo, undo the cursor position
Ctrl+J: Select the content of the label
Ctrl+F: Find the 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 the optional bracket itself
Ctrl+F2: Set/delete the mark
Ctrl+/ :Comment the current line
Ctrl+Shift+/: Insert a comment at the current position
Ctrl+Alt+/: Block comment, and focus to the first line,
Ctrl+Shift+A for writing the comment description : Before and after the current label is selected,
F11 for modifying the label : Full screen
Shift+F11: Full-screen Do Not Disturb mode, only edit the current file
Alt+F3: select all the same words
Alt+.: close tab
Alt+Shift+number: split screen display
Alt+number: switch to open the Nth file
Shift+right-click drag: there are many cursors, used to change or insert column content,
mouse forward The back key can switch Tab files.
Press Ctrl, click or select one by one, and you can edit multiple positions.
Press Ctrl+Shift+up and down keys to replace lines

Select class

Ctrl+D Select the text occupied by the cursor, and continue to select the next same text.

Alt+F3 Select the text and press the shortcut key to select all the same text at once for simultaneous editing. Take a chestnut: quickly select and change all the same variable names, function names, etc.

Ctrl+L selects the entire row, and continues to select the next row. The effect is the same as that of Shift+↓.

Ctrl+Shift+L first select multiple lines, and then press the shortcut key, the cursor will be inserted at the end of each line, and these lines can be edited at the same time.

Ctrl+Shift+M selects the content inside the brackets (continue to select the parent brackets). Take a chestnut: Quickly select and delete the code in the function, rewrite the function body code or rewrite the content in the brackets.

Ctrl+M Move the cursor to the end or the beginning of the bracket.

Ctrl+Enter inserts a new line in the next line. Give a chestnut: even if the cursor is not at the end of the line, you can quickly insert a line down.

Ctrl+Shift+Enter inserts a new line in the previous line. Give a chestnut: even if the cursor is not at the beginning of the line, you can quickly insert a line up.

Ctrl+Shift+[ Select the code and press the shortcut key to collapse the code.

Ctrl+Shift+] Select the code and press the shortcut key to expand the code.

Ctrl+K+0 Expand all folding codes.

Ctrl+← Move the cursor unitarily to the left, and move the cursor quickly.

Ctrl+→ Move the cursor unitarily to the right, and move the cursor quickly.

shift+↑ Select multiple lines up.

shift+↓ Select multiple rows down.

Shift+← Select text to the left.

Shift+→ Select text to the right.

Ctrl+Shift+← Select text unitarily to the left.

Ctrl+Shift+→ Select text unitarily to the right.

Ctrl+Shift+↑ Exchange the line where the cursor is with the previous line of code (insert the line where the cursor is before the previous line).

Ctrl+Shift+↓ Exchange the line where the cursor is with the next line of code (insert the line where the cursor is after the next line).

Ctrl+Alt+↑ Add a multi-line cursor upwards, you can edit multiple lines at the same time.

Ctrl+Alt+↓ Add multiple lines of cursor downwards, and multiple lines can be edited at the same time.

Edit class

Ctrl+J merges the selected lines of code into one line. Take a chestnut: Combine the CSS properties of the multi-line format into one line.

Ctrl+Shift+D Copy the entire line where the cursor is located and insert it into the next line.

Tab indents to the right.

Shift+Tab indent to the left.

Ctrl+K+K deletes code from the cursor to the end of the line.

Ctrl+Shift+K delete the entire line.

Ctrl+/ Comment a single line.

Ctrl+Shift+/ Comment multiple lines.

Ctrl+K+U converts to uppercase.

Ctrl+K+L to lowercase.

Ctrl+Z undo.

Ctrl+Y Redo the undo.

Ctrl+U soft undo, it feels the same as Gtrl+Z.

Ctrl+F2 set bookmark

Ctrl+T swaps left and right letters.

F6 word check spelling

Search class

Ctrl+F Open the search box at the bottom to find keywords.

Ctrl+shift+F Search in folders. The difference from ordinary editors is that sublime allows you to add multiple folders for searching, which is slightly high-end and not studied.

Ctrl+P Open the search box. Give a chestnut: 1. Enter the file name in the current project, quickly search the file, 2. Enter @ and keywords, find the function name in the file, 3. Enter: and a number, jump to the line of code in the file, 4. Enter # and keywords to find the variable name.

Ctrl+G Open the search box, automatically bring:, enter a number to jump to this line of code. Take a chestnut: Quickly locate in a file with a long page code.

Ctrl+R opens the search box, automatically brings @, enters a keyword, and finds the function name in the file. Take a chestnut: Quickly find a function on a page with more functions.

Ctrl+: Open the search box, automatically add #, enter keywords, find variable names, attribute names, etc. in the file.

Ctrl+Shift+P Open the command box. Scene chestnut: Open the naming box, enter keywords, and call sublime text or plug-in functions, for example, use package to install plug-ins.

Esc Exit the cursor multi-line selection, exit the search box, command box, etc.

Display class

Ctrl+Tab Switch the tabs of the current window in the order in which the files have been browsed.

Ctrl+PageDown Switch the tab page of the current window to the left.

Ctrl+PageUp switches the tabs of the current window to the right.

Alt+Shift+1 window split screen, restore the default 1 screen (non-keypad numbers)

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 divides 4 screens equally

Alt+Shift+8 vertical split screen-2 screen

Alt+Shift+9 vertical split screen-3 screen

Ctrl+K+B Turn on/off the sidebar.

F11 full screen mode

Shift+F11 Do not disturb mode

--------------------- This article comes from the CSDN blog of programmer Cheng, the full text address, please click: https://blog.csdn.net/mrchengzp/article/ details/78508509?utm_source=copy

Guess you like

Origin blog.csdn.net/qq_41914687/article/details/82870255