davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.29k stars 370 forks source link

jedi#usages_command => jedi_vim.VimError: Vim(loadview):E32: No file name; created by: 'jedi#add_goto_window(2)'? #688

Closed ghost closed 3 years ago

ghost commented 7 years ago

When I tried to find all usages of a name by typing <leader>n, jedi-vim give me folloing error:

Traceback (most recent call last):                                                                                                                                                    
  File "/home/ormsf/.vim/bundle/jedi-vim/jedi_vim.py", line 123, in wrapper
    return func(*args, **kwargs)
  File "/home/ormsf/.vim/bundle/jedi-vim/jedi_vim.py", line 297, in goto
    vim_eval('jedi#add_goto_window(' + str(len(lst)) + ')')
  File "/home/ormsf/.vim/bundle/jedi-vim/jedi_vim.py", line 80, in vim_eval
    return _catch_exception(string, True)
  File "/home/ormsf/.vim/bundle/jedi-vim/jedi_vim.py", line 71, in _catch_exception
    raise VimError(result['exception'], result['throwpoint'], string)
jedi_vim.VimError: Vim(loadview):E32: No file name; created by: 'jedi#add_goto_window(2)'

Running Enviroment: Ubuntu16.04 + Python3.5 + Vim7.4

Can anyone give me some suggestions to solve this problem?

ghost commented 7 years ago

I have fixed this error by removing:

" au BufWinLeave * mkview
" au BufWinEnter * silent loadview

in my ~/.vimrc

Can anyone explain me why this error happan?

blueyed commented 7 years ago

Does it happen always? Do you have a test case to reproduce it? Do you use custom settings?

davidhalter commented 3 years ago

Hasn't been answered. closing.