fzf-project


Ⅰ. 插件描述

A vim plugin to make project switching easier using fzf.vim

Ⅱ. 基本信息

创建日期:  2019-05-06
使用用户:  1
Github星:  2
插件作者:  Ben Wainwright

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

fzf-switch-project

This plugin provides an easy way of switching between project directories
indexed from a specified workspace folder or folders. I originally stole
from kieran-bamforth 's dotfiles.

Install

Install via Plug:

Plug 'benwainwright/fzf-switch-project'

Configure

let g:fzfSwitchProjectWorkspaces = [ '~/workspace1', '~/workspace2' ]

automatically list projects in the above folders

let g:fzfSwitchProjectProjects = [ '~/folder1', '~/folder2' ]

add individual folders to the project list (I use it for my
dotfiles folder)

let g:fzfSwitchProjectsGitInitBehaviour = 'ask' " default

fzf-switch-project can automatically initialise a git repository for you if
you switch to a project folder without one. The possible values are:

  • ask (default) prompt the user to confirm if a new git repository should be

    initialised
  • auto always initialise a new git repository if one isn't found
  • none do nothing

Usage

Running FzfSwitchProjects in command mode will produce a list of folders from
within your workspace folders that contain a .git folder at their root (I
may make this filtering optional in the future). When you select a project, the
working directory is changed and the GitFiles command from fzf.vim
is initiated to allow you to switch to a file within the project.

Dependencies

添加新评论