VSCode
安装
bash
dpkg -i ./code_1.80.1-1689183569_amd64.deb
注释 apt 源
安装 vsocde 的时候,apt 里会生成微软的 vscode 源,速度比较满,如果不想每次 update 时,卡一会可以先关闭,等需要升级 vscode 时再打开
bash
# vim /etc/apt/sources.list.d/vscode.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
配置
json
{
"diffEditor.wordWrap": "off",
"diffEditor.codeLens": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.cursorSmoothCaretAnimation": "on",
"editor.find.autoFindInSelection": "multiline",
// 控制编辑器是否自动折叠导入范围。
"editor.foldingImportsByDefault": true,
"editor.fontFamily": "'JetBrains Mono', '鸿蒙黑体', 'MiSans L3'",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.fontWeight": "400",
"editor.letterSpacing": 0,
"editor.formatOnPaste": true,
"editor.lineHeight": 1.5,
"editor.formatOnSave": true,
"editor.guides.bracketPairs": true,
"editor.lineNumbers": "relative",
"editor.linkedEditing": true,
"editor.mouseWheelZoom": true,
"editor.scrollbar.scrollByPage": true,
"editor.smoothScrolling": true,
"editor.suggest.insertMode": "replace",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.tabCompletion": "onlySnippets",
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 120,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.vueIndentScriptAndStyle": true,
"prettier.printWidth": 120,
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"prettier.bracketSameLine": true,
"[php]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "junstyle.php-cs-fixer"
},
"[markdown][css]": {
"editor.tabSize": 4,
"prettier.tabWidth": 4
},
"[html]": {
"prettier.htmlWhitespaceSensitivity": "ignore"
},
"workbench.enableExperiments": false,
"workbench.list.smoothScrolling": true,
"workbench.settings.editor": "json",
"workbench.settings.useSplitJSON": true,
"workbench.startupEditor": "none",
"window.closeWhenEmpty": true,
"window.menuBarVisibility": "classic",
"files.autoGuessEncoding": true,
"files.autoSave": "onFocusChange",
"files.eol": "auto",
"files.insertFinalNewline": false,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"explorer.incrementalNaming": "smart",
"search.actionsPosition": "auto",
"search.collapseResults": "auto",
"search.showLineNumbers": true,
"search.smartCase": true,
"update.mode": "manual",
"extensions.autoCheckUpdates": false,
"extensions.ignoreRecommendations": true,
"problems.showCurrentInStatus": true,
"todo-tree.highlights.defaultHighlight": {
"icon": "alert",
"foreground": "#ecf5ff",
"background": "#409eff",
"rulerColour": "#409eff",
"iconColour": "#409eff",
"rulerLane": "full",
"gutterIcon": true,
"type": "tag"
},
"todo-tree.highlights.customHighlight": {
"BUG": {
"foreground": "#000000",
"background": "#f56c6c",
"rulerColour": "#f56c6c",
"iconColour": "#f56c6c"
},
"TODO": {
"icon": "check"
},
"FIXME": {
"foreground": "#000000",
"background": "#FFFF00",
"rulerColour": "#FFFF00",
"iconColour": "#FFFF00"
}
},
// 使用 path-intellisense 禁用vscode自带路径智能感知
"typescript.suggest.paths": false,
"javascript.suggest.paths": false,
"markdown.suggest.paths.enabled": false,
"npm-intellisense.importLinebreak": ";\n",
"terminal.integrated.profiles.windows": {
"pwsh": {
"path": "C:\\sf\\pwsh\\pwsh.exe",
"icon": "terminal-powershell"
}
},
"terminal.external.windowsExec": "C:\\sf\\pwsh\\pwsh.exe",
"terminal.integrated.defaultProfile.windows": "pwsh",
"workbench.iconTheme": "material-icon-theme",
"update.showReleaseNotes": false,
"php-cs-fixer.executablePath": "C:\\php\\tools\\php-cs-fixer-v3.phar",
"php-cs-fixer.rules": "@PhpCsFixer",
// "php.validate.executablePath": "C:\\php\\84\\php.exe",
"editor.rulers": [
{
"column": 80,
"color": "#FFFF004D"
},
{
"column": 120,
"color": "#FFFFFF4D"
}
],
"files.associations": {
"*.sgml": "xml"
},
"extensions.experimental.affinity": {
"asvetliakov.vscode-neovim": 1
},
"diffEditor.hideUnchangedRegions.enabled": true,
"workbench.colorTheme": "One Dark Pro"
}
json
// 将键绑定放在此文件中以覆盖默认值
[
{
"key": "ctrl+shift+alt+p",
"command": "projectManager.listProjectsNewWindow"
},
{
"key": "ctrl+k ctrl+shift+r",
"command": "workbench.action.reloadWindow"
},
{
"key": "ctrl+shift+oem_2",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+j",
"command": "editor.action.joinLines"
},
{
"key": "ctrl+k ctrl+shift+u",
"command": "editor.action.transformToLowercase"
},
{
"key": "ctrl+k ctrl+u",
"command": "editor.action.transformToUppercase",
"when": "editorTextFocus && !editorReadonly"
}
/* {
"key": "ctrl+k ctrl+c",
"command": "-editor.action.addCommentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+k ctrl+u",
"command": "-editor.action.removeCommentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+a",
"command": "-editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+i",
"command": "-extension.vim_ctrl+i",
"when": "editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl"
},
{
"key": "ctrl+j",
"command": "-extension.vim_ctrl+j",
"when": "editorTextFocus && vim.active && vim.use<C-j> && !inDebugRepl"
} */
]