Skip to content

SidOfc/treevial

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Treevial

⚠️⚠️ Treevial is under no longer maintained! ⚠️⚠️

Neovim users can take a look at Carbon.nvim - A pure lua file explorer written for Neovim.

Treevial is yet another file explorer for (n)vim. With this plugin enabled, Netrw will be disabled and Treevial will launch instead.

Why Treevial?

  • Treevial does not leave buffers &modified AND &readonly.
  • it has some tests.
  • it has one clear view mode: Tree view.
  • it supports "single file/folder" merging like github.

Core functionality

  • It has 3 mappings for navigating up and down the tree
    • -: may be preceded by a count of how many directories to move up
    • =: move into directory, may be preceded by count on folded paths to move into Nth directory from left
    • .: move to the initial root directory when you first opened (n)vim
    • ~: move to the home directory
  • It has 4 mappings to handle file opening and directory expanding / collapsing
    • enter: toggle directory open / closed or if file, open it in a buffer
    • shift+enter: same as enter except when closing, closes all nested child directories (nvim only by default)
    • ctrl+v: open file in vertical split, no-op on directories
    • ctrl+x: open file in horizontal split, no-op on directories
  • It has 3 mappings for performing actions:
    • m: Move below cursor or selection
    • d: Delete below cursor or selection
    • c: Create below cursor or directory
  • And 3 mappings to handle selections:
    • u: unmark all
    • tab: Toggle mark below cursor and move to next line
    • shift+tab: Toggle mark below cursor and move to previous line

Roadmap

  • Fix resync issue causing failure to unmark parent entries properly.
  • Completely isolate tests from each other.
  • Make mappings configurable.
  • document g:treevial_* settings.
  • Write more tests.
    • marking / unmarking child directories.
    • marking / unmarking folded paths.
    • moving more than one file / directory at once.
    • deleting more than one file / directory at once.
  • Make the README user-friendly.

Development

After cloning the repo, use the following command to start (n)vim with minimal required setup:

nvim -Nu dev.vimrc

This loads (n)vim in Nocompatible mode, using provided dev.vimrc.

Testing

Treevial uses junegunn/vader.vim as its testing framework. It assumes vader.vim is installed in $HOME/.vim/plugged/vader.vim.

There is only a limited amount of tests available since there's only a limited amount of things I know how to test (somewhat) properly 😅. To run the tests, use the following command to start (n)vim with minimal required testing setup:

nvim -Nu test.vimrc -c 'Vader test/main.vader'

Using Vader instead of Vader! keeps (n)vim open to allow for debugging. If you've got ideas on how to test more functionality of Treevial, please drop an me an issue 👍

About

Yet another file explorer for vim and nvim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published