All Projects → lambdalisue → Fern.vim

lambdalisue / Fern.vim

Licence: mit
🌿 General purpose asynchronous tree viewer written in Pure Vim script

Projects that are alternatives of or similar to Fern.vim

Chadtree
File manager for Neovim. Better than NERDTree.
Stars: ✭ 653 (+18.3%)
Mutual labels:  tree, neovim, file-explorer
drex.nvim
Another directory/file explorer for Neovim written in Lua
Stars: ✭ 15 (-97.28%)
Mutual labels:  neovim, file-explorer
Dsladapter
🔥 Kotlin时代的Adapter, Dsl 的形式使用 RecyclerView.Adapter, 支持折叠展开, 树结构,悬停,情感图状态切换, 加载更多, 多类型Item,侧滑菜单等
Stars: ✭ 231 (-58.15%)
Mutual labels:  tree, async
Gen tags.vim
Async plugin for vim and neovim to ease the use of ctags/gtags
Stars: ✭ 288 (-47.83%)
Mutual labels:  async, neovim
React Native Pathjs Charts
Android and iOS charts based on react-native-svg and paths-js
Stars: ✭ 877 (+58.88%)
Mutual labels:  tree, cross-platform
Treedrawer
treedrawer is a Go module for drawing trees on the terminal.
Stars: ✭ 43 (-92.21%)
Mutual labels:  tree, drawer
Eiskaltdcpp
File sharing program using DC and ADC protocols
Stars: ✭ 277 (-49.82%)
Mutual labels:  cross-platform, mac
Punchclock
Make sure your asynchronous operations show up to work on time
Stars: ✭ 235 (-57.43%)
Mutual labels:  async, cross-platform
Negibox
All in one downloader 全能下载器
Stars: ✭ 335 (-39.31%)
Mutual labels:  cross-platform, mac
Screen capture lite
cross platform screen/window capturing library
Stars: ✭ 340 (-38.41%)
Mutual labels:  cross-platform, mac
Ng2 Tree
Angular tree component
Stars: ✭ 350 (-36.59%)
Mutual labels:  tree, async
Coc Explorer
📁 Explorer for coc.nvim
Stars: ✭ 722 (+30.8%)
Mutual labels:  tree, neovim
Ranger.vim
Ranger integration in vim and neovim
Stars: ✭ 510 (-7.61%)
Mutual labels:  neovim, file-explorer
Outwiker
Сross-platform software for keeping your notes in a tree
Stars: ✭ 198 (-64.13%)
Mutual labels:  tree, cross-platform
Async.vim
normalize async job control api for vim and neovim
Stars: ✭ 242 (-56.16%)
Mutual labels:  async, neovim
Iron.nvim
Interactive Repl Over Neovim
Stars: ✭ 265 (-51.99%)
Mutual labels:  async, neovim
Vim Signify
➕ Show a diff using Vim its sign column.
Stars: ✭ 2,390 (+332.97%)
Mutual labels:  async, neovim
Neomake
Asynchronous linting and make framework for Neovim/Vim
Stars: ✭ 2,512 (+355.07%)
Mutual labels:  async, neovim
Notable
The Markdown-based note-taking app that doesn't suck.
Stars: ✭ 18,866 (+3317.75%)
Mutual labels:  cross-platform, mac
Nvim Tree.lua
A file explorer tree for neovim written in lua
Stars: ✭ 383 (-30.62%)
Mutual labels:  neovim, file-explorer

🌿 fern.vim

Support Vim 8.1.2269 or above Support Neovim 0.4.4 or above Powered by vital.vim Powered by vital-Whisky MIT License Doc Doc (dev) reviewdog vim neovim

Split windows (netrw style)
nerdfont.vim / glyph-palette.vim / fern-renderer-nerdfont.vim / fern-git-status.vim

Project drawer (NERDTree style)
nerdfont.vim / glyph-palette.vim / fern-renderer-nerdfont.vim / fern-git-status.vim

See Screenshots for more screenshots.

Fern (furn) is a general purpose asynchronous tree viewer written in pure Vim script.


