
VS Code 安装与使用,Python 顶级 IDE 编程指南!
介绍
Visual Studio Code (简称 VS Code / VSC) 是一款免费开源的现代化轻量级代码编辑器,支持几乎所有主流的开发语言的语法高亮、智能代码补全、自定义热键、括号匹配、代码片段、代码对比 Diff、GIT 等特性,支持插件扩展,并针对网页开发和云端应用开发做了优化。软件跨平台支持 Win、Mac 以及 Linux,所以Python程序员对其也是非常钟意。
如果您从未从事其它编程语言而首先学习了Python,一定要知道pycharm才是你最拿手的兵器!
一、Visual Studio Code的下载和安装
Visual Studio Code下载完成后,单击下载的exe文件即可自动安装。
二、Visual Studio Code界面简介
安装完成后,我们看到的Visual Studio Code界面如下,当然不同的系统界面边框略有不同,基本布局如图:

VS Code 安装与使用,Python 顶级 IDE 编程指南!
首选项设置
下面我们来进行一些简单的设置,下面就拿大家最关心的字体大小设置来说吧,其他的都类似,点击如图菜单:

image

VS Code 安装与使用,Python 顶级 IDE 编程指南!
跳转如下页面,VS Code会打开两个文件:

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
工具栏简介
1、资源管理器

VS Code 安装与使用,Python 顶级 IDE 编程指南!
如图:

VS Code 安装与使用,Python 顶级 IDE 编程指南!
在文件上面点击鼠标右键,有个Copy Path,可以复制文件的物理路径。

VS Code 安装与使用,Python 顶级 IDE 编程指南!
2、搜索

VS Code 安装与使用,Python 顶级 IDE 编程指南!
3、Git版本控制

VS Code 安装与使用,Python 顶级 IDE 编程指南!
如图:

VS Code 安装与使用,Python 顶级 IDE 编程指南!
右键文件夹都可以直接打开,打开后,我们继续看

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
输入以下内容

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
然后按Ctrl + S保存文件,再来看Git这个工具栏的变化

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
4、调试
这个功能简单的说就是调试代码
三、Visual Studio Code上手体验
VS Code支持多种编程语言(包括强大的Python),我们先来看一下官方的说明:

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
1、文件类型
下面我们来看看VS Code编写代码是否顺手

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
选择第一个Change Language Mode,也可以打开这个语言选择框。
2、文件编码

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
选择以后,会出现如下选项:

VS Code 安装与使用,Python 顶级 IDE 编程指南!
我们可以根据需要选择,这里我们选择保存的编码格式,如图:

VS Code 安装与使用,Python 顶级 IDE 编程指南!
3、MarkDown
还有一个比较让人喜欢的一点就是VS Code也支持markdown的书写和预览,下面我们看一下:

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
常用快捷键:

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
格式调整

VS Code 安装与使用,Python 顶级 IDE 编程指南!
光标相关

VS Code 安装与使用,Python 顶级 IDE 编程指南!

VS Code 安装与使用,Python 顶级 IDE 编程指南!
重构代码

VS Code 安装与使用,Python 顶级 IDE 编程指南!
查找替换

VS Code 安装与使用,Python 顶级 IDE 编程指南!
显示相关

VS Code 安装与使用,Python 顶级 IDE 编程指南!
其他

VS Code 安装与使用,Python 顶级 IDE 编程指南!