{"id":13448331,"url":"https://github.com/srusskih/SublimeJEDI","last_synced_at":"2025-03-22T09:31:14.198Z","repository":{"id":5078991,"uuid":"6241108","full_name":"srusskih/SublimeJEDI","owner":"srusskih","description":"awesome Python autocompletion with SublimeText","archived":false,"fork":false,"pushed_at":"2022-08-30T09:04:37.000Z","size":2708,"stargazers_count":938,"open_issues_count":34,"forks_count":109,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-10-28T14:27:20.807Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"akka/akka","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srusskih.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG-0.16.x.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-16T08:23:57.000Z","updated_at":"2024-10-19T14:35:20.000Z","dependencies_parsed_at":"2022-07-07T23:58:49.052Z","dependency_job_id":null,"html_url":"https://github.com/srusskih/SublimeJEDI","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srusskih%2FSublimeJEDI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srusskih%2FSublimeJEDI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srusskih%2FSublimeJEDI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srusskih%2FSublimeJEDI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srusskih","download_url":"https://codeload.github.com/srusskih/SublimeJEDI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937751,"owners_count":20535124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:01:42.283Z","updated_at":"2025-03-22T09:31:11.611Z","avatar_url":"https://github.com/srusskih.png","language":"Python","funding_links":[],"categories":["Python","Editor Plugins and IDEs","Extensions","资源列表","Emacs [elpy](https://github.com/jorgenschaefer/elpy)：Emacs Python 开发环境。","Editor Plugins","Editor Plugins and IDEs [🔝](#readme)","Awesome Python","Computational"],"sub_categories":["Python Profile","编辑器插件","编辑器插件和 IDE","Editor Plugins and IDEs","Neat python"],"readme":"SublimeJEDI\n============\n\n[![Build Status](https://travis-ci.com/srusskih/SublimeJEDI.svg?branch=master)](https://travis-ci.com/srusskih/SublimeJEDI) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/srusskih/SublimeJEDI?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[SublimeJEDI](https://github.com/srusskih/SublimeJEDI) is a [Sublime Text 3](http://www.sublimetext.com/) and [Sublime Text 2](http://www.sublimetext.com/2) and plugin\nto the awesome autocomplete library [Jedi](https://github.com/davidhalter/jedi)\n\nPython Version Support\n----------------------\n\n\n| Sublime Jedi Plugin  | Branch   | Jedi version   | Python 2.6.x   | Python 2.7.x   | Python \u003e3.3   | Python 3.3   |Sublime Text 2   | Sublime Text 3\n| -------------------- | -------- | -------------- | -------------- | -------------- | ------------ | ------------ |---------------- | ----------------\n| \u003e= 0.14.0            | master   | \u003e=0.13.2       | ❌             | ✅             | ✅           | ❌           |❌               | ✅\n| \u003e= 0.12.0            | master   | \u003e=0.12.0       | ❌             | ✅             | ✅           | ✅           |❌               | ✅\n| \u003c 0.12.0             | st2      | 0.11.1         | ✅             | ✅             | ✅           | ✅           |✅               | ✅\n\n_Please note [Jedi](https://github.com/davidhalter/jedi) does not support Python 3.3 any more._\n\nInstallation\n------------\n\n#### with Git\n\n    cd ~/.config/sublime-text-2/Packages/\n    git clone https://github.com/srusskih/SublimeJEDI.git \"Jedi - Python autocompletion\"\n\n\n#### with [Sublime Package Control](http://wbond.net/sublime_packages/package_control)\n\n 1. Open command pallet (default: `ctrl+shift+p`)\n 2. Type `package control install` and select command `Package Control: Install Package`\n 3. Type `Jedi` and select `Jedi - Python autocompletion`\n\nAdditional info about to use Sublime Package Control you can find here: [http://wbond.net/sublime_packages/package_control/usage](http://wbond.net/sublime_packages/package_control/usage).\n\nSettings\n--------\n\n#### Python interpreter settings\n\nBy default **SublimeJEDI** will use default Python interpreter from the `PATH`.\nAlso you can set different interpreter for each Sublime Project.\n\nTo set project related Python interpreter you have to edit yours project's settings file.\nBy default file name look like `\u003cproject name\u003e.sublime-project`\n\nYou can set Python interpreter, and additional python package directories, using for example the following:\n\n    # \u003cproject name\u003e.sublime-project\n    {\n        // ...\n\n        \"settings\": {\n            // ...\n            \"python_virtualenv\": \"$project_path/../../virtual/\",\n            \"python_interpreter\": \"$project_path/../../virtual/bin/python\",\n\n            \"python_package_paths\": [\n                \"$home/.buildout/eggs\",\n                \"$project_path/addons\"\n            ]\n        }\n    }\n\n**NOTE**: You can configure `python_interpreter` and `python_virtualen` at the same time, no problem with that. If you configure `python_interpreter` alone, the `python_virtualen` will be inferred  so it will be 2 directories above `python_interpreter`. If you configure `python_virtualen` alone, the `python_interpreter` will be always where ever `python_virtualen` plus `'bin/python'`. If you don't configure any of this then the default Python environment of your system will be used.\n\n**NOTE**: Please note that Python will goes through the directories from `\"python_package_paths\"` to search for modules and files. In other words, each item in `\"python_package_paths\"` list is a directory with extra packages and modules, not a direct path to package or module.\n\nWhen setting paths, [Sublime Text Build System Variables](http://docs.sublimetext.info/en/latest/reference/build_systems.html#build-system-variables) and OS environment variables are automatically expanded.\nNote that using placeholders and substitutions, like in regular Sublime Text Build System paths is not supported.\n\n\n#### SublimeREPL integration\n\nBy default completion for [SublimeREPL](https://github.com/wuub/SublimeREPL) turned off. If you want use autocompletion feature of SublimeJEDI in a repl, \nplease set `enable_in_sublime_repl: true` in `User/sublime_jedi.sublime-setting` or in your project setting.\n\n\n#### Autocomplete on DOT\n\nIf you want auto-completion on dot, you can define a trigger in the\nSublime User or Python preferences:\n\n    # User/Preferences.sublime-settings or User/Python.sublime-settings\n    {\n        // ...\n        \"auto_complete_triggers\": [{\"selector\": \"source.python\", \"characters\": \".\"}],\n    }\n\nIf you want auto-completion **ONLY** on dot and not while typing, you can\nset (additionally to the trigger above):\n\n\n    # User/Preferences.sublime-settings or User/Python.sublime-settings\n    {\n        // ...\n        \"auto_complete_selector\": \"-\",\n    }\n\n\n#### Autocomplete after only certain characters\n\nIf you want Jedi auto-completion only after certain characters, you can use the `only_complete_after_regex` setting.\n\nFor example, if you want Jedi auto-completion only after the `.` character but don't want to affect auto-completion from other packages, insert the following into `User/sublime_jedi.sublime-settings`:\n\n~~~json\n{\n  \"only_complete_after_regex\": \"\\\\.\",\n}\n~~~\n\nUsing this setting in this way means you can remove `\"auto_complete_selector\": \"-\",` from `User/Python.sublime-settings`, so that the rest of your packages still trigger auto-completion after every keystroke.\n\n\n#### Goto / Go Definition\n\nFind function / variable / class definition\n\nShortcuts: `CTRL+SHIFT+G`\n\nMouse binding, was disabled, becase it's hard to keep ST default behavior.\nNow you can bind `CTRL + LeftMouseButton` by themself in this way:\n\n    # User/Default.sublime-mousemap\n    [{\n        \"modifiers\": [\"ctrl\"], \"button\": \"button1\",\n        \"command\": \"sublime_jedi_goto\",\n        \"press_command\": \"drag_select\"\n    }]\n\n**NOTE**: You can configure the behavior of this command by changing the setting `follow_imports`. If this setting is `True` (default behavior) you will travel directly to where the term was defined or declared. If you want to travel back step by step the import path of the term then set this to `False`.\n\n#### Find Related Names (\"Find Usages\")\n\nFind function / method / variable / class usage, definition.\n\nShortcut: `ALT+SHIFT+F`.\n\nThere are two settings related to finding usages:\n\n- `highlight_usages_on_select`: highlights usages of symbol in file when symbol is selected (default `false`)\n- `highlight_usages_color`: color for highlighted symbols (default `\"region.bluish\"`)\n    + other available options are `\"region.redish\", \"region.orangish\", \"region.yellowish\", \"region.greenish\", \"region.bluish\", \"region.purplish\", \"region.pinkish\", \"region.blackish\"`\n    + these colors are actually scopes that were added to Sublime Text around build 3148; these scopes aren't documented, but the __BracketHighlighter__ plugin has an excellent explanation [here](http://facelessuser.github.io/BracketHighlighter/customize/#configuring-highlight-style)\n\n\n#### Show Python Docstring\n\nShow docstring as tooltip.\n\nFor ST2:\n\tShow docstring in output panel.\n\nShortcut: `CTRL+ALT+D`.\n\n\n#### Styling Python Docstring\n\nIf available [mdpopups](https://github.com/facelessuser/sublime-markdown-popups) is used to display the docstring tooltips. To modify the style please follow mdpopups' [styling guide](http://facelessuser.github.io/sublime-markdown-popups/styling).\n\nBasically a `Packages/User/mdpopups.css` is required to define your own style.\n\nTo specify rules which apply to Jedi tooltips only, use `.jedi` selector as displayed in the following example.\n\n```css\n\n/* JEDI's python function signature */\n.jedi .highlight {\n    font-size: 1.1rem;\n}\n\n/* JEDI's docstring titles\n  \n  h6 is used to highlight special keywords in the docstring such as\n\n  Args:\n  Return:\n*/\n.jedi h6 {\n    font-weight: bold;\n}\n```\n\nmdpopups provides a [default.css](https://github.com/facelessuser/sublime-markdown-popups/blob/master/css/default.css) which might be used as cheat sheet to learn about the available styles.\n\n\n#### Jedi Show Calltip\n\nShow calltip in status bar.\n\nExposed command is `sublime_jedi_signature`.\n\n\n#### Function args fill up on completion\n\nSublimeJEDI allow fill up function parameters by [default](sublime_jedi.sublime-settings#12).\nThanks to [@krya](https://github.com/krya), now you can turn it off.\n\nFunction parameters completion has 3 different behaviors:\n\n  - insert all function arguments on autocomplete\n\n        # complete result\n        func(a, b, c, d=True, e=1, f=None)\n\n        # sublime_jedi.sublime-settings\n        {\n            \"auto_complete_function_params\": \"all\"\n        }\n\n\n  - insert only required arguments that don't have default value (default behavior)\n\n        # complete result\n        func(a, b, c)\n\n        # sublime_jedi.sublime-settings\n        {\n            \"auto_complete_function_params\": \"required\"\n        }\n\n  - do not insert any arguments\n\n        # complete result\n        func()\n\n        # sublime_jedi.sublime-settings\n        {\n            \"auto_complete_function_params\": \"\"\n        }\n\t\n[More info about `auto_complete_function_params`](https://github.com/srusskih/SublimeJEDI/wiki/What-is-%22auto_complete_function_params%22)\n\n#### Completion visibility\n\nSublime Text has a bit strange completion behavior and some times does not adds it's own completion suggestions.\nEnabling this option to try to bring more comfortable workflow.\n\n - Suggest only Jedi completion\n\n        # sublime_jedi.sublime-settings\n        {\n            \"sublime_completions_visibility\": \"jedi\"\n        }\n\n   or\n\n        # sublime_jedi.sublime-settings\n        {\n            \"sublime_completions_visibility\": \"default\"\n        }\n\n - Suggest Jedi completion and Sublime completion in the end of the list\n\n        # sublime_jedi.sublime-settings\n        {\n            \"sublime_completions_visibility\": \"list\"\n        }\n\nPlease note, if you are using [SublimeAllAutocomplete](https://github.com/alienhard/SublimeAllAutocomplete) - you should not care about this option.\n\n\n#### Logging\n\nPlugin uses Python logging lib to log everything. It allow collect propper information in right order rather then `print()`-ing to sublime console.\nTo make logging more usefull I'd suggest ST Plugin [Logging Control](https://packagecontrol.io/packages/Logging%20Control), it allows stream logs into file/console/etc. \nOn github page you can find great documenation how you can use it.\n\nHere is *quickstart* config that I'm using for *DEBUG* purposes:\n\n```json\n{\n    \"logging_enable_on_startup\": false,\n    \"logging_use_basicConfig\": false,\n    \"logging_root_level\": \"DEBUG\",\n    \"logging_console_enabled\": true,\n    \"logging_console_level\": \"INFO\",     // Only print warning log messages in the console.\n    \"logging_file_enabled\": true,\n    \"logging_file_level\": \"DEBUG\",\n    \"logging_file_datefmt\": null,\n    \"logging_file_fmt\": \"%(asctime)s %(levelname)-6s - %(name)s:%(lineno)s - %(funcName)s() - %(message)s\",\n    \"logging_file_path\": \"/tmp/sublime_output.log\",\n    \"logging_file_rotating\": false,\n    \"logging_file_clear_on_reset\": false\n}\n```\n\nBy default, detailed (debug) loggin turned off and you would not see any messages in ST console, only exceptions.\n\nIf you need get more information about the issue with the plugin:\n\n1. Install [Logging Control](https://packagecontrol.io/packages/Logging%20Control)\n2. Use *quickstart* config that was provided above.\n3. Enable logging. Ivoke \"Command Pannel\" (CMD+SHIFT+P for mac) and start typing “Logging”. Select the `\"Logging: Enable logging\"` command to enable logging.\n4. Reproduce the issue.\n5. Check the log file!\n\n\nTroubleshooting\n---------------\n\n#### Auto-complete for `import XXXX` does not works.\n\nIt's a common issue for ST3.\nAll language related settings are stored in Python Package.\nThere is a `Completion Rules.tmPreferences` file where defined that completion should be cancelled after a keyword (def, class, import \u0026 etc.).\n\nTo solve this issue Sublime Jedi plugin already has a proper `Completion Rules.tmPreferences` file for ST2, but ST3 ignores it.\n\nSome workarounds how to update completion rules and fix the issue:\n\n##### Copy-Paste\n\n1. Delete your Sublime Text Cache file `Cache/Python/Completion Rules.tmPreferences.cache`\n2. Download [Completion Rules.tmPreferences.cache](https://raw.githubusercontent.com/srusskih/SublimeJEDI/master/Completion%20Rules.tmPreferences) to `User/Packages/Python/`\n\n##### There is package for this...\n\n1. install Package https://packagecontrol.io/packages/PackageResourceViewer\n2. cmd+shift+p (Command Panel)\n3. type `PackageResourceViewer: Open Resource`\n4. type `python` and select [Python package](https://www.scaler.com/topics/python/python-packages/)\n5. type `Completion Rules.tmPreferences`\n6. remove `import` from the regexp.\n7. save\n\n\nLicense\n-------\n\n[MIT](/LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrusskih%2FSublimeJEDI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrusskih%2FSublimeJEDI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrusskih%2FSublimeJEDI/lists"}