Code Monkey home page Code Monkey logo

dirvish's Introduction


A minimalistic yet versatile file manager based on Dired

Introduction

This package gives Dired the following features:

  • Multiple window layouts
  • Always available file preview
  • Isolated sessions
  • Asynchronous directory listing
  • A modern and composable user interface

A Dired, a ranger, a neotree, this is Dirvish ;)

Screenshots

https://user-images.githubusercontent.com/16313743/159170480-1901925c-e4dc-4c43-a280-348890bdfcf4.png Figure 1. dirvish: A file browser/manager with live preview

sessions.mp4

Figure 2. dirvish-dired: A brand new Dired.

side.mp4

Figure 3. dirvish-side: A “neotree” leveraging Dired.

non-blocking-dired.mp4

Figure 4. Huge directories no longer hung up Emacs

Installation

Dirvish is available on Melpa, you can install it directly via package-install if you have melpa in your package-archives.

For straight.el users

(straight-use-package 'dirvish)

Manual install

To install it manually, first clone this repository, then add path/to/dirvish to your load-path.

(add-to-list 'load-path "/path/to/dirvish")
;; If you want the extensions as well
(add-to-list 'load-path "/path/to/dirvish/extensions")
(require 'dirvish)

Quickstart

Start a Dirvish session by M-x dirvish or dirvish-dired.

  • dirvish-dired creates a session in current window (like dired).
  • dirvish creates a session that makes use of the whole frame.

dirvish-toggle-fullscreen allows you to toggle the fullscreen state of the current session.

Dirvish doesn’t change any of your Dired config nor rebind any keys in dired-mode-map. As a result, a Dired user already knew how to use Dirvish. (see also: How is Dirvish related to Dired?)

It is also recommended to enable dirvish-override-dired-mode, which makes all your Dired entry commands including dired[-other-window/tab/frame] initialize or reuse a Dirvish session automatically.

Extensions

Several small extension packages to Dirvish are maintained in the subdirectory extensions/. They are installed together with Dirvish if you pull the package from MELPA, Dirvish can work properly with or without them though. These extensions are inactive by default and can be enabled manually if desired.

Currently the following extensions come with the package:

With these extensions it is possible to adapt Dirvish such that it matches your preference or behaves similar to other familiar file explorers.

Customization

See Configuration.org (included docs for extensions).

Related projects

Generally speaking, Dirvish should be able to handle most of the file exploring/managing tasks, after all it is backed by the superb Dired. Besides, choose Dirvish over packages listed below gives you:

  1. An unified user interface in all your file managing scenarios.
  2. File preview at your disposal.
  3. Less package configs to maintain or worry about.

neotree

neotree works pretty well as a simple project explorer. But sadly, compare to dirvish[-side], this package is not built on top of Dired, which means you have to learn or configure a different set of commands, meanwhile, it is way less powerful as Dired/Dirvish in terms of file managing.

treemacs

Same as neotree, but treemacs is a much more mature yet complex package. It can even be used as a general rendering backend of any tree-like structures, you may find this package useful when you have related needs. It might be an overkill for simple project exploring tasks due to its complexity and huge codebase.

dired-sidebar

dired-sidebar and dirvish-side do almost exact the same thing: create a file explorer at side window that leveraging the power of Dired. dired-sidebar also includes some basic integration with serveral 3rd-party packages and other small niceties such as file watching. dirvish-side, at least for now, is relatively primitive.

ranger.el

See this discussion.

Issues

  • There maybe incompatibilities with other third-party Dired packages.

Please feel free to report any issues.

FAQ

How is Dirvish related to Dired?

A Dirvish session holds a set of buffers with dirvish-mode as its major-mode. As discussed above, since dirvish-mode is a derived mode from dired-mode, most of the Dired commands work exactly the same in a dirvish-mode buffer.

Nonetheless, Dirvish and Dired handle these aspects differently:

Isolated sessions

Each Dirvish has its own window layout along with some other isolated niceties such as header string. This makes it easy for Dirvish to adapt itself towards different file management tasks (See screenshots).

Buffer management

dired command and friends create new Dired buffers, hence navigating through the file system always end up with a lot of Dired buffers. To avoid this, one can either replace dired-find-file with dired-find-alternate-file or enable dired-kill-when-opening-new-dired-buffer, but they introduce two new issues:

  • The Dired buffers in other windows/tabs/frames might be killed unexpectedly
  • The Dired buffers are no longer reusable

As a comparison, the directory/preview buffers are reused during a Dirvish session and get killed when user explicitly exit the session.

Mode line

Dirvish has its own mode-line that can be customized with dirvish-mode-line-format, hence the dired-switches-in-mode-line option doesn’t work in Dirvish.

How do I customize the preview content?

See Preview strategies.

Acknowledgements

This package is inspired a lot by ranger.el, thanks @ralesi for creating and maintaining it.

The name dirvish is a tribute to vim-dirvish.


https://melpa.org/packages/dirvish-badge.svg https://stable.melpa.org/packages/dirvish-badge.svg https://github.com/alexluigit/dirvish/actions/workflows/melpazoid.yml/badge.svg

dirvish's People

Contributors

alexluigit avatar agsdot 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.