1.windows下使用vscode编写运行以及调试C/C++:
2.vscode-icons:VsCode插件之vscode-icons_天马3798-CSDN博客_vscode图标插件 vscode-icons-team.vscode-icons-8.1.0.vsix
Bookmarks: 标记,寻找代码。左侧有直通车,右键菜单里面
Rainbow Brackets:为圆括号,方括号和大括号提供彩虹色
Bracket Pair Colorizer:用于着色匹配括号
Project Manager:它可以帮助您轻松访问项目
GitLens:git日志查看插件https://marketplace.visualstudio.com/_apis/public/gallery/publishers/eamodio/vsextensions/gitlens/8.3.0/vspackage
高亮选中: highlight-icemode iceliu.highlight-icemode-0.0.6.vsix
TODO颜色显示:better comments aaron-bond.better-comments-2.0.5.vsix
window使用ssh: 【宇宙最强编辑器VS Code】(十)使用VS Code + SSH进行远程开发_Mculover666的博客(嵌入式)-CSDN博客_ssh 远程编辑器免输密码:把window的id_rsa.pub>>authorized_keys,剪切到远程服务器,重启vscode即可。添加好私钥:
IdentityFile "C:\Users\user_name\.ssh\id_rsa",域名要对给远程服务器安装vscode插件:就是把window里面的.vscode插件压缩成.zip格式,然后放到
服务器上.vscode/extension里面解压,注意c++插件有版本区分。早上可以下载.vsix文件:
尝试下载离线安装到远程服务器,然后安装。
powerTools: 用于log排序。
1.离线安装
下载历史版本。https://www.okcode.net/article/59181
离线安装:
vscode C/C++安装依赖问题,手动找到packet.jason文件, 从里面的url拷贝linux版本即可
esbenp.prettier-vscode-2.2.0.vsix
HookyQR.beautify-1.1.0.vsix
ms-vscode.cpptools-0.17.6.vsix
java跳转需要装redhat.java-0.64.1.vsix,并设置对应openjdk环境,
服务器手动安装vscode server
5.代码想要同时编辑多处:https://www.jb51.net/softjc/609020.html
[快捷键]vscode: Visual Studio Code 常用快捷键 - 魚魚 - 博客园
[清除空行]vscode 清除多余空行_二等碗-CSDN博客_vscode 删除空行
6.使用git提交:vscode使用git - 知乎
7.手动更新vscode
8.完全卸载:$sudo apt-get purge code;$cd ~ && rm -rf .vscode && rm -rf .config/Code
1.24.1推荐设置:
{
"remote.SSH.showLoginTerminal": true,
"remote.SSH.remotePlatform": {
"SZHVM00454.apac.bosch.com": "linux",
"huyilang": "linux",
"10.173.252.121": "linux",
"sghvm011034-vm.sgh.apac.bosch.com": "linux",
"SGHKVM0010": "linux",
"SZHVM00454": "linux"
},
"workbench.iconTheme": "vscode-icons",
"vsicons.dontShowNewVersionMessage": true,
"bracketPairColorizer.depreciation-notice": false,
"editor.snippetSuggestions": "top",
"editor.tabCompletion": "on",
"editor.formatOnSave": false,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.renderWhitespace": "all",
"editor.insertSpaces": true,
"editor.wrappingIndent": "same",
"editor.trimAutoWhitespace": false,
"files.trimTrailingWhitespace": true,
"editor.scrollBeyondLastLine": false,
"editor.tabSize": 4,
"editor.wordWrap": "on",
"editor.acceptSuggestionOnCommitCharacter": true,
"editor.acceptSuggestionOnEnter": "smart",
"editor.autoIndent": "full",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
},
"explorer.confirmDelete": false,
"search.followSymlinks": false,
"javascript.format.enable": true,
"javascript.format.insertSpaceAfterConstructor": true,
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true,
"emmet.showSuggestionsAsSnippets": true,
"json.format.enable": true,
"typescript.format.enable": true,
"C_Cpp.intelliSenseEngineFallback": "enabled",
"C_Cpp.clang_format_fallbackStyle": "{BasedOnStyle: WebKit, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Linux, MaxEmptyLinesToKeep: 1, BreakBeforeBraces: Allman, AlignAfterOpenBracket: true, IndentCaseLabels: true, NamespaceIndentation: None, AllowShortFunctionsOnASingleLine: None, KeepEmptyLinesAtTheStartOfBlocks: false, PointerAlignment: Right, AlignTrailingComments: true, SpacesBeforeTrailingComments: 4, ColumnLimit: 100}",
"C_Cpp.clang_format_style": "{BasedOnStyle: WebKit, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Linux, MaxEmptyLinesToKeep: 1, BreakBeforeBraces: Allman, IndentCaseLabels: true, AlignAfterOpenBracket: true, NamespaceIndentation: None, AllowShortFunctionsOnASingleLine: None, KeepEmptyLinesAtTheStartOfBlocks: false, PointerAlignment: Right, AlignTrailingComments: true, SpacesBeforeTrailingComments: 4, ColumnLimit: 100}",
"highlight-icemode.backgroundColor": "none",
"highlight-icemode.borderColor": "#c5293e",
"update.mode": "none",
"extensions.autoUpdate": false,
"extensions.autoCheckUpdates": false,
"terminal.integrated.enableMultiLinePasteWarning": false,
"restructuredtext.updateOnTextChanged": "false",
"python.pythonPath": "/usr/bin/python3.8",
"security.workspace.trust.untrustedFiles": "open",
"diffEditor.ignoreTrimWhitespace": false,
"git.path": "/usr/bin/git",
"DockerRun.DisableAutoGenerateConfig": true,
"extensions.ignoreRecommendations": true,
"files.autoSave": "afterDelay",
"cmake.configureOnOpen": true,
"window.zoomLevel": -1,
"editor.parameterHints": false,
"editor.wordBasedSuggestions": false,
"editor.suggestSelection": "recentlyUsed",
"editor.cursorSmoothCaretAnimation": true,
"workbench.list.smoothScrolling": true,
"editor.smoothScrolling": true,
"editor.cursorBlinking": "smooth",
"editor.mouseWheelZoom": true,
}
2.2.自定义代码段
设置:File->preferences->用户代码片段->新建全局代码片段文件
老版本,不用.开头,推荐用字母开头。
全面教程: [VS Code]跟我一起在Visual Studio Code 添加自定义snippet(代码段),附详细配置_狼行天下-CSDN博客
头注释:http://www.chensuyang.com/index.php/archives/345
2.3.使用find all reference
让VSCode支持 "Find all reference"_Empkin的专栏-CSDN博客_reference vscode
sudo apt-get install global
gtags
2.4.error:Visual Studio Code is unable to watch for file changes in this large workspace