??記錄一下個人在使用 VS Code 中的一些插件和設(shè)置胶逢。
??該配置在編寫 vue + iview 項目時使用软能。
文件路徑
- 用戶文件路徑:%AppData%/Code/User
- 用戶設(shè)置:settings.json
用戶設(shè)置如下
{
/* 編輯器:開始 */
// 控制字體系列。
"editor.fontFamily": "Monaco",
// 控制編輯器在鍵入一行后是否自動格式化該行慌闭。
"editor.formatOnType": true,
// 以像素為單位控制字符間距凉馆。
"editor.letterSpacing": 0.618,
// 控制是否顯示小地圖峰搪。
"editor.minimap.enabled": false,
// 控制是否在鍵入時自動顯示建議。
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
// 一個制表符等于的空格數(shù)。
// 在 `editor.detectIndentation` 啟用時奇唤,根據(jù)文件內(nèi)容逊抡,該設(shè)置可能會被覆蓋南誊。
"editor.tabSize": 2,
// 控制折行的方式了罪。
// - off: 永不換行。
// - on: 將在視區(qū)寬度處換行。
// - wordWrapColumn: 在 `editor.wordWrapColumn` 處折行科侈。
// - bounded: 在視區(qū)寬度和 `editor.wordWrapColumn` 中的較小值處折行载佳。
"editor.wordWrap": "on",
/* 編輯器:結(jié)束 */
/* 工作臺:開始 */
// 指定在工作臺中使用的圖標(biāo)主題,或指定 "null" 以不顯示任何文件圖標(biāo)臀栈。
// - null: 無文件圖標(biāo)
// - vs-minimal
// - vs-seti
// - material-icon-theme
"workbench.iconTheme": "material-icon-theme",
/* 工作臺:結(jié)束 */
/* 文件:開始 */
// 控制已更新文件的自動保存蔫慧。可在[此處](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save)閱讀有關(guān)自動保存的詳細(xì)信息权薯。
// - off: 永不自動保存更新后的文件姑躲。
// - afterDelay: 當(dāng)文件修改后的時間超過 `files.autoSaveDelay` 中配置的值時自動進(jìn)行保存。
// - onFocusChange: 編輯器失去焦點(diǎn)時自動保存更新后的文件盟蚣。
// - onWindowChange: 窗口失去焦點(diǎn)時自動保存更新后的文件黍析。
"files.autoSave": "afterDelay",
/* 文件:結(jié)束 */
/* 集成終端:開始 */
// 控制終端的字體系列,默認(rèn)為 `editor.fontFamily` 的值屎开。
"terminal.integrated.fontFamily": "Consolas, 'Courier New', monospace",
/* 集成終端:結(jié)束 */
/* 導(dǎo)航路徑:開始 */
// 啟用/禁用導(dǎo)航路徑
"breadcrumbs.enabled": true,
/* 導(dǎo)航路徑:結(jié)束 */
/* Git:開始 */
// 是否啟用 Git阐枣。
"git.enabled": true,
// 是否啟用自動刷新。(由于Git不停的刷新導(dǎo)致卡頓時可以禁用自動刷新,無卡頓略過這里)
"git.autorefresh": false,
/* Git:結(jié)束 */
/* ESLint:開始 */
// Turns auto fix on save on or off.
"eslint.autoFixOnSave": true,
// The eslint options object to provide args normally passed to eslint when executed from a command line (see http://eslint.org/docs/developer-guide/nodejs-api#cliengine).
"eslint.options": {
"rules": {
"quotes": ["error", "single"],
"semi": ["error", "always"],
}
},
// An array of language ids which should be validated by ESLint
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
{
"language": "vue",
"autoFix": true
}
],
/* ESLint:結(jié)束 */
/* prettier:開始 */
// Whether to add a semicolon at the end of every line
"prettier.semi": true,
// If true, will use single instead of double quotes
"prettier.singleQuote": true,
/* prettier:結(jié)束 */
/* vetur:開始 */
// Default formatter for <template> region
// - none: disable formatting
// - js-beautify-html: html formatter of js-beautify
"vetur.format.defaultFormatter.html": "js-beautify-html",
/* vetur:結(jié)束 */
}
安裝的擴(kuò)展
- Auto Close Tag
- Auto Rename Tag
- Bookmarks
- Bracket Pair Colorizer
- Chinese (Simplified) Language Pack for Visual Studio Code
- ESLint
- iview-snippets
- JavaScript (ES6) code snippets
- Markdown Preview Enhanced
- Material Icon Theme
- SVN
- Vetur
關(guān)于本文
- 作者:俠骨留香
- 時間:2018年09月20日
- 聯(lián)系作者:xiaguliuxiang@foxmail.com