File: jedi.vim

package info (click to toggle)
python-jedi 0.10.0~git1%2Bf05c071-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,064 kB
  • ctags: 3,014
  • sloc: python: 16,997; makefile: 149; ansic: 13
file content (23 lines) | stat: -rw-r--r-- 884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if !jedi#init_python()
    finish
endif

if g:jedi#auto_initialization
    if g:jedi#completions_enabled
        " We need our own omnifunc, so this overrides the omnifunc set by
        " $VIMRUNTIME/ftplugin/python.vim.
        setlocal omnifunc=jedi#completions

        " map ctrl+space for autocompletion
        if g:jedi#completions_command == "<C-Space>"
            " In terminals, <C-Space> sometimes equals <Nul>.
            imap <buffer> <Nul> <C-Space>
            smap <buffer> <Nul> <C-Space>
        endif
        if g:jedi#completions_command != ""
            execute "inoremap <expr> <buffer> ".g:jedi#completions_command." jedi#complete_string(0)"
            " A separate mapping for select mode: deletes and completes.
            execute "snoremap <expr> <buffer> ".g:jedi#completions_command." '\<C-g>c'.jedi#complete_string(0)"
        endif
    endif
endif