matchindent.vim


Ⅰ. 插件描述

Try and set the indent style to whatever is in the file being edited.

Ⅱ. 基本信息

创建日期:  2012-04-27
使用用户:  20
Github星:  9
插件作者:  Conor McDermottroe

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Match Indentation Style

Some people like tabs, some like spaces. Very few people like it when you edit
their stuff and use a different method of indentation.

This plugin scans through a file when it's opened and attempts to guess which
style of indentation is being used. It then overrides your preferences so that
you match the style of the file.

Currently it only detects the three most common styles of indentation, tabs, 2
spaces and 4 spaces. Patches to make this plugin more general are welcomed.

Installation

Using Pathogen

cd ~/.vim
git clone git://github.com/conormcd/matchindent.vim bundle/matchindent.vim

Manual Install

git clone git://github.com/conormcd/matchindent.vim
cp -R matchindent.vim/plugin/* ~/.vim/plugin/

添加新评论