VS Code 安装与使用,Python 顶级 IDE 编程指南!
Posted q1613161916
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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会打开两个文件:


工具栏简介
1、资源管理器

如图:

在文件上面点击鼠标右键,有个Copy Path,可以复制文件的物理路径。

2、搜索

3、Git版本控制

如图:

右键文件夹都可以直接打开,打开后,我们继续看


输入以下内容


然后按Ctrl + S保存文件,再来看Git这个工具栏的变化




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


1、文件类型
下面我们来看看VS Code编写代码是否顺手




选择第一个Change Language Mode,也可以打开这个语言选择框。
2、文件编码


选择以后,会出现如下选项:

我们可以根据需要选择,这里我们选择保存的编码格式,如图:

3、MarkDown
还有一个比较让人喜欢的一点就是VS Code也支持markdown的书写和预览,下面我们看一下:


常用快捷键:


格式调整

光标相关


重构代码

查找替换

显示相关

其他

以上是关于VS Code 安装与使用,Python 顶级 IDE 编程指南!的主要内容,如果未能解决你的问题,请参考以下文章
独家对话微软顶级代码女神潘正磊:Visual Studio 与 VS Code 的未来走向 | 人物志