Shougo / neocomplcache.vim

Ultimate auto-completion system for Vim.
http://www.vim.org/scripts/script.php?script_id=2620
1.72k stars 135 forks source link

Strange error when reading helpfile #372

Closed sheerun closed 9 years ago

sheerun commented 11 years ago
Error detected while processing function vital#of:
line    4:
E605: Exception not caught: vital: version file not found: neocomplcache

It happend when I open some helpfile and wait about 3 seconds.

sheerun commented 11 years ago

Removing neosnippet resolves problem.

@update: Unfortunately it doesn't

sheerun commented 11 years ago

More output:

Error detected while processing function vital#of:
line    4:
E605: Exception not caught: vital: version file not found: neocomplcache
Press ENTER or type command to continue
Error detected while processing function neocomplcache#lazy_initialize:
line    9:
E171: Missing :endif
Press ENTER or type command to continue
sheerun commented 11 years ago

Disabling unite and neosnippet probably fixes that problem..

sheerun commented 11 years ago

Nope, it happened again

Shougo commented 11 years ago

I think it is installation problem. I recommend for you to reinstall neocomplcache.

kwiknik commented 11 years ago

@sheerun Use Pathogen to easily keep your Vim plugins installed separately. It's a total breeze to use and eliminates issues like this.

zimbatm commented 9 years ago

Having the same issue on both OSX and nixos using pathogen and vim-plug respectively.

After changing the vital.vim for better output:

function! vital#of(name)
  let fpath = 'autoload/vital/' . a:name . '.vital'
  let files = globpath(&runtimepath, fpath)
  let file = split(files, "\n")
  if empty(file)
    throw 'vital: not found: ' . fpath . ' in ' . &runtimepath
  endif
  let ver = readfile(file[0], 'b')
  if empty(ver)
    throw 'vital: invalid version file: ' . a:name
  endif
  return vital#_{substitute(ver[0], '\W', '', 'g')}#new()
endfunction

I get this when trying to quit my vim session:

Error detected while processing function vital#of:
line    5:
E605: Exception not caught: vital: not found: autoload/vital/neocomplete.vital in /home/zimbatm/.vim,/home/zimbatm/.vim/plugge
d/vim-sensible/,/home/zimbatm/.vim/plugged/neocomplete.vim/,/home/zimbatm/.vim/plugged/unite.vim/,/home/zimbatm/.vim/plugged/v
improc.vim/,/home/zimbatm/.vim/plugged/vimshell.vim/,/home/zimbatm/.vim/plugged/vim-colors-solarized/,/home/zimbatm/.vim/plugg
ed/vim-airline/,/home/zimbatm/.vim/plugged/vim-trailing-whitespace/,/home/zimbatm/.vim/plugged/editorconfig-vim/,/home/zimbatm
/.vim/plugged/tabular/,/home/zimbatm/.vim/plugged/vim-sneak/,/home/zimbatm/.vim/plugged/mustache.vim/,/home/zimbatm/.vim/plugg
ed/vim-narrow/,/home/zimbatm/.vim/plugged/vim-textobj-user/,/home/zimbatm/.vim/plugged/ctrlp.vim/,/home/zimbatm/.vim/plugged/t
ypescript-vim/,/home/zimbatm/.vim/plugged/gist-vim/,/home/zimbatm/.vim/plugged/undotree/,/home/zimbatm/.vim/plugged/vim-textob
j-rubyblock/,/home/zimbatm/.vim/plugged/ag.vim/,/home/zimbatm/.vim/plugged/syntastic/,/home/zimbatm/.vim/plugged/vim-pasta/,/h
ome/zimbatm/.vim
Error detected while processing function neocomplete#init#disable:
line    2:
E171: Missing :endif

It doesn't make any sense because the file exists:

-rw-r--r-- 1 zimbatm users 72 Feb 21 18:35 /home/zimbatm/.vim/plugged/neocomplete.vim/autoload/vital/neocomplete.vital

Is it possible that globpath gets confused somehow ?

zimbatm commented 9 years ago

I managed to reduce the issue down to:

let files=globpath(&runtimepath, 'autoload/vital/neocomplete.vital')

in some projects of mine the files variables has a result and in some not. &runtimepath seem to contain a path to the neocomplete plugin in both cases.

zimbatm commented 9 years ago

The reason it changes between projects is because of the vim-scripts/gitignore. Adding the "nosuf" option to globpath fixes the issue.