Status: 1.0 "Release Candidate". 1.0 release will follow after some bake-time.
Dirvish is a minimalist path navigator for Vim, designed with the philosophy that plugins should harmonize with Vim's built-in mechanisms and with complementary plugins instead of re-inventing dead-end imitations.
Re-use and composition of concepts multiplies the utility of those concepts; if a plugin does not reuse a concept, both that concept and the new, redundant mechanism are made mutually less valuable—the sum is less than the parts—because the user now must learn or choose from two slightly different things instead of one augmented system. @tpope's plugins demonstrate this theme; more plugins should too.
- simple: each line is literally just a filepath
- flexible: mash up the buffer with
:g
and friends - safe: never modifies the filesystem
- original and alternate buffers are preserved
- meticulous, non-intrusive defaults
- 2x faster than netrw (try a directory with 1000+ items)
- visual selection opens multiple files
:Shdo
performs any shell command on selected file(s)- fewer bugs: 400 lines of code (netrw: 11000)
- compatible with Vim 7.2+
Each line in a Dirvish buffer is an absolute filepath (hidden by Vim's conceal feature). Each Dirvish buffer name is the actual directory name, so Vim commands and plugins (fugitive.vim) that work with the buffer name do the Right Thing.
- Create directories with
:!mkdir %foo
. - Create files with
:e %foo.txt
- Use plain old
y
to yank the path under the cursor, then feed it to:r
or:e
or whatever. - Instead of netrw's super-special mark/move commands, you can
:!mv <c-r><c-a> <c-r><c-a>foo
.- Or add lines to the quickfix list (
:'<,'>caddb
) and iterate them (:cdo
,:cfdo
).
- Or add lines to the quickfix list (
:set ft=dirvish
works on any list of files. Trygit ls-files|vim +'setf dirvish' -
.
How do I delete or rename a bunch of files?
Since :'<,'>call delete(getline('.'))
is a bit much to type, try :Shdo
(mapped to x
) in any Dirvish buffer to perform a shell command on a
range of lines.
How do I sort?
:sort i
. It's totally fine to slice, dice, and smash any Dirvish
buffer—it will never modify the filesystem. Just press R
to get the default
listing back.
Dirvish was originally forked from filebeagle. Thanks to @jeetsukumaran.