VS Code
VS Code
VS Code(Visual Studio Code)是由微软研发的一款免费、开源的跨平台文本(代码)编辑器。几乎完美的编辑器。
官网:https://code.visualstudio.com
文档:https://code.visualstudio.com/docs
源码:https://github.com/Microsoft/vscode
本文所使用VS Code版本:1.2.0,1.3.1
如果从官网下载的vscode为英文版(1.39.2),可以安装语言包
集成Git
支持git提交
vscode默认已集成git,支持git提交,查看修改列表。

Git History
地址:https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
安装:ext install githistory
Features
- View the details of a commit, such as author name, email, date, committer name, email, date and comments.
- View a previous copy of the file or compare it against the local workspace version or a previous version.
- View the changes to the active line in the editor (Git Blame).
- Configure the information displayed in the list
- Use keyboard shortcuts to view history of a file or line
同步vs code 扩展和设置
让vs code的设置,偏好,快捷键设置,扩展等等数据在多台机器上保持同步。
把vs code的数据托管在github的gist服务器,其它机器就可以同步配置和扩展。
扩展:settings sync
文档:https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
安装:ext install code-settings-sync
1. 上传配置到gist
1、Shift + Alt + u 输入在github为vs code创建的 Personal Access Tokens,回车
2、保存 gist id
3、Shift + Alt + u 保存过一次之后,再按此快捷键就是同步数据
更换电脑之后,可以继续使用之前创建的personal access tokens
2. 下载配置到本地
1、Shift + Alt + d 打开输入框,[输入在github为vs code创建的 Personal Access Tokens,回车] vscode 1.10版本无需此步骤
2、输入 gist id
3、等待配置及扩展同步到本地

github的gist服务
创建Personal Access Tokens:https://github.com/settings/tokens
使用感受
1. github创建的Personal Access Tokens ,创建成功之后是可以再次编辑的
2. 一定要保存好 github创建的 Personal Access Tokens
2. 一定要保存好 code setting sync的gist id。这个id用于在多台机器上保持同步。
文本编辑及快捷键
多列编辑
Shift + Alt +鼠标左键
Markdown
默认已支持实时预览,我使用的vs code1.2版本
预览:Ctrl + K ,V 在右侧窗口打开预览,支持实时预览改动部分
Ctrl + Shift + V 快速预览当前文档
文档:https://code.visualstudio.com/docs/languages/markdown
配置或查看快捷键
选择 文件 - 首选项 - 键盘快捷方式 打开keybinding.json,可以修改或查看vscode的快捷键

打开命令行 (>)
Ctrl + Shift + P
常用快捷键
Ctrl + P 打开扩展管理器
Ctrl + Shift + K 删除当前行
Ctrl + B 显示/隐藏侧边栏
离线安装vs code扩展
以安装 vscode-instant-markdown 为例:https://marketplace.visualstudio.com/items?itemName=dbankier.vscode-instant-markdown
Mac & Linux
cd $HOME/.vscode/extensions
git clone https://github.com/dbankier/vscode-instant-markdown.git
cd vscode-instant-markdown
npm install
Windows
cd %USERPROFILE%\.vscode\extensions
git clone https://github.com/dbankier/vscode-instant-markdown.git
cd vscode-instant-markdown
npm install

'npm' 不是内部或外部命令…
如果你在安装时,出现上述提示,那么你需要安装nodejs
1. 打开nodejs的官网下载:https://nodejs.org/en/
2. 运行安装程序,进行安装,会自动配置环境变量和安装npm package manager
3. 再次安装vs code 扩展

vs code 扩展
1. vs code安装扩展
1、在vs code中按 Ctrl + P,打开扩展管理器
2、输入安装代码: ext install 扩展名 ,键盘选择要安装的扩展,按回车

3、安装完成后,会提示重启

2. 浏览插件库
https://marketplace.visualstudio.com/VSCode
3. csharp
地址:https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
安装:ext install csharp
安装之后报错:The .NET CLI tools cannot be located. .NET Core debugging will not be enabled. Make sure .NET CLI tools are installed and are on the path.

4. HTML CSS Class Completion
说明:我安装的vs code默认已支持css,javascript。可检查css,html语法错误
地址:https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion
安装:ext install html-css-class-completion
5. PowerShell
地址:https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
安装:ext install PowerShell
6. Lua
地址:https://marketplace.visualstudio.com/items?itemName=keyring.Lua
安装:ext install Lua
7. Java Snippets
地址:https://marketplace.visualstudio.com/items?itemName=tushortz.java-snippets
安装:ext install java-snippets
8. python
地址:https://marketplace.visualstudio.com/items?itemName=donjayamanne.python
安装:ext install python
9. Project Manager
功能:Manage your projects right inside Visual Studio Code. Easily access and switch between them.
使用方法
1、ctrl +shift + p 打开命令行,输入:project save ,选择Project Manager: Save Project

2、输入要保存当前工程的名字

3、查看或修改保存的工程
ctrl +shift + p 打开命令行,输入:project edit,选择Project Manager: Edit Project

