• Stars
    star
    107
  • Rank 323,587 (Top 7 %)
  • Language
    Vim Script
  • Created over 10 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Activate the versions and the virtualenvs of pyenv within a live VIM session

vim-pyenv

vim-pyenv allows you to activate and deactivate the pyenv Python correctly in a live Vim session.

pyenv is a simple Python version management system and users can change the Python versions in a simple way. However, if you use pyenv to switch the Python version or virtualenv, the omni-completion would not work correctly. This is because Vim refers to the system Python and does not know anything about the pyenv Python, especially the packages you installed on the pyenv Python.

vim-pyenv activates the pyenv Python and adds the external Python library search path (PYTHONPATH) to Vim's internal Python PYTHONPATH. Thus, with vim-pyenv, your jedi-vim or any kind of Python omni-completion system returns a correct completion list.

vim-pyenv allows you to select pyenv Python within a live Vim session

Additionally, vim-pyenv supports Vim's dual Python 2 and 3 system. If your Vim is compiled with +python and +python3, vim-pyenv automatically synchronizes the Python version to the external Python version.

jedi-vim omni completion works correctly

Documentation

See :help vim-pyenv in Vim.

Installation

Installing vim-pyenv by using Neobundle is strongly recommended, because with Neobundle you can specify the dependencies of the plugins via depends options. The following is an example of Neobundle entry which specifies jedi-vim as a dependency.

NeoBundle 'davidhalter/jedi-vim'

" Do not load vim-pyenv until *.py is opened and
" make sure that it is loaded after jedi-vim is loaded.
NeoBundleLazy 'lambdalisue/vim-pyenv', {
        \ 'depends': ['davidhalter/jedi-vim'],
        \ 'autoload': {
        \   'filetypes': ['python', 'python3'],
        \ }}

You can use vundle or pathogen, but make sure that vim-pyenv is loaded after jedi-vim.

Using vim-pyenv with jedi-vim

vim-pyenv-activate-post and vim-pyenv-deactivate-post autocmd can be used to change the major version of jedi like

if jedi#init_python()
  function! s:jedi_auto_force_py_version() abort
    let g:jedi#force_py_version = pyenv#python#get_internal_major_version()
  endfunction
  augroup vim-pyenv-custom-augroup
    autocmd! *
    autocmd User vim-pyenv-activate-post   call s:jedi_auto_force_py_version()
    autocmd User vim-pyenv-deactivate-post call s:jedi_auto_force_py_version()
  augroup END
endif

The code above automatically call jedi#force_py_version every after user change a python version of pyenv via :PyenvActivate or :PyenvDeactivate command.

More Repositories

1

jupyter-vim-binding

Jupyter meets Vim. Vimmer will fall in love.
JavaScript
2,096
star
2

fern.vim

🌿 General purpose asynchronous tree viewer written in Pure Vim script
Vim Script
1,139
star
3

vim-gina

👣 Asynchronously control git repositories in Neovim/Vim 8
Vim Script
690
star
4

vim-gista

An alternative gist.vim, vim plugin which manipulate gists in Vim.
Vim Script
156
star
5

gin.vim

🥃 Gin makes you drunk on Git
TypeScript
113
star
6

glyph-palette.vim

🎨 An universal palette for Nerd Fonts
Vim Script
110
star
7

nerdfont.vim

👓 Fundemental plugin to handle Nerd Fonts in Vim
Vim Script
110
star
8

guise.vim

🎭 Guise is a Vim/Neovim plugin that opens a new tab page rather than invokes a new nested instance when a user tried to open a new Vim/Neovim through a job or terminal on the instance.
TypeScript
81
star
9

fern-git-status.vim

🌿 Add Git status badge integration on file:// scheme on fern.vim
Vim Script
77
star
10

fern-renderer-nerdfont.vim

🌿 fern.vim plugin which add file type icon through nerdfont.vim
Vim Script
66
star
11

battery.vim

Show battery information on statusline/tabline of Neovim/Vim
Vim Script
65
star
12

django-codemirror-widget

Django's textarea like widget for using CodeMirror on textarea
JavaScript
62
star
13

vim-manpager

Use Vim as a MANPAGER program
Vim Script
60
star
14

lista.nvim

