editorconfig


Ⅰ. 插件描述

An implementation of http://editorconfig.org/ in 100% VimL

Ⅱ. 基本信息

创建日期:  2015-11-13
使用用户:  1
Github星:  7
插件作者:  Barry Arthur

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'dahu/editorconfig-be-who-we-are'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'dahu/editorconfig-be-who-we-are'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'dahu/editorconfig-be-who-we-are'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

== EditorConfig

Let's work as a team and do it my way.

TIP: If you like EditorConfig and want to share the W00t!, I'm grateful
for https://www.gittip.com/bairuidahu/[tips] or
http://of-vim-and-vigor.blogspot.com/[beverages].

NOTE: This is currently an alpha quality plugin. Feedback welcome.

=== :EditorConfig

The :EditorConfig command will apply the discovered settings
appropriate to the current file.

By default, this command will search upwards from the directory of the
current file until encountering an .editorconfig file containing
an entry in its default section of:

root = true

Call :EditorConfig a-vim-style-file-searching-path to override this behaviour.

You will probably want to use an :autocmd to have :EditorConfig
called for you on certain filetypes.

The standard EditorConfig options are implemented in hopefully sane
ways, but if you disagree or want to support a user-defined value,
create a function with the same name as the option, but in CamelCase not
snake_case. For example, if you want to provide custom behaviour for the
end_of_line option, create a function called EndOfLine(value, bufnr).

NOTE: For new files, the value of bufnr will be -1 and therefore

  1. Not that bufnr is intended to be used at all -- it's only
  2. in case of emergencies. It may be removed if proven as useless

as it is suspected to be.

添加新评论