cyymfm1314

ublime text3 python代码自动提示/补全插件sublimecodeintel配置

SublimeCodeIntel代码自动补全配置

作者主要使用python,所有配置以python为例.其他语言同理.利用sublimeCodeIntel插件可以实现自动提示python代码、跳转追踪自定义函数、查看系统函数等.功能还是相当强大的.

自动提示/补全python代码

选择 Perference-Package Settings-SublimeCodeIntel-Settings-User,复制以下配置:

{
    "codeintel_language_settings": {
        "Python3": {
            "python3": "C:\\Python36\\python.exe",
            "codeintel_scan_extra_dir": [
                "C:\\Python36\\DLLs",
                "C:\\Python36\\Lib",
                "C:\\Python36\\Lib\\site-packages",
                "C:\\Python36\\Lib\\idlelib",
                "C:\\Python36\\python36.zip",
                "C:\\Python36",
                "C:\\Python36\\Lib\\*",
            ],
            "codeintel_scan_files_in_project": true,
            "codeintel_selected_catalogs": []
        },
    }}

 

这里python路径需要根据自己的安装路径定义,其中codeintel_scan_extra_dir包含的目录可以在python IDLE中sys.path查看. 

追踪函数、查看系统函数

配置快捷键使其同eclipse,实现ctrl+鼠标左键追踪函数,alt+left/right跳转,alt+/自动提示代码

选择 Perference-package Settings-SublimeCodeIntel-Key Bindings-User

//自动提示代码
{ "keys": ["alt+/"], "command": "code_intel_auto_complete" },//跳转到函数定义
{ "keys": ["alt+right"], "command": "goto_python_definition"},//返回到跳转位置
{ "keys": ["alt+left"], "command": "back_to_python_definition"}

 

选择 Perference-package Settings-SublimeCodeIntel-Mouse Bindings - User

[
        //ctrl+鼠标左键跳转函数
        { "button": "button1", "modifiers": ["ctrl"], "command": "goto_python_definition", "press_command": "drag_select" }
]

 

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-08-30
  • 2022-01-18
  • 2021-10-20
  • 2021-09-07
  • 2021-12-15
  • 2021-08-07
  • 2021-12-15
猜你喜欢
  • 2021-12-15
  • 2021-12-15
  • 2021-12-15
  • 2021-11-29
  • 2021-11-05
  • 2021-07-12
相关资源
相似解决方案