3

I tried using MF *.h for example to select all the files in the current directory that end with .h but this doesnt work.

What are good ways to mark multiple files using netrw?

  • You can do it with vim-netranger by pressing v – eyal karni Nov 1 '19 at 22:49
1

I'm not sure if it's a bug, but I did email the author.

Solution 1 (set working directory)

If you have set (the default was 1) let g:netrw_keepdir = 0

Which changes your working directory as your browse, it surprisingly works.

Another option is to do cd or lcd on the netrw buffer window to change the working directory to the current file's path. And do an :MF *.h

Note: Not to be confused as ex command (starts with :) cd is actually a normal binding on netrw buffer. It used to be c on previous version of netrw.

Example workflow. :lcd % (on the netrw buffer)

  1. lcd is for the local window, and % expands to the current path of the buffer
  2. :MF *.h

Solution 2 (apply mf on visual selection)

Visually select the files you want, then :normal mf, it'll show as :'<,'>normal mf to indicate selection

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.