Search code examples
vifm

Create and manage filelists with vifm


There is a directory with subdirs and files in it. I need to create filelists, which can then later be used as ignorelists, or includelists, etc, for future operations on those. All structure needed to be checked manually.

vifm allows very fast manual movement through filesystem and viewing files.

Is it possible to create such filelists with vifm? Ideally with file list on left pane, and filelist file on the right, for example? Or simple yanking filenames and directories with paths into some register?


Solution

  • You might be looking for custom views. You can populate one with a command like:

    :!find %u
    

    and then exclude files via zd shortcut. There is no way of adding files to such a view after construction, so you need to proceed by exclusion.

    List can be saved to a file like this:

    :%!for i in %f; do echo "$i" >> FILE-LIST; done
    

    Or you can create a file (can't be empty though, so add extra line) in one pane and press e to activate view mode and then append file paths to that file via command like:

    :!echo %c:p >> %C
    

    R key in view pane will reload your file (F will toggle tracking changes in it, but it will also scroll it to the end).