vim-vimignore


Ⅰ. 插件描述

An extension to vim-fugitive for edit gitignore files

Ⅱ. 基本信息

创建日期:  2015-05-26
使用用户:  1
Github星:  2
插件作者:  Nate Fischer

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vimignore

A simple plugin to allow you to efficiently manage your .gitignore files in
your project.

Introduction

I came up with the idea for this plugin when I was working on various projects
with partners and would need to reconfigure the gitignore file for the

  1. I had to do this often enough that I felt that it should flow more
  2. in vim.

I decided to make this plugin to facilitate the process. Vimignore offers a
few different commands for making sure the appropriate files are ignored.

Usage

Simply call :GEditIgnore to open up your .gitignore file.

If no file exists, this will open a new .gitignore file in the root of the
git repo.

If you have multiple .gitignore files, this plugin will prefer the one at
the root. If that does not exist, it will then prefer the deepest .gitignore
file along your path.

Also, you can use the :GAddToIgnore and :GIgnoreCurrentFile commands for
alternative methods of editing the .gitignore file.

See :help vimignore from within vim for up-to-date documentation on all
available commands.

Fugitive Integration

The best way to use this plugin is in conjunction with [Tim Pope's fugitive
plugin](https://github.com/tpope/vim-fugitive). In particular, when using
fugitive's :Gstatus command, Vimignore adds a mapping on I.

Press <shift>-i when viewing the git index (:Gstatus window) to add the file
on the current line to the gitignore list and update the git index accordingly.

Configuration

If you open an empty instance of vim, this will open the .gitignore in the
entire buffer. If you already are editing a file, it will open the
.gitignore file in a split.

The plugin will, by default, open this in a horizontal split. To configure this,
set the following variable:

let g:gsplit_pref = 1

Set this to 0 in order to reconfigure vim to use horizontal splits.

添加新评论