You cannot use y
, p
etc., to copy files in netrw - it comes with its own commands. See :h netrw-mc
:
MARKED FILES: COPYING netrw-mc {{{2
(See netrw-mf and netrw-mr for how to mark files)
(Uses the global marked file list)
Select a target directory with mt (netrw-mt). Then change directory,
select file(s) (see netrw-mf), and press "mc". The copy is done
from the current window (where one does the mf) to the target.
If one does not have a target directory set with netrw-mt, then netrw
will query you for a directory to copy to.
One may also copy directories and their contents (local only) to a target
directory.
Your case is simplified since ./A
is the parent of ./A/B
:
- Open
./A/B
, move to the line having ../
,
- Mark it with
mt
- Move to the line with the file you want to copy.
- Press
mf
, and then mc
.
Example:
$ tree foo
foo
└── bar
└── test
1 directory, 1 file
$ vim foo/bar
Now:
Move to ..
and press mt
:

The header will change to show the current target:

Move to the file (here test
) and press mf
. It gets highlighted for me:

Press mc
- the highlighting goes away. Now navigate to the parent folder - the file should be present:

mt
on the target directory in which you want to make a copy of a file (to mark it ; the path to the folder should appear in the banner afterCopy/Move Tgt:
), hitmf
on the file you want to copy to mark it as well, then hitmc
to actually perform the copy.