fzf-marks


Ⅰ. 插件描述

Plugin to manage bookmarks in bash and zsh

Ⅱ. 基本信息

创建日期:  2015-06-04
使用用户:  1
Github星:  266
插件作者:  Urbain Vaes

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'urbainvaes/fzf-marks'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'urbainvaes/fzf-marks'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'urbainvaes/fzf-marks'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/urbainvaes/fzf-marks

Ⅳ. 文档说明

# fzf-marks
This plugin can be used to create, delete, and navigate marks in bash and zsh.
It depends on Junegunn Choi's fuzzy-finder fzf.


(This video was generated with screenkey -g $(slop -n -f '%g') and simplescreenrecorder.)

Installation

If you use zsh, I recommend installing with a plugin manager.
In the case of zgen, for example,
simply add the following line to your plugin list:

    zgen load urbainvaes/fzf-marks

If you use bash,
or if you use zsh without a plugin manager,
source the file fzf-marks.plugin.bash or fzf-marks.plugin.zsh from your shell startup file
to enable the plugin.

Bash installation example:

# Clone the git repository in the current directory
git clone https://github.com/urbainvaes/fzf-marks.git

# Add a line to ~/.bashrc to load the plugin whenever bash starts in interactive mode
echo "source $PWD/fzf-marks/fzf-marks.plugin.bash" >> ~/.bashrc

# Source the plugin now so we don't have to restart bash to start using it
source fzf-marks/fzf-marks.plugin.bash

Usage

The script exposes two functions:

  • mark <mark>, to register a new mark to the current directory;
  • fzm [<optional-initial-query>], to jump to or delete a mark using fzf.

Most of the keybindings in the search window are the default fzf ones.
The only additions are

  • ctrl-y, to jump to a match;
  • ctrl-t, to toggle a match for deletion;
  • ctrl-d, to delete selected matches.

By default, the plugin binds the key ctrl-g to fzm.

Customization

ConfigDefaultDescription
FZF_MARKS_FILE${HOME}/.fzf-marksFile containing the marks data
FZF_MARKS_COMMANDfzf --height 40% --reverseCommand used to call fzf
FZF_MARKS_JUMP\C-g (bash) or ^g (zsh)Keybinding to fzm
FZF_MARKS_COLOR_LHS39 (default)ANSI color code of left-hand side
FZF_MARKS_COLOR_RHS36 (cyan)ANSI color code of right-hand side
FZF_MARKS_COLOR_COLON33 (yellow)ANSI color code of separator
FZF_MARKS_NO_COLORS0Set this to 1 to disable colors
FZF_MARKS_KEEP_ORDER0Set this to 1 to keep order of marks

See e.g. here for a description of ANSI color codes.

License

MIT

添加新评论