A ranger plugin ported from urbainvaes/fzf-marks. It depends on command-line fuzzy finder junegunn/fzf.
Git clone the plugin into ranger's plugin folder. (ranger >= 1.9.3)
git clone https://github.com/laggardkernel/ranger-fzf-marks.git ~/.config/ranger/plugins/fzf-marksThen add key binding for bookmark jump in rc.conf.
map <C-g> fzmCommands:
:fmark <markname>, add a current dir as bookmark:fzm [<optional-query-keyword>], jump to a bookmark:dmark [<optional-query-keyword>], delete a bookmark
Bookmark jumping could be also be triggered with key binding like <C-g>.
Other features like output colorization, custom fzf command are not implemented. This plugin only ensure basic usage of bookmark with fzf support.
Customization is supported by environment variables.
FZF_MARKS_FILE, same variable used in
urbainvaes/fzf-marks, defaults to ${HOME}/.fzf-marks.
FZF_MARKS_CMD, path to the fzf executable binary. You don't need this
unless your fzf is not added in the PATH.
FZF_FZM_OPTS, controls how command fzm (from this plugin) behave, defaults to
--cycle +m --ansi --bind=ctrl-o:accept,ctrl-t:toggle --select-1.
FZF_DMARK_OPTS, controls how command dmark (from this plugin) behave,
defaults to --cycle -m --ansi --bind=ctrl-o:accept,ctrl-t:toggle.
(dmark only supports delete one mark at each time for now, that's why I use -m)
Besides above FZF_* related settings, fzf's behavior is also controlled by
FZF_DEFAULT_OPTS, which is an env from fzf itself. Read man fzf for
detail.
The default fzf layout --layout=default display from the bottom of the screen.
For anyone who like it to be display from the top to the bottom,
try --reverse and --height, --min-height to get what you want. e.g.
export FZF_FZM_OPTS="--reverse --height 75% --min-height 30 --cycle +m --ansi --bind=ctrl-o:accept,ctrl-t:toggle --select-1"
export FZF_DMARK_OPTS="--reverse --height 75% --min-height 30 --cycle -m --ansi --bind=ctrl-o:accept,ctrl-t:toggle"- Custom storage support with
FZF_MARKS_FILE - Delete action support in
:fzm - Batch deletion support in
:dmark - Make
fmark,dmarkstyle customizable
The MIT License (MIT)
Copyright (c) 2021 laggardkernel