EditorConfig plugin for Vim http://editorconfig.org
Find a file
2026-03-15 20:41:14 -04:00
autoload Correct language name to "Vim script" (#241) 2024-10-14 11:59:16 -07:00
doc spelling: https (#245) 2025-04-21 00:21:57 -07:00
plugin Support spelling_language property 2026-03-15 20:41:14 -04:00
tests Correct language name to "Vim script" (#241) 2024-10-14 11:59:16 -07:00
.appveyor.yml Skip min_supported_value_length on Windows 2023-01-21 18:36:46 -05:00
.editorconfig Add back in the option of using an external core (#128) 2019-11-02 23:37:52 -07:00
.gitignore Can use tests/travis-test.sh from command line 2020-05-17 18:37:46 -04:00
.gitmodules Updated core-test submodule 2019-10-21 21:01:39 -04:00
.travis.yml Fix Travis, Windows core tests 2019-10-20 17:00:41 -04:00
CONTRIBUTORS Replace Python core with pure-Vimscript core ("vimcore") (#119) 2019-05-20 20:45:09 -07:00
LICENSE Replace Python core with pure-Vimscript core ("vimcore") (#119) 2019-05-20 20:45:09 -07:00
LICENSE.PSF Replace Python core with pure-Vimscript core ("vimcore") (#119) 2019-05-20 20:45:09 -07:00
mkzip.sh Fix overriding the default filetype detection (#206) 2023-01-19 19:36:24 -08:00
README.md Support spelling_language property 2026-03-15 20:41:14 -04:00

EditorConfig Vim Plugin

Travis Build Status Appveyor Build Status

This is an EditorConfig plugin for Vim. This plugin can be found on both GitHub and Vim online.

Bundled versions

Depending on which version of Vim or Neovim you are using, you might not need to specifically install this plugin at all:

Installation

To install this plugin, you can use one of the following ways:

Install with the archive

Download the archive and extract it into your Vim runtime directory (~/.vim on UNIX/Linux and $VIM_INSTALLATION_FOLDER\vimfiles on windows). You should have 4 sub-directories in this runtime directory now: "autoload", "doc", "ftdetect" and "plugin".

Install as Vim8 plugin

Install as a Vim 8 plugin. Note local can be any name, but some path element must be present. On Windows, instead of ~/.vim use $VIM_INSTALLATION_FOLDER\vimfiles.

mkdir -p ~/.vim/pack/local/start
cd ~/.vim/pack/local/start
git clone https://github.com/editorconfig/editorconfig-vim.git

Install with pathogen

Use pathogen (the git repository of this plugin is https://github.com/editorconfig/editorconfig-vim.git)

Install with Vundle

Use Vundle by adding to your .vimrc Vundle plugins section:

Plugin 'editorconfig/editorconfig-vim'

Then call :PluginInstall.

Install with vim-plug

Use vim-plug by adding to your .vimrc in your plugin section:

Plug 'editorconfig/editorconfig-vim'

Source your .vimrc by calling :source $MYVIMRC.

Then call :PlugInstall.

No external editorconfig core library is required

Previous versions of this plugin also required a Python "core". The core included the code to parse .editorconfig files. This plugin includes the core, so you don't need to download the core separately.

Version Supported

Vim v9.1.0543 and Neovim v0.10.x or earlier versions: This plugin after version 1.2.1 will not automatically set .editorconfig filetype to dosini. Please install version 1.2.1 of this plugin if you would like to retain this behavior.

Supported properties

The EditorConfig Vim plugin supports the following EditorConfig properties:

  • indent_style
  • indent_size
  • tab_width
  • end_of_line
  • charset
  • insert_final_newline (Feature +fixendofline, available on Vim 7.4.785+, or PreserveNoEOL is required for this property)
  • trim_trailing_whitespace
  • max_line_length
  • spelling_language
  • root (only used by EditorConfig core)

Selected Options

The supported options 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.

Excluded patterns

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://.*']

Disable for a specific filetype

You can disable this plugin for a specific buffer by setting b:EditorConfig_disable. Therefore, you can disable the plugin for all buffers of a specific filetype. For example, to disable EditorConfig for all git commit messages (filetype gitcommit):

au FileType gitcommit let b:EditorConfig_disable = 1

Disable rules

In very rare cases, you might need 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. This is not recommended, but you can:

let g:EditorConfig_disable_rules = ['trim_trailing_whitespace']

You are able to disable any supported EditorConfig properties.

Bugs and Feature Requests

Feel free to submit bugs, feature requests, and other issues to the issue tracker. Be sure you have read the contribution guidelines!