sublime text3 python 代码自动补全
程序员文章站
2022-03-10 21:45:26
...
一: 在菜单栏中选择Preferences -> Package control 选择下图的第一个
二: 输入SublimeCodeIntel(我安装过了,所以不会显示)
三:
输入(ps:每个人的python路径可能不同,请看自己的python地址):
{
"codeintel_language_settings": {
"Python3": {
"python3": "C:\\Program Files\\Python\\python.exe",
"codeintel_scan_extra_dir": [
"C:\\Program Files\\Python\\DLLs",
"C:\\Program Files\\Python\\Lib",
"C:\\Program Files\\Python\\Lib\\site-packages",
"C:\\Program Files\\Python\\Lib\\idlelib",
"C:\\Program Files\\Python\\python36.zip",
"C:\\Program Files\\Python",
"C:\\Program Files\\Python\\Lib\\*",
],
"codeintel_scan_files_in_project": true,
"codeintel_selected_catalogs": []
},
}
}
四:
输入:
[
//自动提示代码
{ "keys": ["alt+/"], "command": "code_intel_auto_complete" },
//跳转到函数定义
{ "keys": ["alt+right"], "command": "goto_python_definition"},
//返回到跳转位置
{ "keys": ["alt+left"], "command": "back_to_python_definition"}
]
五:
输入:
[
//ctrl+鼠标左键跳转函数
{ "button": "button1", "modifiers": ["ctrl"], "command": "goto_python_definition", "press_command": "drag_select" }
]
上一篇: 应用移植 (二) QT编程
下一篇: sublime配置python运行环境