garbas/vim-snipmate

Immediate errors after installation

adouglas1-godaddy opened this issue · 4 comments

Installed with Vundle exactly as per the readme:

add the following to your vimrc then run :PluginInstall

  Plugin 'MarcWeber/vim-addon-mw-utils'
  Plugin 'tomtom/tlib_vim'
  Plugin 'garbas/vim-snipmate'

  " Optional:
  Plugin 'honza/vim-snippets'

Installation succeeds, then running vim says:

The legacy SnipMate parser is deprecated. Please see :h SnipMate-deprecate.
Error detected while processing /home/adouglas/.vim/after/plugin/snipMate.vim:
line   28:
E121: Undefined variable: snippets_dir
E116: Invalid arguments for function empty(snippets_dir)
E15: Invalid expression: empty(snippets_dir)
line   32:
E121: Undefined variable: snippets_dir
E116: Invalid arguments for function GetSnippets
Press ENTER or type command to continue

Then the same errors again when opening a file:

Error detected while processing FileType Auto commands for "*":
E121: Undefined variable: snippets_dir
E116: Invalid arguments for function GetSnippets

I get the same issue, this project seems dead. I am going to try to port ultisnips to nodejs and coc.

I really don't want to add python to vim.

msdos commented

The deprecate error is easy to solve. Follow the docs: add let g:snipMate.snippet_version = 0 to your .vimrc.

I will agree the snippets_dir is confusing. But solvable: as #198 (comment) says, try to just add let g:snipMate.snippet_dirs = split(&rtp, ',') and see if it works.

This project indeed seems "dead" but I use it in a daily basis since I really like the snippets syntax.

@adouglas1-godaddy On the one hand, msdos is possibly correct that setting snippet_version might fix all your problems (though I'm of course going to advocate for setting it to 1 not 0). There is more information on the versions in the FAQ on the repo's README.

On the other hand, the errors you're experiencing...aren't possible with this repository? In particular, snippets_dir does not exist anywhere in the code. There are a few instances of snippet_dirs, but that code is incapable of producing the errors you're experiencing.

Can you please ensure that you are using this repository's SnipMate? We can continue troubleshooting once we know you're using the correct repository.

I think the snippet_version issue was the source of problems here, as well as a potential incorrect version of SnipMate. If that's not the case, please reopen and we'll figure it out.