Ⅰ. 插件描述
Yet another EditorConfig (http://editorconfig.org) plugin for vim written in vimscript onlyⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sgur/vim-editorconfig'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sgur/vim-editorconfig'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sgur/vim-editorconfig'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sgur/vim-editorconfig
Ⅳ. 文档说明
vim-editorconfig
Yet another Vim plugin for EditorConfig
Description
Supported Properties
charsetend_of_lineindent_sizeindent_styleinsert_final_newlinemax_line_lengthroottab_widthtrim_trailing_whitespace
Properties below are enabled only in this plugin:
c_include_pathspell_language
V.S.
editorconfig-vim is official vim plugin for EditorConfig.
This requires if_python interface or external python interpreter.
vim-editorconfig is written in pure vimscript.
You can use editorconfig without any external interfaces such as if_python.
Usage
- Install the plugin
- Locate
.editorconfig - Edit some files
Options
g:editorconfig_blacklist
Exclude regexp patterns for filetypes or filepaths
let g:editorconfig_blacklist = {
\ 'filetype': ['git.*', 'fugitive'],
\ 'pattern': ['\.un~$']}g:editorconfig_root_chdir
Automatically :lcd If root = true exists in .editorconfig.
g:editorconfig_verbose
Show verbose messages
let g:editorconfig_verbose = 1 " 0 by defaultInstall
Use your favorite plugin manager.
License
MIT License
Author
sgur