vim-pathfinder


Ⅰ. 插件描述

Sets the path variable relative to project

Ⅱ. 基本信息

创建日期:  2016-01-10
使用用户:  2
Github星:  0
插件作者:  Simen Owesen-Lein

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-pathfinder

Vim plugin that manages the path variable. This makes file searching with the native :find and gf commands easier.

The plugin provides two Vim commands: :UpdatePath and :Cd. :UpdatePath will fill the path variable and runs when Vim launches. It does not run on directory change, therefore :Cd is available. It is just like :cd except it runs :UpdatePath just after the directory changes.

:UpdatePath looks for a parent .git directory and uses that as the project root directory. It uses the current directory if no repository is found.

Requires ag The Silver Searcher to be installed on the computer.

Options

There are some options to customize the behaviour of vim-pathfinder.

g:pathfinder_include

Include your own folders in the search path.

let g:pathfinder_include='/home/supersimen/documents,/home/supersimen/Dropbox/**'

Use /** after the folder name to include subfolders. The path must be absolute, so using ~/ will not work.

Tips

  • set suffixesadd+=.js,.java to help Vim recognize filenames without extensions.
  • set wildignorecase to enable case insensetive file searching.

添加新评论