To view the list of all variables and their values in Vim:
Note that this does not list environment variables, this post shows how to view those.
If you find it hard to wade through the long list, you can redirect the output of this command to a buffer for further analysis. For example, to load the output of
:let into a buffer:
:redir @a :let :redir END "ap
There are many types of variables in Vim and each has a special name or prefix:
g: global variables b: local buffer variables w: local window variables t: local tab page variables s: script-local variables l: local function variables v: Vim variables.
To list the variables of a particular type, for example global variables, just use its prefix:
Tried with: Vim 7.3 and Ubuntu 12.04 LTS