Answers:
不能使用y
,p
等等,在NETRW复制文件-它有它自己的命令。见: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.
您的情况得到了简化,因为它./A
是的父项./A/B
:
./A/B
,移至具有的行../
,mt
mf
,然后按mc
。例:
$ tree foo
foo
└── bar
└── test
1 directory, 1 file
$ vim foo/bar
现在:
我将从命令行模式执行此操作:
:!mv <C-R><C-F> ../<C-R><C-F>
这里<C-R><C-F>
在光标下插入文件名,因此您不必键入文件名。
./
(或要复制的目录)上,按mt
mf
,然后按mc
,输入新文件的名称,enter
(netrw) tried using g:netrw_localcopycmd<cp>; it doesn't work!$
mt
要在其中复制文件的目标目录(以进行标记;标记为;文件夹的路径应在后面的横幅中Copy/Move Tgt:
),击中mf
要复制的文件以将其标记为好,然后点击mc
以实际执行复制。