mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 19:24:36 +08:00
added auto configuration of VIM setting -> fixes #52
This commit is contained in:
@@ -62,6 +62,11 @@ you disable the auto-initialization in your ``.vimrc``::
|
|||||||
|
|
||||||
let g:jedi#auto_initialization = 0
|
let g:jedi#auto_initialization = 0
|
||||||
|
|
||||||
|
There are also some VIM options (like ``completeopt``) which are automatically
|
||||||
|
initialized, if you don't want that:
|
||||||
|
|
||||||
|
let g:jedi#auto_vim_configuration = 0
|
||||||
|
|
||||||
The goto is by default on <leader g>. If you want to change that::
|
The goto is by default on <leader g>. If you want to change that::
|
||||||
|
|
||||||
let g:jedi#goto_command = "<leader>g"
|
let g:jedi#goto_command = "<leader>g"
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ if g:jedi#auto_initialization
|
|||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if g:jedi#auto_vim_configuration
|
||||||
|
setlocal completeopt=menuone,longest,preview
|
||||||
|
end
|
||||||
|
|
||||||
if g:jedi#popup_on_dot
|
if g:jedi#popup_on_dot
|
||||||
if stridx(&completeopt, 'longest') > -1
|
if stridx(&completeopt, 'longest') > -1
|
||||||
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>" : ""<CR>
|
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>" : ""<CR>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ let g:loaded_jedi = 1
|
|||||||
let s:settings = {
|
let s:settings = {
|
||||||
\ 'use_tabs_not_buffers': 1,
|
\ 'use_tabs_not_buffers': 1,
|
||||||
\ 'auto_initialization': 1,
|
\ 'auto_initialization': 1,
|
||||||
|
\ 'auto_vim_configuration': 1,
|
||||||
\ 'goto_command': "'<leader>g'",
|
\ 'goto_command': "'<leader>g'",
|
||||||
\ 'get_definition_command': "'<leader>d'",
|
\ 'get_definition_command': "'<leader>d'",
|
||||||
\ 'related_names_command': "'<leader>n'",
|
\ 'related_names_command': "'<leader>n'",
|
||||||
|
|||||||
Reference in New Issue
Block a user