forked from VimPlug/jedi-vim
Merge pull request #79 from ganwell/master
Selecting the first completion menu line
This commit is contained in:
@@ -106,6 +106,13 @@ you don't want this:
|
||||
|
||||
let g:jedi#popup_on_dot = 0
|
||||
|
||||
Jedi selects the first line of the completion menu: for a better typing-flow and
|
||||
usually saves one keypress.
|
||||
|
||||
.. code-block:: vim
|
||||
|
||||
let g:jedi#popup_select_first = 0
|
||||
|
||||
There's some support for refactoring:
|
||||
|
||||
.. code-block:: vim
|
||||
|
||||
@@ -40,7 +40,12 @@ end
|
||||
|
||||
if g:jedi#popup_on_dot
|
||||
if stridx(&completeopt, 'longest') > -1
|
||||
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>" : ""<CR>
|
||||
if g:jedi#popup_select_first
|
||||
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>\<lt>C-N>" : ""<CR>
|
||||
else
|
||||
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>" : ""<CR>
|
||||
end
|
||||
|
||||
else
|
||||
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>\<lt>C-P>" : ""<CR>
|
||||
end
|
||||
|
||||
@@ -34,7 +34,8 @@ let s:settings = {
|
||||
\ 'pydoc': "'K'",
|
||||
\ 'show_function_definition': 1,
|
||||
\ 'function_definition_escape': "'≡'",
|
||||
\ 'auto_close_doc': 1
|
||||
\ 'auto_close_doc': 1,
|
||||
\ 'popup_select_first': 1
|
||||
\ }
|
||||
|
||||
for [key, val] in items(s:settings)
|
||||
|
||||
Reference in New Issue
Block a user