Neovim/Vim buffer filtering plugin
Python
57
star
15

fern-hijack.vim

Make fern.vim as a default file explorer instead of Netrw
Vim Script
46
star
16

edita.vim

🖊 A pseudo EDITOR to stay in Vim/Neovim
Vim Script
44
star
17

reword.vim

🧬 Vim plugin to provide case-preserving substitutuion
Vim Script
44
star
18

kensaku.vim

🔍 Search Japanese text in Vim's buffer with Roma-ji by Migemo
TypeScript
43
star
19

vim-unified-diff

A plugin for using unified diff in vimdiff
Vim Script
42
star
20

django-inspectional-registration

Django registration app with Inspection before activation
Python
42
star
21

django-observer

Watch modification of any type of field in Django's model and call registered callback
Python
41
star
22

neovim-prompt

A python library to produce a customizable Neovim/Vim prompt.
Python
39
star
23

django-author

Automatically update author and updated_by fields on any models
Python
36
star
24

deno-unknownutil

🦕 An utility pack for handling unknown type in deno
TypeScript
36
star
25

vim-mr

🎩 Small plugin to track MRU/MRW
Vim Script
34
star
26

vim-backslash

Automatically insert a leading backslash when editing Vim scripts
Vim Script
33
star
27

dotfiles

Personal dotfiles
Vim Script
32
star
28

pastefix.vim

A workaround Neovim plugin to fix unnamed clipboard issue
Vim Script
30
star
29

butler.vim

🫖 Your butler. A ChatGPT like Vim/Neovim plugin that communicate with the OpenAI APIs
TypeScript
29
star
30

vim-fullscreen

A plugin which help users to toggle a fullscreen mode on GVim or MacVim.
Vim Script
29
star
31

vital-Whisky

vital.vim external module collection
Vim Script
28
star
32

readablefold.vim

A Vim plugin to improve foldtext for better looks
Vim Script
28
star
33

vim-protocol

Enable remote access like ':e https://git.io/vgDtJ' without netrw.vim
Vim Script
26
star
34

vim-django-support

Add DJANGO_SETTINGS_MODULE to enable pythoncomplete or whatever for django in vim
Vim Script
24
star
35

unite-grep-vcs

An unite source package for git grep and hg grep
Vim Script
24
star
36

fern-ssh

🌿 A scheme plugin for fern.vim which show file system tree of a remote machine via SSH.
Vim Script
23
star
37

vim-findent

Find and apply a reasonable indent rule of the current buffer.
Vim Script
22
star
38

django-mfw

Django framework for developing mobile site.
Python
22
star
39

fern-renderer-devicons.vim

🌿 fern.vim plugin which add file type icon through vim-devicons
Vim Script
21
star
40

deno-async

🦕 Asynchronous primitive modules for Deno.
TypeScript
19
star
41

rs-metrics-process

⏱ Cross-platform Prometheus style process metrics collector of metrics crate
Rust
19
star
42

django-googlemap-widget

Use Googlemap on your Django app
Python
18
star
43

deno-itertools

🦕 A TypeScript port of Python's itertools and more-itertools for Deno
TypeScript
18
star
44

shareboard.vim

A HTML viewer built for vim. Useful to see output of Pandoc or Markdown
Vim Script
17
star
45

vim-quickrun-neovim-job

Vim Script
17
star
46

fern-bookmark.vim

🌿 fern.vim plugin which add bookmark scheme
Vim Script
17
star
47

session.vim

Yet another simple session management plugin for Vim/Neovim
Vim Script
16
star
48

vim-pager

Use VIM as a PAGER program
Vim Script
16
star
49

file-protocol.vim

Vim plugin to support file:// protocol with line/column support
Vim Script
16
star
50

deno-unnullish

🦕 An opposite function of nullish coalescing operator
TypeScript
15
star
51

vim-amake

An example Vim plugin for asynchronous script runner
Vim Script
15
star
52

askpass.vim

🎙 Askpass (askpass.vim) is a plugin that open a prompt on Vim/Neovim when some program (e.g. SSH) ask user input (e.g RSA key passphrase) through a job on Vim/Neovim.
TypeScript
15
star
53

fin.vim

🐟 Filter the buffer content in-place without modification
Vim Script
14
star
54

wifi.vim

