Front-end development Editor's Choice

  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 the  Ctrl+P mode
  • In  Ctrl+P the input  > can enter  Ctrl+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

常用快捷键

编辑器与窗口管理

  1. 打开一个新窗口: Ctrl+Shift+N
  2. 关闭窗口: Ctrl+Shift+W
  3. 同时打开多个编辑器(查看多个文件)
  4. 新建文件 Ctrl+N
  5. 文件之间切换 Ctrl+Tab
  6. 切出一个新的编辑器(最多 3 个) Ctrl+\,也可以按住 Ctrl 鼠标点击 Explorer 里的文件名
  7. 左中右 3 个编辑器的快捷键 Ctrl+1 Ctrl+2 Ctrl+3
  8. 3 个编辑器之间循环切换 Ctrl+
  9. 编辑器换位置, Ctrl+k然后按 Left或 Right

代码编辑

格式调整

  1. 代码行缩进 Ctrl+[ 、 Ctrl+]
  2. Ctrl+C 、 Ctrl+V 复制或剪切当前行/当前选中内容
  3. 代码格式化: Shift+Alt+F,或 Ctrl+Shift+P 后输入 format code
  4. 上下移动一行: Alt+Up 或 Alt+Down
  5. 向上向下复制一行: Shift+Alt+Up 或 Shift+Alt+Down
  6. 在当前行下边插入一行 Ctrl+Enter
  7. 在当前行上方插入一行 Ctrl+Shift+Enter

光标相关

  1. 移动到行首: Home
  2. 移动到行尾: End
  3. 移动到文件结尾: Ctrl+End
  4. 移动到文件开头: Ctrl+Home
  5. 移动到定义处: F12
  6. 定义处缩略图:只看一眼而不跳转过去 Alt+F12
  7. 移动到后半个括号: Ctrl+Shift+]
  8. 选择从光标到行尾: Shift+End
  9. 选择从行首到光标处: Shift+Home
  10. 删除光标右侧的所有字: Ctrl+Delete
  11. 扩展/缩小选取范围: Shift+Alt+Left 和 Shift+Alt+Right
  12. 多行编辑(列编辑):Alt+Shift+鼠标左键Ctrl+Alt+Down/Up
  13. 同时选中所有匹配: Ctrl+Shift+L
  14. Ctrl+D 下一个匹配的也被选中 (在 sublime 中是删除当前行,后面自定义快键键中,设置与 Ctrl+Shift+K 互换了)
  15. 回退上一个光标操作: Ctrl+U

重构代码

  1. 找到所有的引用: Shift+F12
  2. 同时修改本文件中所有匹配的: Ctrl+F12
  3. 重命名:比如要修改一个方法名,可以选中后按 F2,输入新的名字,回车,会发现所有的文件都修改了
  4. 跳转到下一个 Error 或 Warning:当有多个错误时可以按 F8 逐个跳转
  5. 查看 diff: 在 explorer 里选择文件右键 Set file to compare,然后需要对比的文件上右键选择 Compare with file_name_you_chose

查找替换

  1. 查找 Ctrl+F
  2. 查找替换 Ctrl+H
  3. 整个文件夹中查找 Ctrl+Shift+F

显示相关

  1. 全屏:F11
  2. zoomIn/zoomOut:Ctrl +/-
  3. 侧边栏显/隐:Ctrl+B
  4. 显示资源管理器 Ctrl+Shift+E
  5. 显示搜索 Ctrl+Shift+F
  6. 显示 Git Ctrl+Shift+G
  7. 显示 Debug Ctrl+Shift+D
  8. 显示 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

Guess you like

Origin blog.csdn.net/qq_40128701/article/details/90639615