Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim netrw copy commands

Tags:

vim

I have removed NerdTree for netrw and have most all of the same functionality. The 2 that I am missing I really would like to have if it is possible while in the filesystem.

  1. Can I copy a file while browsing the filesystem?
  2. Can I copy a directory while browsing the filesystem?

If I was to have these 2 I would have exactly the same as I had with NerdTree, only wanting to use netrw because I would know it is on all machines that I would work with without having to have NerdTree.

Thank you for your help

like image 371
pertrai1 Avatar asked Nov 16 '14 14:11

pertrai1


People also ask

What is Netrw in Vim?

netrw - the unloved directory browser The netrw plugin normally ships with vim and is the default filebrowser. It gets a bad rap and ships with all kinds of features likes remote editing over SSH and FTP, and anecdotally has many bugs.

How do I browse files in vim?

The command :Explore opens the file explorer window. Select a file or directory name and press Enter to open that file or directory. (For example :e /home/user displays the contents of that directory.) To return to the explorer window, press Ctrl-^ (usually Ctrl-6).

How do I open Netrw files?

To launch netrw: Run vim with a directory as the command-line argument. :edit path/to/a/directory Enter (or :e <path/to/a/directory )


1 Answers

  1. Mark the file you want to copy:

    mf
    
  2. Mark its target directory:

    mt
    
  3. Copy the file:

    mc
    

It looks like copying a directory isn't possible in my version.

like image 70
romainl Avatar answered Oct 30 '22 12:10

romainl