Friday, January 5, 2018

Re: Using `--noplugin` fails to suppress package under `~/.vim/pack/...`

On Sunday, December 31, 2017 at 4:10:51 AM UTC-6, Tim Rice wrote:
> Hi there,
>
> Sorry if this is a duplicate, I tried sending to `vim@vim.org` but I think
> that address is incorrect?
>
> Anyway, I have encountered some unexpected behaviour when using the
> `--noplugin` option. Namely, it does not seem to suppress packages
> installed under `~/.vim/pack/...`
>
> I have attached my Vim version information. My Vim configuration is stored
> at https://github.com/cryptarch/vimfiles.git
>
> Specific steps to reproduce the behaviour I am seeing:
>
> $ mkdir -pv ~/.vim/pack/git-plugins/start
> $ cd ~/.vim/pack/git-plugins/start
> $ git clone https://github.com/w0rp/ale.git # A linting plugin
> $ cd /tmp
> $ cat > ./main.c << EOF
> int main(int* argc, char** argv) { /* Note error in first argument */
> return 0;
> }
> EOF
> $ vim --noplugin ./main.c # ALE still reports error on first line.
>
> Is there something I might have misconfigured? Am I using the new plugin
> system incorrectly?
>
> Thanks for your time :)
>
>
> ~ Tim

It looks at first glance that ALE is (at least partially) a filetype plugin. That is, it has components that are activated for certain filetypes when you edit a file of that type.

The --noplugin option does not prevent filetype plugins from working. It only prevents the plugins loaded on every Vim startup from loading (files in a "plugin" folder). In your .vimrc, you have "filetype plugin on" which enables the filetype plugins.

If you don't want to load filetype plugins, remove that line from your .vimrc.

I'm not sure if it would work (it has potential to have side effects you may not expect and I've never seen it suggested before), but a possible way to let this work as you expected, would be to move "filetype plugin on" from your .vimrc to a file in a plugin directory instead.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: