Show where an option was set
From Vim Tips Wiki
Duplicate tip
This tip is very similar to the following:
These tips need to be merged – see the merge guidelines.
Tip 244 Previous Next created May 7, 2002 · complexity intermediate · author Benji Fisher · version 6.0
When things go wrong, it is sometimes hard to figure out why. For example, an option might be set in the system vimrc file, in a personal vimrc file, in a plugin (global or local), or interactively. Vim will tell you where the current value was set if you ask:
:verbose set history?
will tell you the current value of the 'history' option, and where it was set.
[edit] Comments
Is there a similar feature for mappings? RedHat ships with a modified vim that sources their own set of maps, and it took me forever to track them down and disable them. This feature for maps would have saved me a lot of trouble.
:scriptnames # list all loaded scripts & their location :map # list maps :functions # list functions :ab # list abbreviations
TODO: It would be nice to:
- integrate the comments about mappings, functions, etc in the tip text
- change the page title to reflect this evolution.
