This content originally appeared on DEV Community and was authored by Pavol Z. Kutaj
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.
- Use
vim-vinegar
to enhancenetrw
usability. - Press
-
to opennetrw
. - Mark the file with
mf
. - Copy the file with
mc
. - Input the new file name and press
Enter
.
LINKS
This content originally appeared on DEV Community and was authored by Pavol Z. Kutaj

Pavol Z. Kutaj | Sciencx (2025-01-16T14:59:56+00:00) How to Copy/Duplicate a File Duplicate in Vim (netrw+vinegar). Retrieved from https://www.scien.cx/2025/01/16/how-to-copy-duplicate-a-file-duplicate-in-vim-netrwvinegar/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.