mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
Implemented: force python 2 or 3 with ability to switch during runtime
Simultaneous python2 and python3 support, switchable during runtime calling a function as well as setting a variable in .vimrc! Closes issues #200 and #210 (which gave the idea for this commit, thank you @Shtucer).
This commit is contained in:
@@ -38,11 +38,11 @@ Contents *jedi-vim-contents*
|
||||
6.8. squelch_py_warning |g:jedi#squelch_py_warning|
|
||||
6.9. completions_enable |g:jedi#completions_enable|
|
||||
6.10. use_splits_not_buffers |g:jedi#use_splits_not_buffers|
|
||||
6.11. force_pycmd |g:jedi#force_pycmd|
|
||||
7. Testing |jedi-vim-testing|
|
||||
8. Contributing |jedi-vim-contributing|
|
||||
9. License |jedi-vim-license|
|
||||
|
||||
|
||||
==============================================================================
|
||||
1. Introduction *jedi-vim-introduction*
|
||||
|
||||
@@ -404,6 +404,25 @@ direction which you want to open a split with.
|
||||
Options: top, left, right or bottom
|
||||
Default: "" (not enabled by default)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
6.11. `g:jedi#force_pycmd` *g:jedi#force_pycmd*
|
||||
|
||||
If you have installed both python 2 and python 3, you can force which one jedi
|
||||
should use by setting this variable. It forces the internal Vim command, which
|
||||
will be used for every jedi call to the respective python interpreter.
|
||||
The variable can be set in the .vimrc like this:
|
||||
|
||||
let g:jedi#force_pycmd = 'python3'
|
||||
|
||||
This variable can be switched during runtime using the following function:
|
||||
Function: `jedi#force_pycmd_switch()`
|
||||
|
||||
or set directly using this function, which has the same name as the variable:
|
||||
Function: `jedi#force_pycmd(pycmd)`
|
||||
|
||||
Options: 'python' or 'python3'
|
||||
Default: 'python'
|
||||
|
||||
==============================================================================
|
||||
7. Testing *jedi-vim-testing*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user