Select first line of completion popup. Improves typing flow and saves one keypress.

This commit is contained in:
Jean-Louis Fuchs
2013-01-21 18:08:19 +01:00
parent 5a5c383aa6
commit f234bf4376
3 changed files with 15 additions and 2 deletions

View File

@@ -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