Mercurial > vim
changeset 36526:9bd0f3fa4a18 draft
Add an .editorconfig file to repository
Commit: https://github.com/vim/vim/commit/feea1b444e8dabddc10f380ff61ef97f4ff6fa62
Author: Luca Saccarola <github.e41mv@aleeas.com>
Date: Mon Nov 11 21:33:50 2024 +0100
Add an .editorconfig file to repository
This commit tries to use an editorconfig file to ensure the same
settings across editors while contributing to the vim repository.
The rules are based of the guidelines defined in
`runtime/doc/develop.txt`.
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 11 Nov 2024 21:45:03 +0100 |
parents | d8e94b51fb3d |
children | cd34bc4212b5 |
files | .editorconfig Filelist runtime/doc/develop.txt |
diffstat | 3 files changed, 27 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# https://spec.editorconfig.org/#supported-pairs +root = true + +[*] +indent_style = tab +tab_width = 8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{c,h,proto}] +indent_size = 4 + +[*.{md,yml,sh,bat}] +# This will become the default after we migrate the codebase +indent_style = space +indent_size = 2 + +[*.md] +# Markdown uses trailing whitespaces to do an hard line break +# https://spec.commonmark.org/0.31.2/#hard-line-breaks +trim_trailing_whitespace = false
--- a/Filelist +++ b/Filelist @@ -18,6 +18,7 @@ SRC_ALL = \ .hgignore \ .appveyor.yml \ .codecov.yml \ + .editorconfig \ ci/appveyor.bat \ ci/config.mk*.sed \ ci/if_ver*.vim \
--- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 9.1. Last change: 2024 Oct 31 +*develop.txt* For Vim version 9.1. Last change: 2024 Nov 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -166,6 +166,10 @@ stick to these rules, to keep the source This list is not complete. Look in the source code for more examples. +The code repository contains an editorconfig file, that can be used together +with the distributed editorconfig plugin |editorconfig-install| to ensure the +recommended style is followed. + MAKING CHANGES *style-changes*