文章目录
一、主题+字体
- 主题:One Dark Pro(Flat) 字体:firacode
- 效果
- 主题
- 字体
-
在环境中安装字体
sudo apt update && sudo apt install fonts-firacode
-
在vscode中设置字体
"editor.fontFamily": "'Fira Code'", "editor.fontLigatures": true
-
修改注释的颜色
cd ~/.vacode/extensions/zhuangtongfa. #补全,版本不一样 cd themes sudo gedit OneDark-Pro-flat.json
- 原先为灰色,目前改为:#708090
- 附上搜索的内容:comment, punctuation.definition.comment,1882行
二、autopep8
-
pip 安装的是 1.6 版本
a. -
autopep8 要求
a. python>=3.8
b. autopep8 > 1.7
c. -
升级 autopep8
a. pip install --upgrade autopep8 -
a. --max-line-length=150 --ignore=E402
三、git
源代码管理 git 上传报错
“Git:fatal:unable to accesshttps://github.com/…':Failed toconnect to github.com port 443 after 21086 ms:Timed out”
- 问题: 网络问题
- 解决方法:
- 关梯子
- 取消全局代理:
——————git config --global --unset http.proxy git config --global --unset https.proxy
- 在vscode 设置中
撤销最近一次git提交,
git reset --soft HEAD~1
解决vscode每次git pull/push都需要输入账号密码
git 提交
- 在vsode直接clone 网址
.gitignore
- * 是一个通配符,可以匹配任意字符的序列
- ** 表示匹配任意中间目录
vscode gitee 参考网址
四、光标颜色和样式
- 插件 IME and Cursor
- ctrl+, cursor color 选择颜色
- Cursor Style” 中,选择你想要的光标样式 “line”(直线光标)、”block”(方块光标)和 “underline”(下划线光标
- json中
editorCursor.foreground
- 也可不使用插件,直接修改settings.json
"editor.cursorStyle": "underline",
"workbench.colorCustomizations": {"editorCursor.foreground": "#FF0000"},