Comment 1 for bug 1278590

Revision history for this message
SirVer (sirver) wrote :

> Bug: On startup with `vim --noplugin` (or `set noloadplugins` in some rc file) I get an Error:

oh noooo - yet another obscure vim option that does not work as advertised. Why would someone install plugins and then not use them?

> Either you could remove the code from fdetect

Well, as you will have guessed the code is there for a reason - there is no other way to be loaded before all kinds of ftplugins but we need to be the first to be called when the filetype changes - so this hack is necessary to work around the limitations of Vim.

> Or you can change the relevant UltiSnips functions (or all UltiSnips functions) to be autoloading functions.

I did that now. I did not do it in the past because it felt moot - since we need to keep track of all CursorMoved commands anyways, the full plugin is always loaded. Now it is only loaded when you use the Cursor in insert mode - which will be always too. So autoload did not buy us anything for UltiSnips. However, moving the methods into autoload seems to have solved your --noplugin issues, check out https://github.com/SirVer/ultisnips/commit/82ca377aaff84eae9d0230e9941685901b226db4 and let me know if there are any problems.