fzf-extras


Ⅰ. 插件描述

Key bindings from fzf wiki

Ⅱ. 基本信息

创建日期:  2015-04-04
使用用户:  1
Github星:  116
插件作者:  Andy Weidenbaum

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# fzf-extras

Additional key bindings for fzf, primarily Bash.

Usage

Bash

directory

bash cmdlinedescription
zd'fuzzy-finder' + 'cd' = 'zd', the super function of _fd, _fda, _fdr, _fst, _cdf, _zz
_cdfcd into the directory of the selected file
_fdcd into selected directory
_fdacd into selected directory, including hidden directories
_fdrcd into selected parent directory
_fstcd into the directory from stack
_zzSelectable cd to 'frecency' directory

file

bash cmdlinedescription
eOpen 'frecency' files with $VISUAL editor
fe [FUZZY PATTERN]Open selected file with $EDITOR
foEquivalent to fe, but opens file with $OPENER (default: xdg-open) if you press Ctrl+O
vOpen selected files from ~/.viminfo with $EDITOR

git

bash cmdlinedescription
fbrCheckout Git branch (including remote branches)
fcoCheckout Git branch/tag
fcocCheckout Git commit
fcsGet Git commit SHA hash
fshowGit commit browser
fstashGit stash management (Enter to show contents of the stash, Ctrl+D to show a diff of the stash against your current HEAD, Ctrl+B to check the stash out as a branch, for easier merging)
fzf-gitlog-multi-widgetMulti-selectable git show
fzf-gitlog-widgetGit log browser

history

bash cmdlinedescription
fhSelect line from history, repeat without editing
fheSelect line from history, leave for editing
runcmdUtility function used to run the command in the shell
writecmdUtility function used to write the command in the shell

pid

bash cmdlinedescription
fkillSelect process to kill (alternatively, type kill˽Tab)

tags

bash cmdlinedescription
ftagsSearch ctags

tmux

bash cmdlinedescription
fs [FUZZY PATTERN]Select tmux session
ftpaneSwitch pane

Zsh

file

zsh cmdlinedescription
Alt-iPaste the selected entry from locate output into the command line

Installation

Install fzf-extras

Arch Linux

Install aur/fzf-extras.

Manual

git clone https://github.com/atweiden/fzf-extras ~/.fzf-extras

Configure fzf-extras

To make use of function fo, consider setting the $OPENER environment

  1. If $OPENER is unset, fo will attempt to open files with
    xdg-open when pressing Ctrl+O.

Arch Linux

cat >> ~/.bashrc <<'EOF'
OPENER=mimeo
EOF

MacOS

cat >> ~/.bashrc <<'EOF'
OPENER=open
EOF

Source fzf-extras

Arch Linux

# bash users only
cat >> ~/.bashrc <<'EOF'
[[ -e "/usr/share/fzf/fzf-extras.bash" ]] \
  && source /usr/share/fzf/fzf-extras.bash
EOF

# zsh users only
cat >> ~/.zshrc <<'EOF'
[[ -e "/usr/share/fzf/fzf-extras.zsh" ]] \
  && source /usr/share/fzf/fzf-extras.zsh
EOF

Manual

# bash users only
cat >> ~/.bashrc <<'EOF'
[[ -e "$HOME/.fzf-extras/fzf-extras.sh" ]] \
  && source "$HOME/.fzf-extras/fzf-extras.sh"
EOF

# zsh users only
cat >> ~/.zshrc <<'EOF'
[[ -e "$HOME/.fzf-extras/fzf-extras.zsh" ]] \
  && source "$HOME/.fzf-extras/fzf-extras.zsh"
EOF

Zsh users should not be sourcing fzf-extras.sh.

The lack of meaningful support for Zsh will be fixed pending suitable
PRs from Zsh-using contributors. Note it is perfectly acceptable
to duplicate code from fzf-extras.sh into fzf-extras.zsh. See:
https://github.com/atweiden/fzf-extras/issues/12.

Dependencies

Required

Optional

Sources

See Also

License

MIT

添加新评论