project.json
[
{
"label": "simpleframework",
"description": "d:\\Unity3D\\SimpleFramework_NGUI\\Assets"
}
]
地址:https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager
安装:ext install project-manager
10. Bookmarks
功能:Mark lines in the editor and easily jump to them.
地址:https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
安装:ext install Bookmarks
VS Code的更多相关文章
- Visual Studio Code 代理设置
Visual Studio Code (简称 VS Code)是由微软研发的一款免费.开源的跨平台文本(代码)编辑器,在十多年的编程经历中,我使用过非常多的的代码编辑器(包括 IDE),例如 Fron ...
- 我们是怎么做Code Review的
前几天看了<Code Review 程序员的寄望与哀伤>,想到我们团队开展Code Review也有2年了,结果还算比较满意,有些经验应该可以和大家一起分享.探讨.我们为什么要推行Code ...
- Code Review 程序员的寄望与哀伤
一个程序员,他写完了代码,在测试环境通过了测试,然后他把它发布到了线上生产环境,但很快就发现在生产环境上出了问题,有潜在的 bug. 事后分析,是生产环境的一些微妙差异,使得这种 bug 场景在线下测 ...
- 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM
刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...
- 在Visual Studio Code中配置GO开发环境
一.GO语言安装 详情查看:GO语言下载.安装.配置 二.GoLang插件介绍 对于Visual Studio Code开发工具,有一款优秀的GoLang插件,它的主页为:https://github ...
- 代码的坏味道(14)——重复代码(Duplicate Code)
坏味道--重复代码(Duplicate Code) 重复代码堪称为代码坏味道之首.消除重复代码总是有利无害的. 特征 两个代码片段看上去几乎一样. 问题原因 重复代码通常发生在多个程序员同时在同一程序 ...
- http status code
属于转载 http status code:200:成功,服务器已成功处理了请求,通常这表示服务器提供了请求的网页 404:未找到,服务器未找到 201-206都表示服务器成功处理了请求的状态代码,说 ...
- Visual Studio Code——Angular2 Hello World 之 2.0
最近看到一篇用Visual Studio Code开发Angular2的文章,也是一篇入门教程,地址为:使用Visual Studio Code開發Angular 2專案.这里按部就班的做了一遍,感觉 ...
- WebStorm 2016 最新版激活(activation code方式)
WebStorm 2016 最新版激活(activation code方式) WebStorm activation code WebStorm 最新版本激活方式: 今天下载最新版本的WebStorm ...
- docker4dotnet #3 在macOS上使用Visual Studio Code和Docker开发asp.net core和mysql应用
.net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对岸的苹果园越来越茂盛,实在不想再去做一只宅猿了.于是,.net猿决定搭上小鲸鱼的渡轮到苹果园去看 ...
随机推荐
- php扩展php_curl windows 安装问题
关于安装php扩展php_curl 出现的提示错误,导致php_curl无法安装 apache 错误日志: PHP Warning: PHP Startup: in Unknown on line 0 ...
- jQuery的document ready与 onload事件——你真的思考过吗?
在进行实验和资料查询时,我遇到了几个关键问题: 1. window.onload到底是什么加载完触发? 2. body为什么会有onload事件? 3. 为什么是window.onload,而不是do ...
- Kali Linux (XFce版本)安装后的一些设置
kali Linux的主版本自带的是Gnome桌面环境,安装后使用效率太低,不知道是不是我机器配置低的原因, 在虚拟机里运行起来太慢.卡.丑啦....所以以前都一直都在用Backbox Linux,并 ...
- linux命令学习使用记录
1.文件批量重命名:把所有.xml文件重命名.txt,第一个参数为文件名中字符串,第二个参数为替换后文件名,第三个为当前目录文件列表 rename .xml .txt *.xml 2.解压不显示过程: ...
- NMAP实用手册
nmap在网络和渗透中使用相当频繁,相关教程也层出不穷.在此,我只整理出最实用的,言简意赅,方便自己,方便他人. 一.nmap介绍 NMAP,也就是Network Mapper,最早是Linux下的网 ...
- Sharepoint学习笔记—习题系列--70-576习题解析 -(Q36-Q39)
Question 36 You are designing a SharePoint 2010 application. You need to design the application so t ...
- iOS中sqlite版本号
https://github.com/yapstudios/YapDatabase/wiki/SQLite-version-(bundled-with-OS) https://github.com/y ...
- android 图片加载库 Glide 的使用介绍
一:简介 在泰国举行的谷歌开发者论坛上,谷歌为我们介绍了一个名叫 Glide 的图片加载库,作者是bumptech.这个库被广泛的运用在google的开源项目中,包括2014年google I/O大会 ...
- 自定义button
改变button内部label和imageView的frame - (CGRect)titleRectForContentRect:(CGRect)contentRect - (CGRect)imag ...
- 网络邂逅&网络异步请求
什么是卡,网络慢,且你只能等着它加载完不能做别的事 这里便引申出网络异步请求的概念 #import "ViewController.h" @interface ViewContro ...