Ⅰ. 插件描述
Keep indent consistent without any effortⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'luochen1990/indent-detector'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'luochen1990/indent-detector'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'luochen1990/indent-detector'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/luochen1990/indent-detector.vim
Ⅳ. 文档说明
Indent Detector
features
- detect mixed indent(indent with both spaces and tabs) and echo warnning on
bufEnterandbufWriteautomatically. - switch setting about indenting to fit the current indenting style automatically.
- detecting time is limited, so you don't need to worry about opening huge files.
note
- the options decided by this plugin are
expandtabsmarttabtabstopshiftwidthsofttabstop, and is setted viasetlocal. - your own setting about indenting is also used as default when the indenting style is not decided. (when you create an empty file or enter a file which occurs no leading spaces or tabs)
- this plugin will do nothing when you open an readonly file (
:echo &readonlyto check that), so that you can open help files without warnning.
install
via Vundle:
Bundle 'luochen1990/indent-detector.vim'manually
put indentdetector.vim to directory ~/.vim/plugin or vimfiles/plugin
remenber to restart your vim after installation