Show wifi information on statusline/tabline of Neovim/Vim
Vim Script
14
star
55

django-thumbnailfield

Enhanced ImageField of Django which support automatically generating thumbnail files
Python
13
star
56

deno-workerio

🦕 Deno module to translate Worker's system of messages into Reader and Writer
TypeScript
13
star
57

fern-mapping-git.vim

Add Git related mappings on file:// scheme of fern.vim
Vim Script
12
star
58

Shareboard

Python
11
star
59

nodeunit.vim

Vim compiler for nodeunit.js
Vim Script
11
star
60

rook

A personal castle repository of homeshick
11
star
61

nose.vim

A simple compiler for using nosetests on VIM
Vim Script
11
star
62

vim-cython-syntax

Vim Script
10
star
63

vim-rplugin

Allow to support Vim 8 in a python/python3 of a remote plugin in Neovim
Python
9
star
64

docker-neovim-ci

Alpine image for Neovim in CI
Makefile
9
star
65

mr-quickfix.vim

Vim Script
9
star
66

deno-sandbox

🦕 Create a temporary sandbox directory which is removed when the instance is disposed
TypeScript
9
star
67

deno-ansi-escape-code

🦕 Utilities to trim and parse ANSI escape code
TypeScript
9
star
68

pinkyless.vim

Rest your pinkies.
Vim Script
9
star
69

vim-python-virtualenv

Activate python virtualenv within Vim
Vim Script
9
star
70

vital-ArgumentParser

A high functional argument parser in Vim
Vim Script
9
star
71

emojiprefix

🎨 Emoji prefix guide for git commit messages
8
star
72

vim-improve-diff

Improve diff in Vim
Vim Script
8
star
73

deno-disposable

🦕 Ensure a disposable resource is disposed in Deno
TypeScript
8
star
74

lambdalisue-avatar

All avatars in this repository are my personal avatars. You MUST NOT use these without permission.
8
star
75

django-universaltag

Django's universaltag library
Python
8
star
76

qfloc.vim

Vim Script
8
star
77

deno-msgpack-rpc

🦕 Deno module to support msgpack-rpc
TypeScript
8
star
78

seethrough.vim

Make Vim transparent
Vim Script
7
star
79

vim-diffa

Improve diff feature of Vim
Vim Script
7
star
80

vim-operator-breakline

A vim operator to break lines even on words
Vim Script
7
star
81

e4u

Bundle Library of emoji4unicode at Google
Python
7
star
82

fern-mapping-project-top.vim

Vim Script
7
star
83

Jencil

JavaScript Crossbrowser Markup and WYSIWYG editor written in CoffeeScript
JavaScript
7
star
84

django-roughpages

A template based the django's flatpages like app
Python
7
star
85

django-object-permission

[Obsolute] Use django-permission insted. This library is no longer supported.
Python
7
star
86

grea.vim

Asynchronous grep which works like builtin external grep in Vim
Vim Script
6
star
87

collon.zsh

Lightweight ZSH theme (ASCII only) via promptinit
Shell
6
star
88

deno-unreachable

🦕. A type-check utility function to indicating that the code is unreachable
TypeScript
6
star
89

rs-co2-mini-monitor

🦀 An CUI application to log output of CO2Mini Indoor AirQuality Monitor
Rust
6
star
90

fern-mapping-mark-children.vim

fern.vim mapping plugin to provide mappings to mark child nodes of the cursor node
Vim Script
6
star
91

django-spaminspector

Django's generic spam inspection library via Akismet
Python
6
star
92

unite-linephrase

A unite source for set phrases
Vim Script
6
star
93

vim-gista-unite

A harmonic plugin of vim-gista for unite.vim
Vim Script
6
star
94

trea.vim

POC project for next fila.vim
Vim Script
6
star
95

Minilog

Djangoでブログを作るチュートリアル的何か
Python
6
star
96

gittag-changelog

Create CHANGELOG from tags in git repository
Python
5
star
97

kensaku-search.vim

Vim Script
5
star
98

femto

A simple JavaScript Text Editor
CoffeeScript
5
star
99

pymol-sketch

Python
5
star
100

fern-mapping-quickfix.vim

Fern plugin to send nodes to quickfix/location list
Vim Script
5
star