Can you query what a variable/setting in vim is set to?
For example, in vim, if I want to know if autoread is set or not, is there a command I can run to tell me? Or to k开发者_运维百科now what my tabstop is set to?
In your case, :set autoread?
will give you the current value of autoread. Generally, set foo?
will give you the value of option foo
.
:set
will display all options that are different from default.
:verbose set autoread?
will tell you what set autoread and its value.
You can also do, for example,
echo &ft
The &
refers to the contents of the variable. I find this useful in scripts.
You can view settings in vim with this command
:set all
精彩评论