Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

up vote 6 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

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.