基于vscode的前端开发环境

2019-03-22  本文已影响0人  我有丶一个大西瓜

语言包

中文包: Chinese (Simplified) Language Pack for Visual Studio Code

外观设置

主题: Solarized Dark

{
  "workbench.colorTheme": "Solarized Dark"
}

图标: VSCode Great Icons

ext install EditorConfig
{
  "workbench.iconTheme": "vscode-great-icons"
}

字体: Fira Code

缩进: Guides

ext install Guides
{
    "guides.normal.color.dark": "rgba(91, 91, 91, 0.6)",
    "guides.normal.color.light": "rgba(220, 220, 220, 0.7)",
    "guides.active.color.dark": "rgba(210, 110, 210, 0.6)",
    "guides.active.color.light": "rgba(200, 100, 100, 0.7)",
    "guides.active.style": "dashed",
    "guides.normal.style": "dashed",
    "guides.stack.style": "dashed",
}
javascript console utils
// 一键生成
cmd+shift+L
// 删除所有console
cmd+shift+D

风格检查

缩进方式: EditorConfig 通过简单的配置文件在不同团队成员、不同 IDE、不同平台下约定好文件的缩进方式、编码格式,避免出现混乱

ext install EditorConfig

new .editorconfig file in the root directory

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
indent_style = space
indent_size = 2

[{*.yml,*.json}]
indent_style = space
indent_size = 2

代码格式化: Prettier

ext install esbenp.prettier-vscode

vue格式化: Vetur

ext install Vetur

snippets(自定义代码片段) 神器!

自动补全

功能增强

编码效率

Document This 能够一键给代码中的类、函数加上注释,支持函数声明、函数表达式、箭头函数等

Code Spell Checker 实时的识别单词拼写是否有误,并给出提示
Code Runner 选中要执行的代码鼠标右键run code

插件管理工具(Settings Sync)

Settings Sync
使用GitHub Gist跨多台机器同步设置、代码片段、主题、文件图标、启动、键绑定、工作区和扩展。

简单的事情重复化,重复的事情标准化,标准的事情自动化

能让你开发效率翻倍的 VSCode 插件配置(上)
能让你开发效率翻倍的 VSCode 插件配置(中)

后续会更新更多使用技巧..........

上一篇 下一篇

猜你喜欢

热点阅读