当前位置:网站首页>VScode
VScode
2022-04-23 06:19:00 【qq1033930618】
一、VScode下载
在应用商店中找到下载注释不能输入中文 采用命令行下载
以 sudo 用户身份运行下面的命令,更新软件包索引,并且安装依赖软件
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
使用 wget 命令插入 Microsoft GPG key
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
启用 Visual Studio Code 源仓库
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
一旦 apt 软件源被启用,安装 Visual Studio Code 软件包
sudo apt install code
当一个新版本被发布时,你可以通过你的桌面标准软件工具,或者在你的终端运行命令,来升级 Visual Studio Code 软件包
sudo apt update
sudo apt upgrade
二、扩展安装
点击左侧extensions
下载python
三、主题更换
左下角设置 -> color theme
或按住ctrl+k+t
Light+(default light)
四、隐藏文件
File->Preference->Settings
输入Files就可以找到
Files:Exclude 添加 .*
五、解释器设置
python在Ubuntu终端运行时
找不到文件夹路径
在运行文件加入
import sys
sys.path.append('文件夹路径')
1、查看VsCode中默认使用的python解释器
2、Ctrl + Shift + p 打开命令行面板
3、输入 Python:Select Interpreter 命令,配置默认的解释器
4、默认解释器生效
六、默认路径设置
很多时候出现import找不到问题
大多是运行包内文件 导入另一个包内文件时候
点击左侧竖排第四个图标 Run and Debug
修改launch.json文件
加入一行代码 注意逗号
"env": {"PYTHONPATH":"${workspaceRoot}"},
需要保存并重启vscode
在这个界面点击左上角RUN右侧绿色右三角(Python:CurrentFile)
不能点击右上角右三角运行
如何cd到目标文件夹下执行
在上述文件中再加入
"cwd": "${fileDirname}",
七、清空终端快捷键
1、按ctrl+shift+p, 输入open keyboard shortcuts,并回车
2、输入workbench.action.terminal.clear
3、双击如图,并按住键盘 ctrl+k,回车即可
八、禁用重启终端提示
Session contents restored from DD/MM/YYYY at HH:MM:SS
左下角设置setting
terminal.integrated.persistentSessionReviveProcess
选择never
九、多行注释
ctrl + /
不能用小键盘上/ 应该用?下面的/
版权声明
本文为[qq1033930618]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_51326691/article/details/123746556
边栏推荐
- 美摄科技受邀LVSon2020大会 分享《AI合成虚拟人物的技术框架与挑战》
- DMR system solution of Kaiyuan MINGTING hotel of Fengqiao University
- JDBC连接池
- 枫桥学院开元名庭酒店DMR系统解决方案
- 美摄助力百度“度咔剪辑”,让知识创作更容易
- PyTorch 10. Learning rate
- HQL语句的调优
- 地铁无线对讲系统
- Statement of American photography technology suing Tianmu media for using volcanic engine infringement code
- Us photo cloud editing helps BiliBili upgrade its experience
猜你喜欢
自组网灵活补盲|北峰油气田勘测解决方案
浅谈BFC(块格式化上下文)
免费开源智能充电桩物联网SAAS云平台
How to improve the service efficiency of the hotel without blind spots and long endurance | public and Private Integrated walkie talkie?
记录一个查询兼容性的网站,String.replaceAll()兼容性报错
“泉”力以赴·同“州”共济|北峰人一直在行动
Draw margin curve in arcface
Machine vision series (01) -- Overview
南方投资大厦SDC智能通信巡更管理系统
ES6之箭头函数细谈
随机推荐
使用compressorjs压缩图片,优化功能,压缩所有格式的图片
Source Insight 4.0常见问题
Statement of American photography technology suing Tianmu media for using volcanic engine infringement code
Us photo cloud editing helps BiliBili upgrade its experience
SDC intelligent communication patrol management system of Nanfang investment building
vim+ctags+cscpope开发环境搭建指南
机器视觉系列(01)---综述
PyTorch 22. Pytorch common code snippet collection
How does the public and Private Integrated walkie talkie realize cooperative work under multi-mode communication?
字节跳动2020秋招编程题:根据工号快速找到自己的排名
How to improve the service efficiency of the hotel without blind spots and long endurance | public and Private Integrated walkie talkie?
获取字符格式的当前时间
通过sparksql读取presto中的数据存到clickhouse
可视化常见绘图(五)散点图
Systrace parsing
记录一下使用v-print中遇到的问题
关于短视频技术轮廓探讨
Int8 quantification and inference of onnx model using TRT
应急医疗通讯解决方案|MESH无线自组网系统
Urban emergency management - urban emergency communication command and dispatching system