zovt / vim-dirvish

Directory viewer for Vim :zap:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dirvish.vim

Path navigator designed to work with Vim's built-in mechanisms and complementary plugins.

Features

  • Simple: Each line is just a filepath
  • Flexible: Mash up the buffer with :g, automate it with g:dirvish_mode
  • Safe: Never modifies the filesystem
  • Preserves the alternate buffer @# (and original buffer)
  • Non-intrusive defaults
  • 2x faster than netrw
  • Visual selection opens multiple files
  • :Shdo generates a shell script on selected files
  • :Shdo! generates a shell script on the Vim arglist
  • Less code, fewer bugs (96% smaller than netrw)
  • Compatible with Vim 7.2+

Concepts

Each line is a filepath (hidden by conceal).

  • Use plain old y to yank the path under the cursor, then feed it to :r or :e or whatever.
  • Sort with :sort, filter with :global. Press R to reload.
  • Instead of special "mark" commands, just add to the arglist, then :Shdo!.
    • Or add lines to quickfix (:'<,'>caddb) and iterate them (:cdo).
  • :set ft=dirvish on any buffer to enable Dirvish features. Try this:
    git ls-files | vim +'setf dirvish' -
    
  • Built-in commands like gf and CTRL-W f work.

Each Dirvish buffer name is the actual directory name, so commands and plugins that work with @% and @# do the Right Thing.

  • Create directories: :!mkdir %foo
  • Create files: :e %foo.txt
  • Enable fugitive (so :Gstatus works): autocmd FileType dirvish call fugitive#detect(@%)

Credits

Dirvish was originally forked from filebeagle (and completely rewritten). Thanks to @jeetsukumaran.

About

Directory viewer for Vim :zap:

License:Other


Languages

Language:Vim Script 100.0%