Git Product home page Git Product logo

vim-fern-bookmark's Introduction

🌿 fern-bookmark.vim

fern plugin

A plugin for fern.vim which provides simple bookmark feature.

Usage

First of all, open fern for any scheme and hit B to save selected nodes to bookmarks. Then, execute the following command to open a bookmark tree.

:Fern bookmark:///

In bookmark tree, you can manually create a new bookmark with N or edit with e. Or, hit <Return> to open the bookmark, x to open the bookmark with a system program, or execute cd/lcd/tcd action to change current directory.

Mapping/Action

Addition to the builtin mappings/actions, the followings are available for bookmark scheme.

Mapping Action Description
N new-leaf Add new bookmark
K new-branch Add new bookmark folder
D remove Remove bookmark or folder
x open:system Open the bookmark with a system program
cd Change directory with cd command
lcd Change directory with lcd command
tcd Change directory with tcd command

And the followings are available for ANY scheme.

Mapping Action Description
B save-as-bookmark Save selected nodes as bookmarks (node must has bufname)

Config

See :help fern-bookmark-variable.

License

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

vim-fern-bookmark's People

Contributors

lambdalisue avatar

Stargazers

 avatar  avatar Lafixier Rafinantoka avatar  avatar Andy Shevchenko avatar HongKong avatar Mantas Sidabras avatar Luma avatar ◤◢◤◢◤◢◤◢ avatar Leonid V. Fedorenchik avatar Yuta Katayama avatar tamago324 avatar Ian McGaunn avatar jlx avatar tg-z avatar  avatar Tsuyoshi CHO avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

rex1fernando

vim-fern-bookmark's Issues

How to use bookmark folders?

Although it is possible to create folders/branch, I can't see any way to move a bookmark into a folder. Are there commands missing in your documentation or am I misunderstanding the usage of these folders?

can not remove the bookmark

when opened the bookmark tree, i can open the history bookmark and overwrite it by press 'N', but i can not delete it by press 'D'.
however i found another way by press 'a' and input 'remove', then the bookmark could be removed.
could you tell me how to fix this?
env:
neovim v0.6.1
vim-config: rafi/vim-config

Error on startup

Error during neovim startup:

Error detected while processing /home/djromero/.local/share/nvim/plugged/fern-bookmark.vim/plugin/fern_bookmark.vim:
line    6:
E121: Undefined variable: g:fern#mapping#mappings
E116: Invalid arguments for function extend

And the bookmarks scheme doesn't work.

The relevant part of the configuration:

Plug 'lambdalisue/fern.vim'
Plug 'lambdalisue/fern-renderer-devicons.vim'
Plug 'lambdalisue/fern-bookmark.vim'

let g:fern#renderer = "devicons"
nnoremap <Leader>t :Fern . -drawer -reveal=%<CR> " open tree drawer and reveal current file
nnoremap <Leader>x :Fern %:h -reveal=%<CR>       " browse current files' directory

Before adding the bookmarks plugin it worked fine.

Neovim version: NVIM v0.5.0-360-g1f479fffb

g:fern#scheme#bookmark#store#file does not exist by default and is not document in the repo readme

My init.vim has both

	Plug 'lambdalisue/fern.vim'
	Plug 'lambdalisue/fern-bookmark.vim'

If I open any file in neovim, e.g. my init.vim and execute :Fern bookmark:/// I get an empty Fern window.
Executing :messages gives the following:

[fern] ERROR: Vim(let):E121: Undefined Variable: g:fern#scheme#bookmark#store#file

This also shows up if I open Fern normally and press B to bookmark - no text in the status-line, and that error message shows in :messages.

This can be resolved by adding

let g:fern#scheme#bookmark#store#file = "~/.fern/bookmark.json"

to the vim config.

However, this variable is said to already have a default value of "~/.fern/bookmark.json" in the helpfile, and as such, I'm inclined to say this is probably a bug. Also, the GitHub readme only mentions the other variable.

Please consider checking up on that, and if it is intentional, I would like to suggest adding a message to the help-file and repository readme that users need to set it, as it is not necessarily obvious by default.

Does not work on Vim 8.2

Error detected while processing function <SNR>31_BufReadCmd[4]..fern#internal#viewer#init[2]..<SNR>204_init[26]..fern#internal#scheme#provider_new[1]..<SNR>209_call[2]..fern#scheme#bookmark#provider#new[1]..fern#scheme#bookmark#store#read:
line    3:
E730: using List as a String
Error detected while processing function <SNR>31_BufReadCmd:
line    4:
E488: Trailing characters

Default Key Mappings Not Set

eg. I do not have d mapped to the remove action when the bookmarks are open.

Are the keycaps B, d, etc set as described in the readme ?

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.