{"id":13393893,"url":"https://github.com/davidhalter/jedi-vim","last_synced_at":"2025-04-23T20:55:35.809Z","repository":{"id":4709642,"uuid":"5857387","full_name":"davidhalter/jedi-vim","owner":"davidhalter","description":"Using the jedi autocompletion library for VIM.","archived":false,"fork":false,"pushed_at":"2024-12-27T22:17:39.000Z","size":900,"stargazers_count":5314,"open_issues_count":30,"forks_count":372,"subscribers_count":112,"default_branch":"master","last_synced_at":"2025-04-23T20:55:07.771Z","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":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidhalter.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["davidhalter"]}},"created_at":"2012-09-18T14:14:29.000Z","updated_at":"2025-04-21T14:56:47.000Z","dependencies_parsed_at":"2024-10-14T10:21:16.654Z","dependency_job_id":null,"html_url":"https://github.com/davidhalter/jedi-vim","commit_stats":{"total_commits":767,"total_committers":99,"mean_commits":7.747474747474747,"dds":0.5228161668839635,"last_synced_commit":"be483a2dcb63e992b02c5a0faff5d555720246fc"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fjedi-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fjedi-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fjedi-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhalter%2Fjedi-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidhalter","download_url":"https://codeload.github.com/davidhalter/jedi-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514767,"owners_count":21443208,"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-30T17:01:02.002Z","updated_at":"2025-04-23T20:55:35.778Z","avatar_url":"https://github.com/davidhalter.png","language":"Python","readme":".. image:: https://github.com/davidhalter/jedi-vim/blob/master/doc/logotype-a.svg\n\n#################################################\njedi-vim - awesome Python autocompletion with VIM\n#################################################\n\n.. image:: https://travis-ci.org/davidhalter/jedi-vim.svg?branch=master\n   :target: https://travis-ci.org/davidhalter/jedi-vim\n   :alt: Travis-CI build status\n\njedi-vim is a VIM binding to the autocompletion library\n`Jedi \u003chttp://github.com/davidhalter/jedi\u003e`_.\n\nHere are some pictures:\n\n.. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_complete.png\n\nCompletion for almost anything (Ctrl+Space).\n\n.. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_function.png\n\nDisplay of function/class bodies, docstrings.\n\n.. image:: https://github.com/davidhalter/jedi/raw/master/docs/_screenshots/screenshot_pydoc.png\n\nDocumentation (Pydoc) support (with highlighting, Shift+k).\n\nThere is also support for goto and renaming.\n\n\nGet the latest from `github \u003chttp://github.com/davidhalter/jedi-vim\u003e`_.\n\nDocumentation\n=============\n\nDocumentation is available in your vim: ``:help jedi-vim``. You can also look\nit up `on github \u003chttp://github.com/davidhalter/jedi-vim/blob/master/doc/jedi-vim.txt\u003e`_.\n\nYou can read the Jedi library documentation `here \u003chttp://jedi.readthedocs.io/en/latest/\u003e`_.\n\nIf you want to report issues, just use the github issue tracker. In case of\nquestions about the software, please use `stackoverflow\n\u003chttps://stackoverflow.com/questions/tagged/jedi-vim\u003e`_ and tag your question with ``jedi-vim``.\n\n\nContributing\n============\n\nWe love Pull Requests! Read the instructions in ``CONTRIBUTING.md``.\n\n\nFeatures\n========\n\nThe Jedi library understands most of Python's core features. From decorators to\ngenerators, there is broad support.\n\nApart from that, jedi-vim supports the following commands\n\n- Completion ``\u003cC-Space\u003e``\n- Goto assignment ``\u003cleader\u003eg`` (typical goto function)\n- Goto definition ``\u003cleader\u003ed`` (follow identifier as far as possible,\n  includes imports and statements)\n- Goto (typing) stub ``\u003cleader\u003es``\n- Show Documentation/Pydoc ``K`` (shows a popup with assignments)\n- Renaming ``\u003cleader\u003er``\n- Usages ``\u003cleader\u003en`` (shows all the usages of a name)\n- Open module, e.g. ``:Pyimport os`` (opens the ``os`` module)\n\n\nInstallation\n============\n\nRequirements\n------------\n- **Vim**: You need a VIM version that was compiled with Python 3 or later\n(``+python3``).  You can check this from within VIM using\n``:python3 import sys; print(sys.version)``.\n\n- **Neovim**: You need a python environment with ``pynvim`` installed:\n``pip install pynvim``\n\nthen check your environment is correctly setup from within Neovim using\n``:checkhealth provider.python``\n\nManual installation\n-------------------\n\nYou might want to use `pathogen \u003chttps://github.com/tpope/vim-pathogen\u003e`_ or\n`Vundle \u003chttps://github.com/gmarik/vundle\u003e`_ to install jedi-vim.\n\nThe first thing you need after that is an up-to-date version of Jedi. Install\n``git submodule update --init --recursive`` in your jedi-vim repository.\n\nExample installation command using Pathogen:\n\n.. code-block:: sh\n\n    git clone --recursive https://github.com/davidhalter/jedi-vim.git ~/.vim/bundle/jedi-vim\n\nExample installation using Vundle:\n\nAdd the following line in your `~/.vimrc`\n    \n.. code-block:: vim\n\n    Plugin 'davidhalter/jedi-vim'\n\nFor installing Jedi, ``pip install jedi`` will also work, but you might run\ninto issues when working in virtual environments. Please use git submodules.\n\n\nInstallation with your distribution\n-----------------------------------\n\nOn Arch Linux, you can also install jedi-vim from official repositories as\n`vim-jedi \u003chttps://www.archlinux.org/packages/community/any/vim-jedi/\u003e`__.\nIt is also available on\n`Debian (≥8) \u003chttps://packages.debian.org/vim-python-jedi\u003e`__ and\n`Ubuntu (≥14.04) \u003chttp://packages.ubuntu.com/vim-python-jedi\u003e`__ as\nvim-python-jedi.\nOn Fedora Linux, it is available as\n`vim-jedi \u003chttps://packages.fedoraproject.org/pkgs/vim-jedi/vim-jedi/\u003e`__.\n\nPlease note that this version might be quite old compared to using jedi-vim\nfrom Git.\n\nCaveats\n-------\n\nNote that the `python-mode \u003chttps://github.com/klen/python-mode\u003e`_ VIM plugin seems\nto conflict with jedi-vim, therefore you should disable it before enabling\njedi-vim.\n\nTo enjoy the full features of jedi-vim, you should have VIM \u003e= 7.3, compiled with\n``+conceal`` (which is not the case on some platforms, including OS X). If your VIM\ndoes not meet these requirements, the parameter recommendation list may not appear\nwhen you type an open bracket after a function name. Please read\n`the documentation \u003chttp://github.com/davidhalter/jedi-vim/blob/master/doc/jedi-vim.txt\u003e`_\nfor details.\n\n\nSettings\n========\n\nJedi is by default automatically initialized. If you don't want that I suggest\nyou disable the auto-initialization in your ``.vimrc``:\n\n.. code-block:: vim\n\n    let g:jedi#auto_initialization = 0\n\nThere are also some VIM options (like ``completeopt`` and key defaults) which\nare automatically initialized, but you can skip this:\n\n.. code-block:: vim\n\n    let g:jedi#auto_vim_configuration = 0\n\n\nYou can make jedi-vim use tabs when going to a definition etc:\n\n.. code-block:: vim\n\n    let g:jedi#use_tabs_not_buffers = 1\n\nIf you are a person who likes to use VIM-splits, you might want to put this in your ``.vimrc``:\n\n.. code-block:: vim\n\n    let g:jedi#use_splits_not_buffers = \"left\"\n\nThis options could be \"left\", \"right\", \"top\", \"bottom\" or \"winwidth\". It will decide the direction where the split open.\n\nJedi automatically starts the completion, if you type a dot, e.g. ``str.``, if\nyou don't want this:\n\n.. code-block:: vim\n\n    let g:jedi#popup_on_dot = 0\n\nJedi selects the first line of the completion menu: for a better typing-flow\nand usually saves one keypress.\n\n.. code-block:: vim\n\n    let g:jedi#popup_select_first = 0\n\nJedi displays function call signatures in insert mode in real-time, highlighting\nthe current argument. The call signatures can be displayed as a pop-up in the\nbuffer (set to 1 by default (with the conceal feature), 2 otherwise),\nwhich has the advantage of being easier to refer to (but is a hack with\nmany drawbacks since it changes the buffer's contents),\nor in Vim's command line aligned with the function call (set to 2), which\ncan improve the integrity of Vim's undo history.\n\n.. code-block:: vim\n\n    let g:jedi#show_call_signatures = \"1\"\n\nHere are a few more defaults for actions, read the docs (``:help jedi-vim``) to\nget more information. If you set them to ``\"\"``, they are not assigned.\n\n.. code-block:: vim\n\n    NOTE: subject to change!\n\n    let g:jedi#goto_command = \"\u003cleader\u003ed\"\n    let g:jedi#goto_assignments_command = \"\u003cleader\u003eg\"\n    let g:jedi#goto_stubs_command = \"\u003cleader\u003es\"\n    let g:jedi#goto_definitions_command = \"\"\n    let g:jedi#documentation_command = \"K\"\n    let g:jedi#usages_command = \"\u003cleader\u003en\"\n    let g:jedi#completions_command = \"\u003cC-Space\u003e\"\n    let g:jedi#rename_command = \"\u003cleader\u003er\"\n    let g:jedi#rename_command_keep_name = \"\u003cleader\u003eR\"\n\nAn example for setting up your project:\n\n.. code-block:: vim\n\n    let g:jedi#environment_path = \"/usr/bin/python3.9\"\n\njedi-vim tries its best to guess your virtual env. If you want to work with a\nspecific virtual environment however, you can point jedi-vim towards it:\n\n.. code-block:: vim\n\n    let g:jedi#environment_path = \"venv\"\n\nFinally, if you don't want completion, but all the other features, use:\n\n.. code-block:: vim\n\n    let g:jedi#completions_enabled = 0\n\nFAQ\n===\n\nI want to use Jedi with a Python 2 Environment, but it's not listed under \"Known environments\"\n----------------------------------------------------------------------------------------------\n\nStarting with version 0.18.0 Jedi dropped support for Python 2.\n\n\nI don't want the docstring window to popup during completion\n------------------------------------------------------------\n\nThis depends on the ``completeopt`` option. Jedi initializes it in its\n``ftplugin``. Add the following line to your ``.vimrc`` to disable it:\n\n.. code-block:: vim\n\n    autocmd FileType python setlocal completeopt-=preview\n\n\nI want \u003cTab\u003e to do autocompletion\n---------------------------------\n\nDon't even think about changing the Jedi command to ``\u003cTab\u003e``,\nuse `supertab \u003chttps://github.com/ervandew/supertab\u003e`_!\n\n\nThe completion is too slow!\n---------------------------\n\n1. Completion of complex libraries (like Numpy) should only be slow the first\n   time you complete them. After that the results should be cached and very fast.\n\n2. If it is still slow after the initial completion and you have installed the\n   python-mode Vim plugin, try disabling its rope mode:\n\n   .. code-block:: vim\n\n       let g:pymode_rope = 0\n\n   See issue `#163 \u003chttps://github.com/davidhalter/jedi-vim/issues/163\u003e`__.\n\n3. You can also use `deoplete-jedi \u003chttps://github.com/zchee/deoplete-jedi\u003e`__\n   for completions, which uses Jedi, but does completions asynchronously\n   (requires Neovim).\n   It makes sense to use both jedi-vim and deoplete-jedi, but you should disable\n   jedi-vim's completions then:\n\n   .. code-block:: vim\n   \n       let g:jedi#completions_enabled = 0\n\nTesting\n=======\n\njedi-vim is being tested with a combination of `vspec\n\u003chttps://github.com/kana/vim-vspec\u003e`_ and `py.test \u003chttp://pytest.org/\u003e`_.\n\nThe tests are in the ``test`` subdirectory, you can run them calling::\n\n    py.test\n\nThe tests are automatically run with `travis\n\u003chttps://travis-ci.org/davidhalter/jedi-vim\u003e`_.\n","funding_links":["https://github.com/sponsors/davidhalter"],"categories":["Install Vundle","Tutorial","Editor Plugins and IDEs","Python","Editor Plugins","编辑器插件和ide","资源列表","Emacs [elpy](https://github.com/jorgenschaefer/elpy)：Emacs Python 开发环境。","Editor Plugins and IDEs [🔝](#readme)","Awesome Python","VimL"],"sub_categories":["Caveats","Windows Manager","编辑器插件","编辑器插件和 IDE","Editor Plugins and IDEs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidhalter%2Fjedi-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidhalter%2Fjedi-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidhalter%2Fjedi-vim/lists"}