sublime3+python代码追踪函

2023-01-31 01:01:34 代码 追踪 Sublime3

sublime3+python代码追踪函数插件安装

参考网址:

Http://blog.csdn.net/M1mory/article/details/72582661

https://www.cnblogs.com/honkly/p/6599642.html

 

安装步骤:

1.打开Package Control[Preferences>>Package Control]

2.输入 install 选择关联出来的install package

3.输入sublimecodeintel,然后选中安装

(等待)

4.安装完成之后可以通过【Preferences>>Package Settings】中查看到已安装的插件,下面配置Python环境

 

5.点击preferences中的browse Packages,进入到SublimeCodeIntel,在当前的路径下新建.codeintel文件夹(windows中文件命名的时候为 .codeintel. ),之后进入到 .codeintel文件夹中,新建文件“config.log”,配置文件中输入(下文以路径“E:/Program Files/python34/”为例,实际配置时请根据具体安装路径修改):


 1 "python3":{  
 2     "python":"E:/Program Files/python34/python.exe",  
 3     "pythonExtraPaths":[  
 4          "E:/Program Files/python34/DLLs",  
 5          "E:/Program Files/python34/Lib",  
 6          "E:/Program Files/python34/Lib/lib-tk",  
 7          "E:/Program Files/python34/Lib/site-packages",  
 9     ]  
10 } 

追踪函数、查看系统函数

 

配置快捷键使其同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"}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

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


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

 

 

 

 

相关文章