过滤文件
vscode使用过程中,左边的文件列表中会将文件夹内所有的文件显示出来,对于想pyc这种文件对我们来说是没有用的,不如将其隐藏起来。
在settings.json文件中,添加:1
2
3
4
5{
"files.exclude":{
"**/*.pyc":true
}
}
远程部署代码
通过使用插件vs-code来进行上传部署。
在商店中搜素Delpoy
然后在设置中添加一下代码:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28"deploy": {
"packages": [
{
"name":"Version 2.3.4",
"description": "Package version 2.3.4",
"files": [
"**/*.py",
"/*.py",
"**/*.xml",
"**/*.js"
],
"exclude": [
".vscode/**"
],
"deployOnChange": true
}
],
"targets": [
{
"type": "sftp",
"name":"Clound",
"description": "Deploy codes to Remote",
"dir":"/home",
"host": "yourhost","port": 22,
"user": "YourUser","password": "******"
}
]
},
如果服务器是ssh key登录,用privateKey代替password并填写key的文件路径。
如果出现 1
2
3
## 排除某些文件或文件夹
“ignore”:[
“/.vscode/*/“,
“.pyc”
],`