注意事项(坑)
有时候快捷键不起作用,原因可能是因为正处于中文输入法的状态。切换会英文输入法就ok了。
Visual Studio Code
- go to definition 跳转到定义 >>> F12
- go to declaration 跳转到声明 >>>
- go to references 跳转到引用 >>> shift + F12
- find all references 查找所有引用 >>> option + shift + F12
- go forward 前进(返回上一个浏览位置)>>> ctrl + -
- go back 后退(下一个浏览位置)>>> ctrl + shift + -
- go to file 跳转到文件 >>> command + P
- go to line 跳转到指定行 >>> command + P 然后再输入冒号: 和 行号
- go to symbol in editor 跳转到编辑器中的指定符号(相当于本文件内搜索) >>> command + P 然后再输入@ 和 内容
- go to symbol in workspace 跳转到工作空间中的指定符号(相当于整个工程中搜索) >>> command + P 然后再输入 # 和 内容
- help 查看帮助 >>> command + P 然后再输入> 和 内容
- fold 折叠 >>> option + command + [
- unfold 展开 >>> option + command + ]
- fold all 全部折叠 >>> 先按command + K,再输入command + 0
- unfold all 全部展开 >>> 先按command + K,再输入command + J
- toggle line comment 行注释 >>> command + /
- undo 撤销 >>> command + z
- redo 重做 >>> shift + command + z
- find 本文件内查找 >>> command + F
- find in files 全文件查找 >>> shift + command + F
- replace 本文件内替换 >>> option + command + F
- replace in files 全文件替换 >>> shift + command + H
- copy 复制 >>> command + c
- paste 粘贴 >>> command + v
- highlight 高亮变量 >>> 安装插件highlight-words,选中要高亮的代码,按F1 ,执行Highlight Toggle Current即可高亮当前选中文本。
Xcode
- go to definition 跳转到定义 >>> 右键菜单操作
- go to declaration 跳转到声明 >>> 右键菜单操作
- go to references 跳转到引用 >>> 右键菜单操作
- find all references 查找所有引用 >>> 右键菜单操作
- go forward 前进(返回上一个浏览位置)>>> 界面操作
- go back 后退(下一个浏览位置)>>> 同上
- go to file 跳转到文件 >>> command + shift + O
- go to line 跳转到指定行 >>> command + L
- go to symbol in editor 跳转到编辑器中的指定符号(相当于本文件内搜索) >>> 右键菜单操作
- go to symbol in workspace 跳转到工作空间中的指定符号(相当于整个工程中搜索) >>> 右键菜单操作
- help 查看帮助 >>>
- fold 折叠 >>> command + option + 左箭头
- unfold 展开 >>> command + option + 右箭头
- fold all 全部折叠 >>> command + option + shift + 左箭头
- unfold all 全部展开 >>> command + option + shift + 右箭头
- toggle line comment 行注释 >>> command + /
- undo 撤销 >>> command + Z
- redo 重做 >>> command + shift + Z
- find 本文件内查找 >>> command + F
- find in files 全文件查找 >>> command + shift + F
- replace 本文件内替换 >>> command + option + F
- replace in files 全文件替换 >>> command + option + shift + F
- copy 复制 >>> command + C
- paste 粘贴 >>> command + V
- highlight 高亮变量 >>> command + ctrl + E
- 在新标签打开文件 >>> 双击navigation文件标签,下一个文件就会在新选项卡打开
Android Studio
所有快捷键列表可以查看Android Studio -> Preferences -> Keymap ,如下:
- 查看最近访问的文件列表 >>> comand + E
- go to definition 跳转到定义 >>> comand + option + B
- go to declaration 跳转到声明 >>>
- go to references 跳转到引用 >>> option + F7
- find all references 查找所有引用 >>>
- go forward 前进(返回上一个浏览位置)>>> command + ]
- go back 后退(下一个浏览位置)>>> command + [
- go to file 跳转到文件 >>> command + shift + O
- go to line 跳转到指定行 >>> command + L
- go to symbol in editor 跳转到编辑器中的指定符号(相当于本文件内搜索) >>>
- go to symbol in workspace 跳转到工作空间中的指定符号(相当于整个工程中搜索) >>>
- help 查看帮助 >>>
- fold 折叠 >>> command + -
- unfold 展开 >>> command + +
- fold all 全部折叠 >>>
- unfold all 全部展开 >>>
- toggle line comment 行注释 >>> command + /
- undo 撤销 >>> command + z
- redo 重做 >>> shift + command + z
- find 本文件内查找 >>> command + F
- find in files 全文件查找 >>> shift + command + F
- replace 本文件内替换 >>> option + command + F
- replace in files 全文件替换 >>> shift + command + H
- copy 复制 >>> command + c
- paste 粘贴 >>> command + v
- highlight 高亮变量 >>> command + shift +F7
- 取消高亮 >>> esc