yaifa


Ⅰ. 插件描述

Yet Another Indent Finder, Almost...

Ⅱ. 基本信息

创建日期:  2010-05-20
使用用户:  48
Github星:  18
插件作者:  Israel Chauca Fuentes

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Yaifa: Yet another indent finder, almost...

This plug-in will try to detect the kind of indentation used in your file and
set the indenting options to the appropriate values. It recognizes three types
of indentation:

  1. Space: Only spaces are used to indent.
  2. Tab: Only tabs are used.
  3. Mixed: A combination of tabs and space is used. e.g.: a tab stands for 8

    spaces, but each indentation level is 4 spaces.
    

In order to guess the indentation of the buffer, it looks for increments in
the indentation level and into the involved lines to see the type of
indentation and the number of spaces of the change. The type of indentation
with the most lines is used to set the options.

If Yaifa ever guesses wrong indentation, send me immediately a mail, if
possible with the offending file, or open an issue on GitHub.

This script is based on Philippe Fremy's Python script
Indent Finder, hence the "almost"
part of the name.

添加新评论