An implementation of http://editorconfig.org/ in 100% VimL
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
autoload
plugin
README.asciidoc

README.asciidoc

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 tips or 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 useless. Not that bufnr is intended to be used at all — it’s only provided in case of emergencies. It may be removed if proven as useless as it is suspected to be.