Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
created 2008 · complexity basic · author Metacosm · version 7.0
Vim can read and write environment variables within your current shell session. Use a
$ prefix to identify an environment variable, as in the following examples.
Display the contents of the PATH environment variable:
Assign the PATH environment variable to a Vim variable:
:let myvar = $PATH
Change the PATH environment variable for the current session:
:let $PATH = '/foo:/bar'
Insert the contents of the PATH environment variable into the buffer:
i to enter insert mode, press Ctrl-r then
=$PATH and press Enter.
Append to the Existing Path.
:let $PATH .= ':/foo:/bar'