键盘快捷键 - OSX

警告

这个主题是一个草案,并可能包含错误的信息。

编辑

⌘+ X 删除线

⌘+↩ 后插入线

⌘+⇧+↩ 之前插入线

⌘+ ^ +↑ 招行/向上选择

⌘+ ^ +↓ 招行/向下选择

⌘+ L 选择行 - 重复选择下一行

⌘+ D 选择一个单词 - 选择重复别人发生

^ + M 跳转到右括号重复跳到打开括号

^ +⇧+ M 选择当前括号内的所有内容

⌘+ K,⌘+ K 从光标删除到行尾

⌘+ K +⌫ 从光标到行首删除

⌘+] 缩进当前路线

⌘+ [ 取消缩进当前行(S)

⌘+⇧+ D 重复路线

⌘+ J 加入以下行到当前行的结尾

⌘+ / 注释/取消注释当前行

⌘+⌥+ / 块注释当前选择

⌘+ Y 重做,或重复过去的键盘快捷键的命令

⌘+⇧+ V 粘贴和正确的缩进

^ +空间 选择下自动完成建议

^ + U 软撤消; 跳转到撤消变更前的最后一次变化时,反复

^ +⇧+向上 列选择了

^ +⇧+向下 列选择向下

导航/转到任何地方

⌘+ P 快速打开的文件的名字

⌘+ R 转到符号

在当前文件转到字

^ + G 转到行当前文件

一般

⌘+⇧+ P 命令提示符

⌘+ K,⌘+ B 切换侧边栏

^ +⇧+ P 显示范围在状态栏

查找/替换

⌘+ F 发现

⌘+⌥+ F 更换

⌘+⇧+ F 在文件中查找

标签

⌘+⇧+ T 打开上次关闭的标签

^ + Tab键 通过标签循环起来

⇧+ ^ + Tab键 周期向下的标签

在文件中查找

拆分窗口

⌘+⌥+ 2 鉴于拆分成两列

⌘+⌥+ 1 回复以单列

⌘+⌥+ 5 将视图设置为网格(4组)

^ + [NUM] 跳转到群里num是1-4

^ +⇧+ [NUM] 移动文件到指定的组,其中num为1-4

书签

⌘+ F2 切换书签

F2 下一个书签

⇧+ F2 上一个书签

⇧+⌘+ F2 清除书签

文本操作

⌘+ K,⌘+ U 转换为大写

⌘+ K,⌘+ L 转换为小写

Keyboard Shortcuts - OSX

Warning

This topic is a draft and may contain wrong information.

Editing

KeypressCommand

⌘ + X Delete line

⌘ + ↩ Insert line after

⌘ + ⇧ + ↩ Insert line before

⌘ + ⌃ + ↑ Move line/selection up

⌘ + ⌃ + ↓ Move line/selection down

⌘ + L Select line - Repeat to select next lines

⌘ + D Select word - Repeat select others occurrences

⌃ + M Jump to closing parentheses Repeat to jump to opening parentheses

⌃ + ⇧ + M Select all contents of the current parentheses

⌘ + K, ⌘ + K Delete from cursor to end of line

⌘ + K + ⌫ Delete from cursor to start of line

⌘ + ] Indent current line(s)

⌘ + [ Un-indent current line(s)

⌘ + ⇧ + D Duplicate line(s)

⌘ + J Join line below to the end of the current line

⌘ + / Comment/un-comment current line

⌘ + ⌥ + / Block comment current selection

⌘ + Y Redo, or repeat last keyboard shortcut command

⌘ + ⇧ + V Paste and indent correctly

⌃ + Space Select next auto-complete suggestion

⌃ + U Soft undo; jumps to your last change before undoing change when repeated

⌃ + ⇧ + Up Column selection up

⌃ + ⇧ + Down Column selection down

KeypressCommand

⌘ + P Quick-open files by name

⌘ + R Goto symbol

Goto word in current file

⌃ + G Goto line in current file

General

KeypressCommand

⌘ + ⇧ + P Command prompt

⌘ + K, ⌘ + B Toggle side bar

⌃ + ⇧ + P Show scope in status bar

Find/Replace

KeypressCommand

⌘ + F Find

⌘ + ⌥ + F Replace

⌘ + ⇧ + F Find in files

Tabs

KeypressCommand

⌘ + ⇧ + t Open last closed tab

^ + Tab Cycle up through tabs

⇧ + ^ + Tab Cycle down through tabs

Find in files

Split window

KeypressCommand

⌘ + ⌥ + 2 Split view into two columns

⌘ + ⌥ + 1 Revert view to single column

⌘ + ⌥ + 5 Set view to grid (4 groups)

⌃ + [NUM] Jump to group where num is 1-4

⌃ + ⇧ + [NUM] Move file to specified group where num is 1-4

Bookmarks

KeypressCommand

⌘ + F2 Toggle bookmark

F2 Next bookmark

⇧ + F2 Previous bookmark

⇧ + ⌘ + F2 Clear bookmarks

Text manipulation

KeypressCommand

⌘ + K, ⌘ + U Transform to Uppercase

⌘ + K, ⌘ + L Transform to Lowercase