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 want to run p4 edit filename for each file open in my args list. I tried:

:argdo exec "p4 edit %"

but I get:

E488: Trailing characters: p4 edit %

for each file. Why?

share|improve this question
up vote 3 down vote accepted

You are very close to the command you need, only "!" is missing:

:argdo exec "!p4 edit %"

See ":help :!".

share|improve this answer
Thanks. I can't vote you up because I don't have 15 reputation...but you deserve one. – wonk wonk Feb 29 '12 at 23:15

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.