diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 33646be..00c5754 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -267,6 +267,13 @@ function! jedi#py_import_completions(argl, cmdl, pos) PythonJedi jedi_vim.py_import_completions() endfun +function! jedi#clear_cache(bang) + PythonJedi jedi_vim.jedi.cache.clear_time_caches(True) + if a:bang + PythonJedi jedi_vim.jedi.parser.utils.ParserPickling.clear_cache() + endif +endfunction + " ------------------------------------------------------------------------ " show_documentation diff --git a/plugin/jedi.vim b/plugin/jedi.vim index b6d8c80..1dae363 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -31,5 +31,6 @@ endif command! -nargs=1 -complete=custom,jedi#py_import_completions Pyimport :call jedi#py_import() command! -nargs=0 JediDebugInfo call jedi#debug_info() +command! -nargs=0 -bang JediClearCache call jedi#clear_cache(0) " vim: set et ts=4: