EditorConfig Vim Plugin
If your Vim is not compiled with
+python3 feature (You can verify
+python3 feature is included by running
:ver. Most Linux
distributions and with the official Windows binary have the
+python3 feature enabled), please first download the EditorConfig core and
follow the instructions in the README and INSTALL files to install it. This
plugin would NOT work if neither
+python3 nor EditorConfig core is
To install this plugin, you can use one of the following ways:
- Download the archive and extract it into your Vim runtime directory
~/.vimon UNIX/Linux and
$VIM_INSTALLATION_FOLDER\vimfileson windows). You should have 3 sub-directories in this runtime directory now: "autoload", "doc" and "plugin".
- Use pathogen (the git repository of this plugin is https://github.com/editorconfig/editorconfig-vim.git)
Use Vundle by adding to your
.vimrcVundle plugins section:
Then remember to call
The EditorConfig Vim plugin supports the following EditorConfig properties:
insert_final_newline(Feature +fixendofline (available on Vim 7.4.785+) or PreserveNoEOL is required for this property)
root(only used by EditorConfig core)
All of the options which are supported are documented in editorconfig.txt
and can be viewed by executing the following:
:help editorconfig. You may
need to execute
:helptags ALL so that Vim is aware of editorconfig.txt.
To ensure that this plugin works well with Tim Pope's fugitive, use the following patterns array:
let g:EditorConfig_exclude_patterns = ['fugitive://.*']
If you wanted to avoid loading EditorConfig for any remote files over ssh:
let g:EditorConfig_exclude_patterns = ['scp://.*']
Of course these two items could be combined into the following:
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
You might want to override some project-specific EditorConfig rules in global or local vimrc in some cases, e.g., to resolve conflicts of trailing whitespace trimming and buffer autosaving.
let g:EditorConfig_disable_rules = ['trim_trailing_whitespace']
You are able to disable any supported EditorConfig properties.
The file path to the EditorConfig core executable. You could set this value in your |vimrc| like this:
let g:EditorConfig_exec_path = 'Path to your EditorConfig Core executable'