junegunn / vim-plug

:hibiscus: Minimalist Vim Plugin Manager
https://junegunn.github.io/vim-plug/
MIT License
33.89k stars 1.9k forks source link

Plugins not fully disabled after commenting/removing #1189

Closed Subbeh closed 2 years ago

Subbeh commented 2 years ago

Plugins are not fully disabled after commenting them out or even removing them from my vimrc file.

I have been busy debugging an issue where auto-indent is not working correctly and is caused by one of the plugins that is loaded.

After removing each of the plugins from between the call plug* lines, the issue persists. Only after removing the entire plugin section, including the call plug* lines is the indenting issue gone.

call plug#begin('$XDG_DATA_HOME/vim/plugged') <-- removing plugged fixes the issue

  Plug ... <-- removing plugins does not help

call plug#end()

vim config here


VIM 9.0
junegunn commented 2 years ago

https://github.com/junegunn/vim-plug#usage

That's probably because plug#end() enables indent setting for filetype plugins. You can disable it as described in the section.

Subbeh commented 2 years ago

Adding the filetype indent off option or running it in vim unfortunately doesn't help. The only way I seem to be able to fix it is by either removing plugged entirely or running set indentkeys-=0# inside a vim instance (doesn't work in vimrc)

junegunn commented 2 years ago

Check the output of :scriptnames to see the list of plugin directories loaded. Vim will not load any of the plugins under plugged if there's no Plug statements.

Subbeh commented 2 years ago

Check the output of :scriptnames to see the list of plugin directories loaded. Vim will not load any of the plugins under plugged if there's no Plug statements.

These files are loaded additionally with just the call function and filetype indent off enabled (no plugins) compared to the plugged plugin removed completely from the vimrc file:

~/.dotfiles/vim/.config/vim/autoload/plug.vim /usr/share/vim/vim90/ftoff.vim /usr/share/vim/vim90/ftplugin.vim /usr/share/vim/vim90/ftplugin/yaml.vim /usr/share/vim/vim90/indent.vim /usr/share/vim/vim90/indent/yaml.vim

(the same yaml file is opened in both instances)

Subbeh commented 2 years ago

Sorry, I think I had the filetype indent off at the wrong place. I disabled the plugins and it looks like it's working now.