Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to insert my current PATH effectively onto my document.

I run unsuccesfully

:echo $PWD



How can you insert your current PATH in the VIM -document on your your document?

share|improve this question
up vote 8 down vote accepted

Like this:

:r ! pwd
share|improve this answer
What does r stands for? – OscarRyz Jul 24 '09 at 23:21
Read, I believe. – jtbandes Jul 24 '09 at 23:25
Yes. "Read from command pwd into the current buffer." – geekosaur Mar 17 '11 at 6:54

You can use :.!pwd in vim's normal mode.

share|improve this answer

This may be more platform independent:

share|improve this answer
Works perfectly on Windows! – DigitalEye Feb 12 at 22:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.