DEV Community

Pavol Z. Kutaj
Pavol Z. Kutaj

Posted on

How to Copy/Duplicate a File Duplicate in Vim (netrw+vinegar)

USECASE

The aim of this page πŸ“ is to explain how to duplicate a file in Vim using the netrw file explorer with the vim-vinegar plugin.
Spent way too much time, given that R is shorthand for renaming the file.

Image description

  • Use vim-vinegar to enhance netrw usability.
  • Press - to open netrw.
  • Mark the file with mf.
  • Copy the file with mc.
  • Input the new file name and press Enter.

LINKS

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay