Before I get into the Vue environment development, I have been using Submile Text3 editor.
Sublime Text: has a code highlighting, syntax tips, auto-complete and rapid response editing software, not only has a gorgeous interface, also supports plug-ins extension mechanism, used her to write code, is a real pleasure. Compared to the difficult-to-use Vim, edema heavy Eclipse, even if lightweight prompt start of Editplus, Notepad ++, in front of a large SublimeText slightly pale, no doubt this very sexy Editor is a favorite choice of front-end development.
But why give up Submile Text3 use VS code editor instead of it? May be the version I downloaded Submile Text3 editor wrong, I tried to re-download, but access to the site by a wall, try a long time or can not be solved, can not do whatever they want to use package control I need to install the plug. Vue cause my code can not highlighting, syntax tips.
First, the first thing after installing VS code, I was the editor download a Chinese plug-in:
1) Open the vscode tools;
2) Use the shortcut key combination [Ctrl + Shift + p], enter "configure display language" in the search box, click OK;
3) Modify Attribute "locale" under locale.json file "zh-cn";
4) Restart vscode tools;
If restarting vscode menus are still displayed in English, see the installed plug-in stores, the Chinese plug reinstall it again (as shown below), and then restart the tool.
Two, VS code editor commonly used shortcut keys:
Main command box
F1
Or Ctrl+Shift+P
: Open the command panel. In the input box is opened, you can enter any command, such as:
- Click
Backspace
will enter theCtrl+P
mode - In
Ctrl+P
the input>
can enterCtrl+Shift+P
mode
In the Ctrl+P
next window you can also:
- Directly enter the file name, jump to file
?
It lists the current executable actions!
显示Errors
或Warnings
,也可以Ctrl+Shift+M
:
跳转到行数,也可以Ctrl+G
直接进入@
跳转到symbol
(搜索变量或者函数),也可以Ctrl+Shift+O
直接进入@
根据分类跳转symbol
,查找属性或函数,也可以Ctrl+Shift+O
后输入:进入#
根据名字查找symbol
,也可以Ctrl+T
常用快捷键
编辑器与窗口管理
- 打开一个新窗口:
Ctrl+Shift+N
- 关闭窗口:
Ctrl+Shift+W
- 同时打开多个编辑器(查看多个文件)
- 新建文件
Ctrl+N
- 文件之间切换
Ctrl+Tab
- 切出一个新的编辑器(最多
3
个)Ctrl+\
,也可以按住Ctrl
鼠标点击Explorer
里的文件名 - 左中右
3
个编辑器的快捷键Ctrl+1
Ctrl+2
Ctrl+3
3
个编辑器之间循环切换Ctrl+
- 编辑器换位置,
Ctrl+k
然后按Left
或Right
代码编辑
格式调整
- 代码行缩进
Ctrl+[
、Ctrl+]
Ctrl+C
、Ctrl+V
复制或剪切当前行/当前选中内容- 代码格式化:
Shift+Alt+F
,或Ctrl+Shift+P
后输入format code
- 上下移动一行:
Alt+Up
或Alt+Down
- 向上向下复制一行:
Shift+Alt+Up
或Shift+Alt+Down
- 在当前行下边插入一行
Ctrl+Enter
- 在当前行上方插入一行
Ctrl+Shift+Enter
光标相关
- 移动到行首:
Home
- 移动到行尾:
End
- 移动到文件结尾:
Ctrl+End
- 移动到文件开头:
Ctrl+Home
- 移动到定义处:
F12
- 定义处缩略图:只看一眼而不跳转过去
Alt+F12
- 移动到后半个括号:
Ctrl+Shift+]
- 选择从光标到行尾:
Shift+End
- 选择从行首到光标处:
Shift+Home
- 删除光标右侧的所有字:
Ctrl+Delete
- 扩展/缩小选取范围:
Shift+Alt+Left
和Shift+Alt+Right
- 多行编辑(列编辑):
Alt+Shift+鼠标左键
,Ctrl+Alt+Down/Up
- 同时选中所有匹配:
Ctrl+Shift+L
Ctrl+D
下一个匹配的也被选中 (在 sublime 中是删除当前行,后面自定义快键键中,设置与Ctrl+Shift+K
互换了)- 回退上一个光标操作:
Ctrl+U
重构代码
- 找到所有的引用:
Shift+F12
- 同时修改本文件中所有匹配的:
Ctrl+F12
- 重命名:比如要修改一个方法名,可以选中后按
F2
,输入新的名字,回车,会发现所有的文件都修改了 - 跳转到下一个
Error
或Warning
:当有多个错误时可以按F8
逐个跳转 - 查看
diff
: 在explorer
里选择文件右键Set file to compare
,然后需要对比的文件上右键选择Compare with file_name_you_chose
查找替换
- 查找
Ctrl+F
- 查找替换
Ctrl+H
- 整个文件夹中查找
Ctrl+Shift+F
显示相关
- 全屏:
F11
- zoomIn/zoomOut:
Ctrl +/-
- 侧边栏显/隐:
Ctrl+B
- 显示资源管理器
Ctrl+Shift+E
- 显示搜索
Ctrl+Shift+F
- 显示 Git
Ctrl+Shift+G
- 显示 Debug
Ctrl+Shift+D
- 显示 Output
Ctrl+Shift+U
三、前端开发必备插件
- PostCSS Sorting
- stylelint
- stylefmt
- ESLint
- javascript standard format
- beautify
- Babel ES6/ES7
- Debugger for Chrome
- Add jsdoc comments
- javascript(ES6) code snippets
- vue
- weex
- Reactjs code snippets
- React Native Tools
- Npm Intellisense
- Instant Markdown
- Markdown Shortcuts
- TextTransform