jedi.vim 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. "jedi-vim - Omni Completion for python in vim
  2. " Maintainer: David Halter <davidhalter88@gmail.com>
  3. "
  4. " This part of the software is just the vim interface. The really big deal is
  5. " the Jedi Python library.
  6. if !exists("g:jedi#auto_vim_configuration") || g:jedi#auto_vim_configuration
  7. " jedi-vim doesn't work in compatible mode (vim script syntax problems)
  8. if &compatible
  9. set nocompatible
  10. endif
  11. " jedi-vim really needs, otherwise jedi-vim cannot start.
  12. filetype plugin on
  13. " Change completeopt, but only if it has Vim's default value.
  14. let s:save_completeopt=&completeopt
  15. set completeopt&
  16. let s:default_completeopt=&completeopt
  17. let &completeopt=s:save_completeopt
  18. if s:default_completeopt == &completeopt
  19. set completeopt=menuone,longest,preview
  20. endif
  21. if len(mapcheck('<C-c>', 'i')) == 0
  22. inoremap <C-c> <ESC>
  23. endif
  24. endif
  25. " Pyimport command
  26. command! -nargs=1 -complete=custom,jedi#py_import_completions Pyimport :call jedi#py_import(<q-args>)
  27. " vim: set et ts=4: