How to get the vim buildin variable list?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to get the vim buildin variable list?

Zhe Lee
I know the variable $HOME, $VIM, and $VIMRC

I want to get all the buildin list how to get that ?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get the vim buildin variable list?

Tony Mechelynck
On Sat, Jul 22, 2017 at 4:24 AM, Zhe Lee <[hidden email]> wrote:
> I know the variable $HOME, $VIM, and $VIMRC
>
> I want to get all the buildin list how to get that ?

These are not built-in; on the contrary, they are environment
variables. You can set any environment variable on starting Vim and
test it in any script, e.g. in your vimrc; but there are a few that
Vim will test or set as part of its normal behaviour. In addition to
those you mentioned, off the top of my head I can add $VIMRUNTIME,
which normally should not be set by the user but by Vim itself, and
$MYVIMRC and $MYGVIMRC, which are set to the vimrc and (if any) the
gvimrc that were used.

To find all these environment variables in the help, try the following:

        :helpgrep \$\u\+\>

i.e. grep the help for a dollar sign, followed by one or more capital
letters (as many as possible), followed by an end-of-word.

This will give you (as a quickfix list) all occurrences of an
environment variable name in the help, including duplicates. I just
tried it, and Vim tells me that there are 351 such places, but
remember, each of them is counted as many times as it is mentioned in
the help.


Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...