🔍 Click here to find fern plugins 🔍


Concept

  • Supports both Vim and Neovim without any external dependencies
  • Support split windows and project drawer explained in this article
  • Provide features as actions so that user don't have to remember mappings
  • Make operation asynchronous as much as possible to keep latency
  • User experience is more important than simplicity (maintainability)
  • Custamizability is less important than simplicity (maintainability)
  • Easy to create 3rd party plugins to support any kind of trees

Installation

fern.vim has no extra dependencies so use your favorite Vim plugin manager or see How to install page for detail.

Usage

Command (Split windows)

Screencast of Split windows

Open fern on a current working directory by:

:Fern .

Or open fern on a parent directory of a current buffer by:

:Fern %:h

Or open fern on a current working directory with a current buffer focused by:

:Fern . -reveal=%

The following options are available for fern viewer.

Option Default Description
-opener edit An opener to open the buffer. See :help fern-opener for detail.
-reveal Recursively expand branches and focus the node. See :help fern-reveal for detail.
-stay Stay focus on the window where the command has called.
-wait Wait synchronously until the fern viewer become ready.
:Fern {url} [-opener={opener}] [-reveal={reveal}] [-stay] [-wait]

Command (Project drawer)

Screencast of Project drawer

All usage above open fern as split windows style. To open fern as project drawer style, use -drawer option like:

:Fern . -drawer

A fern window with project drawer style always appeared to the most left side of Vim and behaviors of some mappings/actions are slightly modified (e.g. a buffer in the next window will be used as an anchor buffer in a project drawer style to open a new buffer.)

Note that addtional to the all options available for split windows style, project drawer style enables the follwoing options:

Option Default Description
-width 30 The width of the project drawer window
-keep Disable to quit Vim when there is only one project drawer buffer
-toggle Close existing project drawer rather than focus
:Fern {url} -drawer [-opener={opener}] [-reveal={reveal}] [-stay] [-wait] [-width=30] [-keep] [-toggle]

Actions

To execute actions, hit a on a fern buffer and input an action to perform. To see all actions available, hit ? or execute help action then all available actions will be listed.

Actions

Window selector

The open:select action open a prompt to visually select window to open a node. This feature is strongly inspired by t9md/vim-choosewin.

Window selector

Renamer action (A.k.a exrename)

The rename action open a new buffer with path of selected nodes. Users can edit that buffer and :w applies the changes. This feature is strongly inspired by shougo/vimfiler.vim.

Renamer

Plugins

Users

Most of functionalities are provided as plugins in fern. So visit Github topics of fern-vim-plugin or Plugins page to find fern plugins to satisfy your wants.

For example, following features are provided as official plugins

  • Netrw hijack (Use fern as a default file explorer)
  • Nerd Fonts integration
  • Git integration (show status, touch index, ...)
  • Bookmark feature

And lot more!

Developers

Please add fern-vim-plugin topic to your fern plugin. The topic is used to list up 3rd party fern plugins.

Then please add a following badge to indicate that your plugin is for fern.

[![fern plugin](https://img.shields.io/badge/🌿%20fern-plugin-yellowgreen)](https://github.com/lambdalisue/fern.vim)

Customize

Use FileType fern autocmd to execute initialization scripts for fern buffer like:

function! s:init_fern() abort
  " Use 'select' instead of 'edit' for default 'open' action
  nmap <buffer> <Plug>(fern-action-open) <Plug>(fern-action-open:select)
endfunction

augroup fern-custom
  autocmd! *
  autocmd FileType fern call s:init_fern()
augroup END

The FileType autocmd will be invoked AFTER a fern buffer has initialized but BEFORE contents of a buffer become ready. So avoid accessing actual contents in the above function.

See Tips pages to find tips, or write pages to share your tips ;-)

Contribution

Any contribution including documentations are welcome.

Contributors who change codes should install thinca/vim-themis to run tests before complete a PR. PRs which does not pass tests won't be accepted.

License

The code in fern.vim follows MIT license texted in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].