How to view environment variables in Vim

List of all environment variables in Vim.

When Vim is started, it grabs the environment variables of the operating system (like PATH) and it also sets it own internal environment variables (like MYVIMRC).

To see all the environment variables available inside Vim, type :echo $ and press Ctrl-D

To see the value that is currently assigned to a particular environment variable, for example $VIM, type :echo $VIM

For more details go here.

Tried with: Vim 7.3.46 on Windows 7 64-bit

2 thoughts on “How to view environment variables in Vim

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.