• SublimeCodeIntel代码自动补全配置


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

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

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

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

    出现Error tring to parse file:Expected value in PacjagesUserDefault.sublime-XX.......错误

    可能是上边设置文件书写错误,比如多了逗号,空格和tab互用


    追踪函数、查看系统函数
    配置快捷键,实现ctrl+鼠标左键追踪函数,alt+left/right跳转,alt+/自动提示代码

    选择 Perference  ->  Package Settings  ->  SublimeCodeIntel  ->  Key Bindings-User  复制以下配置:

    [
    	{
    		"keys": ["f5"],
    		"caption": "SublimeREPL:Python",
    		"command": "run_existing_window_command", "args":
    		{
    			"id": "repl_python_run",
    			"file": "config/Python/Main.sublime-menu"
    		}
    	},
    	//自动提示代码
    	{
    		"keys": ["alt+/"],
    		"command": "code_intel_auto_complete" 
    	},
    	//跳转到函数定义
    	{
    		"keys": ["alt+right"],
    		"command": "goto_python_definition"
    	},
    	//返回到跳转位置
    	{
    		"keys": ["alt+left"],
    		"command": "back_to_python_definition"
    	}
    ]
    

    ctrl+鼠标左键跳转函数

    选择 Perference  ->  Package Settings  ->  SublimeCodeIntel  ->  Mouse Bindings - User  复制以下配置: 

    [
            //ctrl+鼠标左键跳转函数
            { 
                "button": "button1", 
                "modifiers": ["ctrl"], 
                "command": "goto_python_definition", 
                "press_command": "drag_select"
            }
    ]
  • 相关阅读:
    BICGSTAB不收敛的坑!!
    python中复制的坑
    安装git
    notion快捷键
    PC微信3.60版小程序无法抓包如何解决(fiddler抓包)
    【施工中】双非考研上岸上海985计算机经历分享
    关于CPU个数、核数、线程数的理解
    几个性能问题的记录
    跨域无效问题解决(java后端方案)
    华硕笔记本,固态硬盘、U盘不能识别!
  • 原文地址:https://www.cnblogs.com/hailong88/p/10522191.html
Copyright © 2020-2023  润新知