Coder Social home page Coder Social logo

vim-dirvish's Introduction

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 local arglist
  • Less code, fewer bugs (96% smaller than netrw)
  • Compatible with Vim 7.2+

Concepts

Lines are filepaths (hidden by conceal).

  • Use plain old y to yank a path, then feed it to :r or :e or whatever.
  • Sort with :sort, filter with :global. Hit R to reload.
  • For complex scripting, :Shdo! (with !) operates on the local arglist.
  • Add lines to quickfix (:'<,'>caddb) and iterate (:cdo).
  • :set ft=dirvish on any buffer to enable Dirvish features:
    git ls-files | vim +'setf dirvish' -
    

Buffer name is the directory name. So commands and plugins that work with @% and @# do the Right Thing.

  • Create directories:
    :!mkdir %foo
    
  • Create files:
    :e %foo.txt
    
  • Use @# to get the Dirvish buffer from a :Shdo buffer:
    :Shdo
    mkdir <C-R>#.bk
    Z!
    

Edit Dirvish buffers for any purpose. It's safe and reversible.

  • Use :sort or :global to re-arrange the view, delete lines with d, etc. Then :%Shdo the result.
  • Pipe to :! to see inline results:
    :'<,'>!xargs du -hs
    
  • Type u to undo, or R to reload.

Credits

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

vim-dirvish's People

Contributors

adriaanzon avatar blueyed avatar cuviper avatar dmedvinsky avatar edkolev avatar jeetsukumaran avatar justinmk avatar lbonn avatar lifepillar avatar mattn avatar mhinz avatar nkgm avatar noahfrederick avatar rainerborene avatar xuanduc987 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.