VsCode 簡(jiǎn)介
微軟開(kāi)發(fā)的,基于Electron的一款免費(fèi)曹货、高效料滥、輕量級(jí)然眼、跨平臺(tái)的代碼編輯器。
Go語(yǔ)言的官方推薦編輯器葵腹。
最初版本是基于瀏覽器的開(kāi)發(fā)工具M(jìn)onaco Editor, 2015年又將Monaco Editor移植到桌面平臺(tái)上高每,就是今天的VS Code。 與Eclipse一樣使用插件的形式來(lái)擴(kuò)充其功能,但是與Eclipse不同践宴,插件并不運(yùn)行在主進(jìn)程中鲸匿,以保證其良好的性能。
VsCode 安裝
https://code.visualstudio.com/
同時(shí)vscode支持集成的terminal阻肩,建議安裝iterm2和相應(yīng)的主題
https://www.iterm2.com/downloads.html
VsCode 插件推薦
主題相關(guān)
indent-rainbow
One Dark Theme
Rainbow Brackets
vscode-iconsJava相關(guān)
Debugger for Java
Java Dependency Viewer
Java Extension Pack
Java Test Runner
Language Support for Java(TM) by Red Hat
Maven for Java其他語(yǔ)言
Python
Past JSON as Code
markdownlink
Markdown All in One
Go
Code Runner
JSON Tools團(tuán)隊(duì)協(xié)作
GitHub Pull Request
GitLens - Git supercharged
RemoteHub
SettingsSync
VS Live Share其他推薦
Vim
REST Client
Project Manager
Open iTerm2
VsCode 常用快捷鍵
- 交互式演練場(chǎng) ( Interactive Editor Playground)
- shell: install code in path
- 打開(kāi)termial
- 功能及命令
功能 | 命令 | 備注 |
---|---|---|
打開(kāi)文件 | code -r -g filename | |
打開(kāi)并跳轉(zhuǎn)到某行 | code -r -g filename:linenum | |
比較兩個(gè)文件并在vscode中顯示 | code -r -d file1 file2 | |
將命令結(jié)果在vscode文件中顯示 | "ls | code -r" |
- 命令面板:
功能 | 命令 | 備注 |
---|---|---|
打開(kāi)命令面板 | command+shift+p | |
打開(kāi)文件資源管理器 | command+shift+e | |
跨文件搜索 | command+shift+f | |
源代碼管理 | command+shift+g | |
啟動(dòng)和調(diào)試 | command+shift+d | |
管理擴(kuò)展 | command+shift+x |
- 文本操作
如果安裝了vim插件带欢,可以使用vim的命令來(lái)操作文本。
以下為無(wú)vim插件時(shí)烤惊,默認(rèn)快捷操作
- 光標(biāo)相關(guān):
功能 | 命令 | 備注 |
---|---|---|
光標(biāo)挪到行首 | command+ < | |
光標(biāo)挪到行末 | command+ > | |
光標(biāo)挪到單詞后 | opt+ > | |
光標(biāo)挪到單詞后 | opt+ > | |
撤銷(xiāo)光標(biāo)移動(dòng) | command+u | |
向下設(shè)置多行光標(biāo) | command+opt+下鍵頭 | |
向上設(shè)置多行光標(biāo) | command+opt+上鍵頭 |
- 文本操作:
功能 | 命令 | 備注 |
---|---|---|
刪除當(dāng)前行 | command+ shift+k | |
向前選中當(dāng)前單詞 | shift+opt+< | |
向后選中當(dāng)前單詞 | shift+opt+> | |
當(dāng)前行移至下行 | opt+下鍵頭 | |
當(dāng)前行移至上行 | opt+上鍵頭 | |
剪切當(dāng)前行 | command+x |