SublimeText3自动补全python提示

1、SublimeText3下载地址
https://www.sublimetext.com/3

2、安装SublimeText3

3、安装SublimeCodeIntel
(1)打开SublimeText3;(2)按快捷键“ctrl+p”,或者“Preferences->Package control”输入“Package Control: InstallPackage”;(3)输入“SublimeCodeIntel”,点击列表中的“SublimeCodeIntel”包,安装完后会有相应的提示。

4、配置python提示
(1)找配置文件
Preferences->Package settings->SublimeCodeIntel->settings-user
(2)修改文件内容如下,其中python的路径需要根据自己的需要修改
{
    "codeintel_language_settings": {
        "Python": {
            "python": "D:\\python\\python.exe",
            "codeintel_scan_extra_dir": [
                "D:\\python",
                "D:\\python\\DLLs",
                "D:\\python\\Lib",
                "D:\\python\\Lib\\site-packages",
                "D:\\python\\Lib\\idlelib"             
            ],
            "codeintel_scan_files_in_project": true,
            "codeintel_selected_catalogs": []
        },
    }
}

5、快捷键
(1)一般情况下,默认快捷键有:
ctrl+/:代码注释
ctrl+shift+space:代码提示
(2)自定应快捷键:
自定义“鼠标”跳转注释代码
找配置文件
Preferences->Package settings->SublimeCodeIntel->Mouse Bindings-User
添加以下内容
[{ "button": "button1", "modifiers": ["ctrl"], "command": "goto_python_definition", "press_command": "drag_select" }
]
自定义“键盘”快捷方式
Preferences->Package settings->SublimeCodeIntel->Key Bindings-User
定义方式类似于鼠标的格式。
上述自定义方法可以参见Preferences->Package settings->SublimeCodeIntel->Key Bindings-Default中的内容

猜你喜欢

转载自www.cnblogs.com/jpfss/p/10214926.html