Sublime Text 3 Shortcuts

Sublime Text 3 shortcuts

Ctrl+Shift+P: Open the command palette
Ctrl+P: Search for files in the project
Ctrl+G: Jump to the line
Ctrl+W: Close the currently open file
Ctrl+Shift+W: Close all open files
Ctrl+Shift+ V: Paste and format
Ctrl+D: Select word, repeat to add Select the next same word
Ctrl+L: Select line, repeat to add next line
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 label content
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 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, write comment description
Ctrl+Shift+A: select the current label Before and after, modify the
F11 used by the label: full screen
Shift+F11: Full-screen DND mode, only edit the current file
Alt+F3: Select all the same words
Alt+.: Close tabs
Alt+Shift+Number: Split screen display
Alt+Number: Switch to open the Nth file
Shift+Right drag: Cursor No, it is used to change or insert column content.
The mouse forward and backward keys can switch Tab files.
Press Ctrl, click or select in turn, and
press Ctrl+Shift+up and down keys for multiple positions that need to be edited to replace rows.

select class

Ctrl+D  selects the text occupied by the cursor, and continues to select the next same text.

Alt+F3  select the text and press the shortcut key to select all the same text at one time for simultaneous editing. Example: 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 Shift+↓  .

Ctrl+Shift+L  selects multiple lines first, and then presses 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 within the brackets (continues to select the parent bracket). For example: Quickly select and delete the code in the function, rewrite the function body code or rewrite the content in the parentheses.

Ctrl+M  Moves the cursor to the end or start of the brackets.

Ctrl+Enter  inserts a new line on the next line. For example: 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 on the previous line. For example: even if the cursor is not at the beginning of the line, it can quickly insert a line up.

Ctrl+Shift+[ 选中代码,按下快捷键,折叠代码。

Ctrl+Shift+] 选中代码,按下快捷键,展开代码。

Ctrl+K+0 展开所有折叠代码。

Ctrl+← 向左单位性地移动光标,快速移动光标。

Ctrl+→ 向右单位性地移动光标,快速移动光标。

shift+↑ 向上选中多行。

shift+↓ 向下选中多行。

Shift+← 向左选中文本。

Shift+→ 向右选中文本。

Ctrl+Shift+← 向左单位性地选中文本。

Ctrl+Shift+→ 向右单位性地选中文本。

Ctrl+Shift+↑ 将光标所在行和上一行代码互换(将光标所在行插入到上一行之前)。

Ctrl+Shift+↓ 将光标所在行和下一行代码互换(将光标所在行插入到下一行之后)。

Ctrl+Alt+↑ 向上添加多行光标,可同时编辑多行。

Ctrl+Alt+↓ 向下添加多行光标,可同时编辑多行。

编辑类

Ctrl+J 合并选中的多行代码为一行。举个栗子:将多行格式的CSS属性合并为一行。

Ctrl+Shift+D 复制光标所在整行,插入到下一行。

Tab 向右缩进。

Shift+Tab 向左缩进。

Ctrl+K+K 从光标处开始删除代码至行尾。

Ctrl+Shift+K 删除整行。

Ctrl+/ 注释单行。

Ctrl+Shift+/ 注释多行。

Ctrl+K+U 转换大写。

Ctrl+K+L 转换小写。

Ctrl+Z 撤销。

Ctrl+Y 恢复撤销。

Ctrl+U 软撤销,感觉和 Gtrl+Z 一样。

Ctrl+F2 设置书签

Ctrl+T 左右字母互换。

F6 单词检测拼写

搜索类

Ctrl+F 打开底部搜索框,查找关键字。

Ctrl+shift+F 在文件夹内查找,与普通编辑器不同的地方是sublime允许添加多个文件夹进行查找,略高端,未研究。

Ctrl+P 打开搜索框。举个栗子:1、输入当前项目中的文件名,快速搜索文件,2、输入@和关键字,查找文件中函数名,3、输入:和数字,跳转到文件中该行代码,4、输入#和关键字,查找变量名。

Ctrl+G 打开搜索框,自动带:,输入数字跳转到该行代码。举个栗子:在页面代码比较长的文件中快速定位。

Ctrl+R 打开搜索框,自动带@,输入关键字,查找文件中的函数名。举个栗子:在函数较多的页面快速查找某个函数。

Ctrl+: 打开搜索框,自动带#,输入关键字,查找文件中的变量名、属性名等。

Ctrl+Shift+P 打开命令框。场景栗子:打开命名框,输入关键字,调用sublime text或插件的功能,例如使用package安装插件。

Esc 退出光标多行选择,退出搜索框,命令框等。

显示类

Ctrl+Tab 按文件浏览过的顺序,切换当前窗口的标签页。

Ctrl+PageDown 向左切换当前窗口的标签页。

Ctrl+PageUp 向右切换当前窗口的标签页。

Alt+Shift+1 窗口分屏,恢复默认1屏(非小键盘的数字)

Alt+Shift+2 左右分屏-2列

Alt+Shift+3 左右分屏-3列

Alt+Shift+4 左右分屏-4列

Alt+Shift+5 等分4屏

Alt+Shift+8 垂直分屏-2屏

Alt+Shift+9 垂直分屏-3屏

Ctrl+K+B 开启/关闭侧边栏。

F11 全屏模式

Shift+F11 免打扰模式

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324689468&siteId=291194637