I've got a list of files that I want to copy from one place to another, I need to change the name slightly and I'd rather copy the file names instead of typing them over and over again.

If I do YP I copy the entire line

The best I can come up with is


or VEyP which I like a bit more because I can see the whitespace I'm about to muck up ahead of time.

But is there an even easier key combo that doesn't require thinking about what I'm doing to accomplish?

I've got:

root root 640 /path/to/file/1
root me 530 /path/to/file/2

and I want to have:

root root 640 path_to_file_1 /path/to/file/1
root me 530 path_to_file_2 /path/to/file/2

because I'm editing a script that'll copy a lot of files flattened into this directory into many other directories.




Not solve your problem?
Yank to the end of line.

  • Yep, that works great. What's the difference between E and $ in this case – Peter Turner Apr 28 '16 at 16:32
  • 1
    E goes to the end of a WORD, $ goes to the end of the line. See: :help E – Tumbler41 Apr 28 '16 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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