How to find out which plug-in changes Vim settings?

Today I had some vague behavior. I have

set autoindent 

in my vimrc, but for some reason this is disabled when I open the PHP file.

I fixed it by adding a line like

 autocmd FileType php set autoindent 

But I'm still trying to figure out where this option is disabled. So, is there a way to find out where the configuration changes in the vim configuration?

For reference, here is my full vimrc.local , which I use on Ubuntu:

https://gist.github.com/mikehaertl/1612035/5fa149468006577d193858bbc8cefcd3a413e017

EDIT: The problem was caused by filetype indent on , which I added some time ago to my configuration. I don’t know why this affects autoindent.

+8
vim
source share
2 answers

The :verbose command will tell you where the option has been changed:

 :verbose set autoindent? 

If this alone does not help, you can check all executed commands, it is advisable that the output be redirected to the log file:

 :set verbosefile=vim.log :20verbose edit foo.php 

Also note that there are several indentation control options, for example. 'cindent' , 'smartindent' , 'indentexpr' etc.

PS: To avoid changing the parameter value in other buffers, it is recommended that you use :setlocal instead.

+9
source share

Isn't that a problem?

 autocmd FileType php set cindent|set cinkeys-=0# 
0
source share

All Articles