]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
Add an .editorconfig file to repository
authorLuca Saccarola <github.e41mv@aleeas.com>
Mon, 11 Nov 2024 20:33:50 +0000 (21:33 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 11 Nov 2024 20:37:40 +0000 (21:37 +0100)
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>
.editorconfig [new file with mode: 0644]
Filelist
runtime/doc/develop.txt

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..bda9fd2
--- /dev/null
@@ -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
index 96af57b43972c2c889273572cf08f9601e5c6469..1f899b5c77af54d2b2359892b6c75cf8f0856b94 100644 (file)
--- 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 \
index dd8b94d91bae5b94210eb8e53d64a1ed8f815332..84aa53dc8c3ff3a8f99b59a11c24d5dc248c83a1 100644 (file)
@@ -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 sources readable and maintainable.
 
 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*