Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to view environment variables in Vim

📅 2012-Jun-26 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ environment, variable, vim ⬩ 📚 Archive

[caption id="attachment_2633" align="aligncenter" width="640"][ ]( List of all environment variables in Vim.[/caption]

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