* [ptxdist] [PATCH v2 1/2] templates: update vim modeline for makefile and kconfig files
@ 2025-07-30 17:46 Bruno Thomsen
2025-07-30 17:46 ` [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root Bruno Thomsen
2025-08-05 4:59 ` [ptxdist] [APPLIED] templates: update vim modeline for makefile and kconfig files Michael Olbrich
0 siblings, 2 replies; 5+ messages in thread
From: Bruno Thomsen @ 2025-07-30 17:46 UTC (permalink / raw)
To: ptxdist; +Cc: bruno.thomsen
Setup basic editor default with filetype (ft) and textwidth (tw)
using vim modeline. Only kconfig (*.in) has textwidth set.
VS Code can also use it with modelines extention.
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
v1 -> v2:
Move "noet ts=8 sw=8" modeline to .editorconfig
tw=80 only on kconfig files and not makefiles
rules/templates/template-barebox-imx-habv4-in | 2 ++
rules/templates/template-barebox-imx-habv4-make | 2 +-
rules/templates/template-barebox-in | 2 ++
rules/templates/template-barebox-make | 2 +-
rules/templates/template-blspec-entry-in | 2 ++
rules/templates/template-blspec-entry-make | 2 +-
rules/templates/template-class-existing-target-in | 2 ++
rules/templates/template-class-existing-target-make | 2 +-
rules/templates/template-class-in | 2 ++
rules/templates/template-class-make | 2 +-
rules/templates/template-code-signing-provider-choice-in | 2 ++
rules/templates/template-code-signing-provider-in | 2 ++
rules/templates/template-code-signing-provider-make | 2 +-
rules/templates/template-code-signing-provider-pre-make | 2 +-
rules/templates/template-file-in | 2 ++
rules/templates/template-file-make | 2 +-
rules/templates/template-font-in | 2 ++
rules/templates/template-font-make | 2 +-
rules/templates/template-host-python3-in | 2 ++
rules/templates/template-host-python3-make | 2 +-
rules/templates/template-image-fit-in | 2 ++
rules/templates/template-image-fit-make | 2 +-
rules/templates/template-image-genimage-in | 2 ++
rules/templates/template-image-genimage-make | 2 +-
rules/templates/template-image-tgz-in | 2 ++
rules/templates/template-image-tgz-make | 2 +-
rules/templates/template-kernel-in | 2 ++
rules/templates/template-kernel-make | 2 +-
rules/templates/template-python3-in | 2 ++
rules/templates/template-python3-make | 2 +-
rules/templates/template-src-autoconf-in | 2 ++
rules/templates/template-src-autoconf-make | 2 +-
rules/templates/template-src-cmake-prog-in | 2 ++
rules/templates/template-src-cmake-prog-make | 2 +-
rules/templates/template-src-linux-driver-in | 2 ++
rules/templates/template-src-linux-driver-make | 2 +-
rules/templates/template-src-make-prog-in | 2 ++
rules/templates/template-src-make-prog-make | 2 +-
rules/templates/template-src-meson-prog-in | 2 ++
rules/templates/template-src-meson-prog-make | 2 +-
rules/templates/template-src-qmake-prog-in | 2 ++
rules/templates/template-src-qmake-prog-make | 2 +-
rules/templates/template-src-stellaris-in | 2 ++
rules/templates/template-src-stellaris-make | 2 +-
rules/templates/template-target-in | 2 ++
rules/templates/template-target-make | 2 +-
46 files changed, 69 insertions(+), 23 deletions(-)
diff --git a/rules/templates/template-barebox-imx-habv4-in b/rules/templates/template-barebox-imx-habv4-in
index 16258cbee..be1d90817 100644
--- a/rules/templates/template-barebox-imx-habv4-in
+++ b/rules/templates/template-barebox-imx-habv4-in
@@ -17,3 +17,5 @@ config BAREBOX_@PACKAGE@
Enable this to add the public keys for the FIT image:
CONFIG_CRYPTO_RSA_KEY="__ENV__FIT_KEY"
CONFIG_CRYPTO_RSA_KEY_NAME_HINT="image-kernel-fit"
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-barebox-imx-habv4-make b/rules/templates/template-barebox-imx-habv4-make
index d87729eff..883a1c347 100644
--- a/rules/templates/template-barebox-imx-habv4-make
+++ b/rules/templates/template-barebox-imx-habv4-make
@@ -106,4 +106,4 @@ $(STATEDIR)/barebox-@package@.targetinstall:
$(call ptx/kconfig-targets, barebox-@package@): $(STATEDIR)/barebox-@package@.extract
@$(call world/kconfig, BAREBOX_@PACKAGE@, $(subst barebox-@package@_,,$@))
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-barebox-in b/rules/templates/template-barebox-in
index 44d920f4f..8a3a7cc7b 100644
--- a/rules/templates/template-barebox-in
+++ b/rules/templates/template-barebox-in
@@ -5,3 +5,5 @@ config BAREBOX_@PACKAGE@
prompt "Barebox (@package@)"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-barebox-make b/rules/templates/template-barebox-make
index 6821d65b9..576395995 100644
--- a/rules/templates/template-barebox-make
+++ b/rules/templates/template-barebox-make
@@ -86,4 +86,4 @@ $(STATEDIR)/barebox-@package@.targetinstall:
$(call ptx/kconfig-targets, barebox-@package@): $(STATEDIR)/barebox-@package@.extract
@$(call world/kconfig, BAREBOX_@PACKAGE@, $(subst barebox-@package@_,,$@))
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-blspec-entry-in b/rules/templates/template-blspec-entry-in
index c17e3ed8c..60b4dfc1e 100644
--- a/rules/templates/template-blspec-entry-in
+++ b/rules/templates/template-blspec-entry-in
@@ -3,3 +3,5 @@
config BLSPEC_@PACKAGE@
tristate
prompt "/loader/entries/@ENTRY@ bootloader spec entry"
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-blspec-entry-make b/rules/templates/template-blspec-entry-make
index 88c904666..a5c03298c 100644
--- a/rules/templates/template-blspec-entry-make
+++ b/rules/templates/template-blspec-entry-make
@@ -33,4 +33,4 @@ $(STATEDIR)/blspec-@package@.targetinstall:
@$(call touch)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-class-existing-target-in b/rules/templates/template-class-existing-target-in
index b1c8e7102..8c3f858bb 100644
--- a/rules/templates/template-class-existing-target-in
+++ b/rules/templates/template-class-existing-target-in
@@ -3,3 +3,5 @@
config @CLASS@@PACKAGE@
tristate
@DEFAULT@@SELECT@@PROMPT@
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-class-existing-target-make b/rules/templates/template-class-existing-target-make
index 752036ccc..d74476ff0 100644
--- a/rules/templates/template-class-existing-target-make
+++ b/rules/templates/template-class-existing-target-make
@@ -66,4 +66,4 @@
# @$(call targetinfo)
# @$(call clean_pkg, @CLASS@@PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-class-in b/rules/templates/template-class-in
index b1c8e7102..8c3f858bb 100644
--- a/rules/templates/template-class-in
+++ b/rules/templates/template-class-in
@@ -3,3 +3,5 @@
config @CLASS@@PACKAGE@
tristate
@DEFAULT@@SELECT@@PROMPT@
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-class-make b/rules/templates/template-class-make
index 205e0a10f..473f53522 100644
--- a/rules/templates/template-class-make
+++ b/rules/templates/template-class-make
@@ -75,4 +75,4 @@
# @$(call targetinfo)
# @$(call clean_pkg, @CLASS@@PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-code-signing-provider-choice-in b/rules/templates/template-code-signing-provider-choice-in
index e2108f870..d241e39e9 100644
--- a/rules/templates/template-code-signing-provider-choice-in
+++ b/rules/templates/template-code-signing-provider-choice-in
@@ -3,3 +3,5 @@
config CODE_SIGNING_PROVIDER_@PACKAGE@
bool
prompt "@package@"
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-code-signing-provider-in b/rules/templates/template-code-signing-provider-in
index b84ba839c..8c6ddf005 100644
--- a/rules/templates/template-code-signing-provider-in
+++ b/rules/templates/template-code-signing-provider-in
@@ -12,3 +12,5 @@ config HOST_@PACKAGE@_CODE_SIGNING
select HOST_OPENSSL
select HOST_EXTRACT_CERT
@EXTRA_DEPENDENCIES@
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-code-signing-provider-make b/rules/templates/template-code-signing-provider-make
index 4cf9cac35..3d0aaa5d2 100644
--- a/rules/templates/template-code-signing-provider-make
+++ b/rules/templates/template-code-signing-provider-make
@@ -39,4 +39,4 @@ $(STATEDIR)/host-@package@-code-signing.install:
@$(call targetinfo)
@$(call touch)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-code-signing-provider-pre-make b/rules/templates/template-code-signing-provider-pre-make
index 90b58d2c2..c3e5809e5 100644
--- a/rules/templates/template-code-signing-provider-pre-make
+++ b/rules/templates/template-code-signing-provider-pre-make
@@ -15,4 +15,4 @@ CODE_SIGNING_ENV += \
#$(call ptx/online-code-signing-provider)
endif
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-file-in b/rules/templates/template-file-in
index e5cdde569..50d71a275 100644
--- a/rules/templates/template-file-in
+++ b/rules/templates/template-file-in
@@ -5,3 +5,5 @@ config @PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-file-make b/rules/templates/template-file-make
index 54268bdbc..cbc4f2cb9 100644
--- a/rules/templates/template-file-make
+++ b/rules/templates/template-file-make
@@ -84,4 +84,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call targetinfo)
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-font-in b/rules/templates/template-font-in
index bf20d50bf..079112da3 100644
--- a/rules/templates/template-font-in
+++ b/rules/templates/template-font-in
@@ -6,3 +6,5 @@ config @PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-font-make b/rules/templates/template-font-make
index 13a59041b..6f42cd37c 100644
--- a/rules/templates/template-font-make
+++ b/rules/templates/template-font-make
@@ -66,4 +66,4 @@ $(STATEDIR)/@package@.targetinstall:
@$(call touch)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-host-python3-in b/rules/templates/template-host-python3-in
index 87a8004ae..3ee505dab 100644
--- a/rules/templates/template-host-python3-in
+++ b/rules/templates/template-host-python3-in
@@ -4,3 +4,5 @@ config @PREFIX@_@PACKAGE@
tristate
default y if ALLYES
select @PREFIX@
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-host-python3-make b/rules/templates/template-host-python3-make
index c3b766bab..afa93ca12 100644
--- a/rules/templates/template-host-python3-make
+++ b/rules/templates/template-host-python3-make
@@ -30,4 +30,4 @@ HOST_PACKAGES-$(PTXCONF_@PREFIX@_@PACKAGE@) += @prefix@-@package@
@PREFIX@_@PACKAGE@_CONF_TOOL := python3
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-image-fit-in b/rules/templates/template-image-fit-in
index 1a89153fc..a4acf91b6 100644
--- a/rules/templates/template-image-fit-in
+++ b/rules/templates/template-image-fit-in
@@ -8,3 +8,5 @@ config IMAGE_@PACKAGE@
prompt "Generate images/@package@.fit"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-image-fit-make b/rules/templates/template-image-fit-make
index cd57d24df..a396ec51e 100644
--- a/rules/templates/template-image-fit-make
+++ b/rules/templates/template-image-fit-make
@@ -31,4 +31,4 @@ $(IMAGE_@PACKAGE@_IMAGE): $(IMAGE_@PACKAGE@_KERNEL) $(IMAGE_@PACKAGE@_INITRAMFS)
@$(call world/image-fit, IMAGE_@PACKAGE@)
@$(call finish)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-image-genimage-in b/rules/templates/template-image-genimage-in
index 28a95d6d9..bbee658a8 100644
--- a/rules/templates/template-image-genimage-in
+++ b/rules/templates/template-image-genimage-in
@@ -6,3 +6,5 @@ config IMAGE_@PACKAGE@
prompt "Generate images/@package@.@TYPE@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-image-genimage-make b/rules/templates/template-image-genimage-make
index 9ca5309d2..312bb1a3e 100644
--- a/rules/templates/template-image-genimage-make
+++ b/rules/templates/template-image-genimage-make
@@ -29,4 +29,4 @@ $(IMAGE_@PACKAGE@_IMAGE):
@$(call image/genimage, IMAGE_@PACKAGE@)
@$(call finish)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-image-tgz-in b/rules/templates/template-image-tgz-in
index cdb0712f6..f866407fb 100644
--- a/rules/templates/template-image-tgz-in
+++ b/rules/templates/template-image-tgz-in
@@ -5,3 +5,5 @@ config IMAGE_@PACKAGE@_TGZ
prompt "Generate images/@package@.tgz"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-image-tgz-make b/rules/templates/template-image-tgz-make
index 1a2cb7a07..583b56250 100644
--- a/rules/templates/template-image-tgz-make
+++ b/rules/templates/template-image-tgz-make
@@ -29,4 +29,4 @@ $(IMAGE_@PACKAGE@_TGZ_IMAGE):
@$(call image/archive, IMAGE_@PACKAGE@_TGZ)
@$(call finish)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-kernel-in b/rules/templates/template-kernel-in
index cd0b4042a..bdfdc448d 100644
--- a/rules/templates/template-kernel-in
+++ b/rules/templates/template-kernel-in
@@ -8,3 +8,5 @@ config KERNEL_@PACKAGE@
#select HOST_U_BOOT_TOOLS
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make
index 38a953c84..d36a3bfd4 100644
--- a/rules/templates/template-kernel-make
+++ b/rules/templates/template-kernel-make
@@ -151,4 +151,4 @@ $(STATEDIR)/kernel-@package@.targetinstall:
$(call ptx/kconfig-targets, kernel-@package@): $(STATEDIR)/kernel-@package@.extract
@$(call world/kconfig, KERNEL_@PACKAGE@, $(subst kernel-@package@_,,$@))
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-python3-in b/rules/templates/template-python3-in
index 5f758f5bd..4baa84ef0 100644
--- a/rules/templates/template-python3-in
+++ b/rules/templates/template-python3-in
@@ -6,3 +6,5 @@ config PYTHON3_@PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-python3-make b/rules/templates/template-python3-make
index 90884a2d8..9070973a4 100644
--- a/rules/templates/template-python3-make
+++ b/rules/templates/template-python3-make
@@ -50,4 +50,4 @@ $(STATEDIR)/python3-@package@.targetinstall:
@$(call touch)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-autoconf-in b/rules/templates/template-src-autoconf-in
index bd724effb..abf99f875 100644
--- a/rules/templates/template-src-autoconf-in
+++ b/rules/templates/template-src-autoconf-in
@@ -5,3 +5,5 @@ config @PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-autoconf-make b/rules/templates/template-src-autoconf-make
index d8d61988b..63a55f7b5 100644
--- a/rules/templates/template-src-autoconf-make
+++ b/rules/templates/template-src-autoconf-make
@@ -94,4 +94,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call targetinfo)
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-cmake-prog-in b/rules/templates/template-src-cmake-prog-in
index 37e6541dd..47903bec6 100644
--- a/rules/templates/template-src-cmake-prog-in
+++ b/rules/templates/template-src-cmake-prog-in
@@ -6,3 +6,5 @@ config @PACKAGE@
select HOST_CMAKE
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-cmake-prog-make b/rules/templates/template-src-cmake-prog-make
index 9d724f21b..6a1b2b741 100644
--- a/rules/templates/template-src-cmake-prog-make
+++ b/rules/templates/template-src-cmake-prog-make
@@ -74,4 +74,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call targetinfo)
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-linux-driver-in b/rules/templates/template-src-linux-driver-in
index 4d0463a9f..9ce768ad3 100644
--- a/rules/templates/template-src-linux-driver-in
+++ b/rules/templates/template-src-linux-driver-in
@@ -7,3 +7,5 @@ config @PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-linux-driver-make b/rules/templates/template-src-linux-driver-make
index 4f4009472..a05f978fa 100644
--- a/rules/templates/template-src-linux-driver-make
+++ b/rules/templates/template-src-linux-driver-make
@@ -63,4 +63,4 @@ $(STATEDIR)/@package@.targetinstall:
@$(call compile, @PACKAGE@, $(@PACKAGE@_MAKE_OPT)_install)
@$(call touch)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-make-prog-in b/rules/templates/template-src-make-prog-in
index e5cdde569..50d71a275 100644
--- a/rules/templates/template-src-make-prog-in
+++ b/rules/templates/template-src-make-prog-in
@@ -5,3 +5,5 @@ config @PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-make-prog-make b/rules/templates/template-src-make-prog-make
index 9bd5c8dc5..b57f1db5f 100644
--- a/rules/templates/template-src-make-prog-make
+++ b/rules/templates/template-src-make-prog-make
@@ -95,4 +95,4 @@ $(STATEDIR)/@package@.clean:
@-$(call execute, @PACKAGE@, $(@PACKAGE@_MAKE_ENV) $(MAKE) clean)
@$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-meson-prog-in b/rules/templates/template-src-meson-prog-in
index 34dc24f9f..7debe3757 100644
--- a/rules/templates/template-src-meson-prog-in
+++ b/rules/templates/template-src-meson-prog-in
@@ -6,3 +6,5 @@ config @PACKAGE@
select HOST_MESON
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-meson-prog-make b/rules/templates/template-src-meson-prog-make
index 5396db40c..56b8f276b 100644
--- a/rules/templates/template-src-meson-prog-make
+++ b/rules/templates/template-src-meson-prog-make
@@ -74,4 +74,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call targetinfo)
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-qmake-prog-in b/rules/templates/template-src-qmake-prog-in
index a20378948..fa10faba4 100644
--- a/rules/templates/template-src-qmake-prog-in
+++ b/rules/templates/template-src-qmake-prog-in
@@ -6,3 +6,5 @@ config @PACKAGE@
select QT5
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-qmake-prog-make b/rules/templates/template-src-qmake-prog-make
index 3d9156499..e4c324a85 100644
--- a/rules/templates/template-src-qmake-prog-make
+++ b/rules/templates/template-src-qmake-prog-make
@@ -77,4 +77,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call targetinfo)
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-src-stellaris-in b/rules/templates/template-src-stellaris-in
index d255fec84..d1b6cd463 100644
--- a/rules/templates/template-src-stellaris-in
+++ b/rules/templates/template-src-stellaris-in
@@ -6,3 +6,5 @@ config @PACKAGE@
prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-src-stellaris-make b/rules/templates/template-src-stellaris-make
index 750724376..7c9c99ca6 100644
--- a/rules/templates/template-src-stellaris-make
+++ b/rules/templates/template-src-stellaris-make
@@ -102,4 +102,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
diff --git a/rules/templates/template-target-in b/rules/templates/template-target-in
index ac8b3aa47..68d231677 100644
--- a/rules/templates/template-target-in
+++ b/rules/templates/template-target-in
@@ -5,3 +5,5 @@ config @PACKAGE@
@SELECT@ prompt "@package@"
help
FIXME
+
+# vim: ft=kconfig tw=80
diff --git a/rules/templates/template-target-make b/rules/templates/template-target-make
index 6add94b3d..a6ec5b9f6 100644
--- a/rules/templates/template-target-make
+++ b/rules/templates/template-target-make
@@ -94,4 +94,4 @@ $(STATEDIR)/@package@.targetinstall:
# @$(call targetinfo)
# @$(call clean_pkg, @PACKAGE@)
-# vim: syntax=make
+# vim: ft=make
base-commit: c077e744bcdc9257223890085afa3be1c0f2228b
--
2.50.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root
2025-07-30 17:46 [ptxdist] [PATCH v2 1/2] templates: update vim modeline for makefile and kconfig files Bruno Thomsen
@ 2025-07-30 17:46 ` Bruno Thomsen
2025-07-31 5:58 ` Bruno Thomsen
2025-08-05 4:59 ` [ptxdist] [APPLIED] " Michael Olbrich
2025-08-05 4:59 ` [ptxdist] [APPLIED] templates: update vim modeline for makefile and kconfig files Michael Olbrich
1 sibling, 2 replies; 5+ messages in thread
From: Bruno Thomsen @ 2025-07-30 17:46 UTC (permalink / raw)
To: ptxdist; +Cc: bruno.thomsen
Add an .editorconfig file instead of "noet ts=8 sw=8" vim modeline.
Some code editors have builtin support and others need a plugin or
an extention. VS Code require an editorconfig extention.
Check all files on Fedora from ptxdist git root directory:
podman run -it --rm --volume="$PWD:/check:z" mstruebing/editorconfig-checker
Check a subset of files on Fedora from ptxdist git root directory:
podman run -it --rm --volume="$PWD:/check:z" mstruebing/editorconfig-checker ec rules/templates/*-make
Remove :z on Debian/Ubuntu.
On older hosts it's also possible to replace podman with docker.
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
v1 -> v2:
Add .editorconfig following mailing list discussion
.editorconfig | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..aa99f8b0c
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,22 @@
+root = true
+
+[*]
+indent_style = tab
+tab_width = 8
+indent_size = 8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# kconfig uses a mix of tab and spaces in help section
+[*{.in,-in}]
+indent_style = unset
+
+[*.sh]
+indent_size = 4
+
+[*.py]
+indent_style = space
+tab_width = 4
+indent_size = 4
+
--
2.50.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root
2025-07-30 17:46 ` [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root Bruno Thomsen
@ 2025-07-31 5:58 ` Bruno Thomsen
2025-08-05 4:59 ` [ptxdist] [APPLIED] " Michael Olbrich
1 sibling, 0 replies; 5+ messages in thread
From: Bruno Thomsen @ 2025-07-31 5:58 UTC (permalink / raw)
To: ptxdist
Den ons. 30. jul. 2025 kl. 19.46 skrev Bruno Thomsen <bruno.thomsen@gmail.com>:
>
> Add an .editorconfig file instead of "noet ts=8 sw=8" vim modeline.
>
> Some code editors have builtin support and others need a plugin or
> an extention. VS Code require an editorconfig extention.
>
> Check all files on Fedora from ptxdist git root directory:
> podman run -it --rm --volume="$PWD:/check:z" mstruebing/editorconfig-checker
There is a typo in the above command. The correct command is:
podman run --rm --volume=$PWD:/check:z mstruebing/editorconfig-checker
>
> Check a subset of files on Fedora from ptxdist git root directory:
> podman run -it --rm --volume="$PWD:/check:z" mstruebing/editorconfig-checker ec rules/templates/*-make
>
> Remove :z on Debian/Ubuntu.
> On older hosts it's also possible to replace podman with docker.
>
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> ---
> v1 -> v2:
> Add .editorconfig following mailing list discussion
>
> .editorconfig | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> create mode 100644 .editorconfig
>
> diff --git a/.editorconfig b/.editorconfig
> new file mode 100644
> index 000000000..aa99f8b0c
> --- /dev/null
> +++ b/.editorconfig
> @@ -0,0 +1,22 @@
> +root = true
> +
> +[*]
> +indent_style = tab
> +tab_width = 8
> +indent_size = 8
> +end_of_line = lf
> +insert_final_newline = true
> +trim_trailing_whitespace = true
> +
> +# kconfig uses a mix of tab and spaces in help section
> +[*{.in,-in}]
> +indent_style = unset
> +
> +[*.sh]
> +indent_size = 4
> +
> +[*.py]
> +indent_style = space
> +tab_width = 4
> +indent_size = 4
> +
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [APPLIED] templates: update vim modeline for makefile and kconfig files
2025-07-30 17:46 [ptxdist] [PATCH v2 1/2] templates: update vim modeline for makefile and kconfig files Bruno Thomsen
2025-07-30 17:46 ` [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root Bruno Thomsen
@ 2025-08-05 4:59 ` Michael Olbrich
1 sibling, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2025-08-05 4:59 UTC (permalink / raw)
To: ptxdist; +Cc: Bruno Thomsen
Thanks, applied as b8499357d141ca59cca4a809c81fa8daab80c0bc.
Michael
[sent from post-receive hook]
On Tue, 05 Aug 2025 06:59:49 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Setup basic editor default with filetype (ft) and textwidth (tw)
> using vim modeline. Only kconfig (*.in) has textwidth set.
>
> VS Code can also use it with modelines extention.
>
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20250730174601.19614-1-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/templates/template-barebox-imx-habv4-in b/rules/templates/template-barebox-imx-habv4-in
> index 16258cbee833..be1d9081741e 100644
> --- a/rules/templates/template-barebox-imx-habv4-in
> +++ b/rules/templates/template-barebox-imx-habv4-in
> @@ -17,3 +17,5 @@ config BAREBOX_@PACKAGE@
> Enable this to add the public keys for the FIT image:
> CONFIG_CRYPTO_RSA_KEY="__ENV__FIT_KEY"
> CONFIG_CRYPTO_RSA_KEY_NAME_HINT="image-kernel-fit"
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-barebox-imx-habv4-make b/rules/templates/template-barebox-imx-habv4-make
> index d87729eff741..883a1c3471db 100644
> --- a/rules/templates/template-barebox-imx-habv4-make
> +++ b/rules/templates/template-barebox-imx-habv4-make
> @@ -106,4 +106,4 @@ $(STATEDIR)/barebox-@package@.targetinstall:
> $(call ptx/kconfig-targets, barebox-@package@): $(STATEDIR)/barebox-@package@.extract
> @$(call world/kconfig, BAREBOX_@PACKAGE@, $(subst barebox-@package@_,,$@))
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-barebox-in b/rules/templates/template-barebox-in
> index 44d920f4f1d8..8a3a7cc7b7c8 100644
> --- a/rules/templates/template-barebox-in
> +++ b/rules/templates/template-barebox-in
> @@ -5,3 +5,5 @@ config BAREBOX_@PACKAGE@
> prompt "Barebox (@package@)"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-barebox-make b/rules/templates/template-barebox-make
> index 6821d65b9ab6..576395995fe7 100644
> --- a/rules/templates/template-barebox-make
> +++ b/rules/templates/template-barebox-make
> @@ -86,4 +86,4 @@ $(STATEDIR)/barebox-@package@.targetinstall:
> $(call ptx/kconfig-targets, barebox-@package@): $(STATEDIR)/barebox-@package@.extract
> @$(call world/kconfig, BAREBOX_@PACKAGE@, $(subst barebox-@package@_,,$@))
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-blspec-entry-in b/rules/templates/template-blspec-entry-in
> index c17e3ed8c2b5..60b4dfc1e5e4 100644
> --- a/rules/templates/template-blspec-entry-in
> +++ b/rules/templates/template-blspec-entry-in
> @@ -3,3 +3,5 @@
> config BLSPEC_@PACKAGE@
> tristate
> prompt "/loader/entries/@ENTRY@ bootloader spec entry"
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-blspec-entry-make b/rules/templates/template-blspec-entry-make
> index 88c9046660bc..a5c03298c857 100644
> --- a/rules/templates/template-blspec-entry-make
> +++ b/rules/templates/template-blspec-entry-make
> @@ -33,4 +33,4 @@ $(STATEDIR)/blspec-@package@.targetinstall:
>
> @$(call touch)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-class-existing-target-in b/rules/templates/template-class-existing-target-in
> index b1c8e71023bc..8c3f858bb6c9 100644
> --- a/rules/templates/template-class-existing-target-in
> +++ b/rules/templates/template-class-existing-target-in
> @@ -3,3 +3,5 @@
> config @CLASS@@PACKAGE@
> tristate
> @DEFAULT@@SELECT@@PROMPT@
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-class-existing-target-make b/rules/templates/template-class-existing-target-make
> index 752036cccc31..d74476ff0389 100644
> --- a/rules/templates/template-class-existing-target-make
> +++ b/rules/templates/template-class-existing-target-make
> @@ -66,4 +66,4 @@
> # @$(call targetinfo)
> # @$(call clean_pkg, @CLASS@@PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-class-in b/rules/templates/template-class-in
> index b1c8e71023bc..8c3f858bb6c9 100644
> --- a/rules/templates/template-class-in
> +++ b/rules/templates/template-class-in
> @@ -3,3 +3,5 @@
> config @CLASS@@PACKAGE@
> tristate
> @DEFAULT@@SELECT@@PROMPT@
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-class-make b/rules/templates/template-class-make
> index 205e0a10f795..473f53522ae2 100644
> --- a/rules/templates/template-class-make
> +++ b/rules/templates/template-class-make
> @@ -75,4 +75,4 @@
> # @$(call targetinfo)
> # @$(call clean_pkg, @CLASS@@PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-code-signing-provider-choice-in b/rules/templates/template-code-signing-provider-choice-in
> index e2108f870cbf..d241e39e9222 100644
> --- a/rules/templates/template-code-signing-provider-choice-in
> +++ b/rules/templates/template-code-signing-provider-choice-in
> @@ -3,3 +3,5 @@
> config CODE_SIGNING_PROVIDER_@PACKAGE@
> bool
> prompt "@package@"
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-code-signing-provider-in b/rules/templates/template-code-signing-provider-in
> index b84ba839c124..8c6ddf005652 100644
> --- a/rules/templates/template-code-signing-provider-in
> +++ b/rules/templates/template-code-signing-provider-in
> @@ -12,3 +12,5 @@ config HOST_@PACKAGE@_CODE_SIGNING
> select HOST_OPENSSL
> select HOST_EXTRACT_CERT
> @EXTRA_DEPENDENCIES@
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-code-signing-provider-make b/rules/templates/template-code-signing-provider-make
> index 4cf9cac358cf..3d0aaa5d2ce0 100644
> --- a/rules/templates/template-code-signing-provider-make
> +++ b/rules/templates/template-code-signing-provider-make
> @@ -39,4 +39,4 @@ $(STATEDIR)/host-@package@-code-signing.install:
> @$(call targetinfo)
> @$(call touch)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-code-signing-provider-pre-make b/rules/templates/template-code-signing-provider-pre-make
> index 90b58d2c2d14..c3e5809e5786 100644
> --- a/rules/templates/template-code-signing-provider-pre-make
> +++ b/rules/templates/template-code-signing-provider-pre-make
> @@ -15,4 +15,4 @@ CODE_SIGNING_ENV += \
> #$(call ptx/online-code-signing-provider)
> endif
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-file-in b/rules/templates/template-file-in
> index e5cdde56959c..50d71a275481 100644
> --- a/rules/templates/template-file-in
> +++ b/rules/templates/template-file-in
> @@ -5,3 +5,5 @@ config @PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-file-make b/rules/templates/template-file-make
> index 54268bdbc459..cbc4f2cb94a7 100644
> --- a/rules/templates/template-file-make
> +++ b/rules/templates/template-file-make
> @@ -84,4 +84,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call targetinfo)
> # @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-font-in b/rules/templates/template-font-in
> index bf20d50bf8e9..079112da3a14 100644
> --- a/rules/templates/template-font-in
> +++ b/rules/templates/template-font-in
> @@ -6,3 +6,5 @@ config @PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-font-make b/rules/templates/template-font-make
> index 13a59041b9f6..6f42cd37c7b3 100644
> --- a/rules/templates/template-font-make
> +++ b/rules/templates/template-font-make
> @@ -66,4 +66,4 @@ $(STATEDIR)/@package@.targetinstall:
>
> @$(call touch)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-host-python3-in b/rules/templates/template-host-python3-in
> index 87a8004aea55..3ee505dab86f 100644
> --- a/rules/templates/template-host-python3-in
> +++ b/rules/templates/template-host-python3-in
> @@ -4,3 +4,5 @@ config @PREFIX@_@PACKAGE@
> tristate
> default y if ALLYES
> select @PREFIX@
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-host-python3-make b/rules/templates/template-host-python3-make
> index c3b766babb8f..afa93ca12fd3 100644
> --- a/rules/templates/template-host-python3-make
> +++ b/rules/templates/template-host-python3-make
> @@ -30,4 +30,4 @@ HOST_PACKAGES-$(PTXCONF_@PREFIX@_@PACKAGE@) += @prefix@-@package@
>
> @PREFIX@_@PACKAGE@_CONF_TOOL := python3
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-image-fit-in b/rules/templates/template-image-fit-in
> index 1a89153fc185..a4acf91b6d0f 100644
> --- a/rules/templates/template-image-fit-in
> +++ b/rules/templates/template-image-fit-in
> @@ -8,3 +8,5 @@ config IMAGE_@PACKAGE@
> prompt "Generate images/@package@.fit"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-image-fit-make b/rules/templates/template-image-fit-make
> index cd57d24df76c..a396ec51eec2 100644
> --- a/rules/templates/template-image-fit-make
> +++ b/rules/templates/template-image-fit-make
> @@ -31,4 +31,4 @@ $(IMAGE_@PACKAGE@_IMAGE): $(IMAGE_@PACKAGE@_KERNEL) $(IMAGE_@PACKAGE@_INITRAMFS)
> @$(call world/image-fit, IMAGE_@PACKAGE@)
> @$(call finish)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-image-genimage-in b/rules/templates/template-image-genimage-in
> index 28a95d6d9679..bbee658a8e72 100644
> --- a/rules/templates/template-image-genimage-in
> +++ b/rules/templates/template-image-genimage-in
> @@ -6,3 +6,5 @@ config IMAGE_@PACKAGE@
> prompt "Generate images/@package@.@TYPE@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-image-genimage-make b/rules/templates/template-image-genimage-make
> index 9ca5309d2f04..312bb1a3e6da 100644
> --- a/rules/templates/template-image-genimage-make
> +++ b/rules/templates/template-image-genimage-make
> @@ -29,4 +29,4 @@ $(IMAGE_@PACKAGE@_IMAGE):
> @$(call image/genimage, IMAGE_@PACKAGE@)
> @$(call finish)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-image-tgz-in b/rules/templates/template-image-tgz-in
> index cdb0712f671e..f866407fb50e 100644
> --- a/rules/templates/template-image-tgz-in
> +++ b/rules/templates/template-image-tgz-in
> @@ -5,3 +5,5 @@ config IMAGE_@PACKAGE@_TGZ
> prompt "Generate images/@package@.tgz"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-image-tgz-make b/rules/templates/template-image-tgz-make
> index 1a2cb7a07c2c..583b56250e31 100644
> --- a/rules/templates/template-image-tgz-make
> +++ b/rules/templates/template-image-tgz-make
> @@ -29,4 +29,4 @@ $(IMAGE_@PACKAGE@_TGZ_IMAGE):
> @$(call image/archive, IMAGE_@PACKAGE@_TGZ)
> @$(call finish)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-kernel-in b/rules/templates/template-kernel-in
> index cd0b4042ad8f..bdfdc448da7d 100644
> --- a/rules/templates/template-kernel-in
> +++ b/rules/templates/template-kernel-in
> @@ -8,3 +8,5 @@ config KERNEL_@PACKAGE@
> #select HOST_U_BOOT_TOOLS
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make
> index 38a953c84cc9..d36a3bfd423f 100644
> --- a/rules/templates/template-kernel-make
> +++ b/rules/templates/template-kernel-make
> @@ -151,4 +151,4 @@ $(STATEDIR)/kernel-@package@.targetinstall:
> $(call ptx/kconfig-targets, kernel-@package@): $(STATEDIR)/kernel-@package@.extract
> @$(call world/kconfig, KERNEL_@PACKAGE@, $(subst kernel-@package@_,,$@))
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-python3-in b/rules/templates/template-python3-in
> index 5f758f5bd250..4baa84ef092c 100644
> --- a/rules/templates/template-python3-in
> +++ b/rules/templates/template-python3-in
> @@ -6,3 +6,5 @@ config PYTHON3_@PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-python3-make b/rules/templates/template-python3-make
> index 90884a2d8107..9070973a4773 100644
> --- a/rules/templates/template-python3-make
> +++ b/rules/templates/template-python3-make
> @@ -50,4 +50,4 @@ $(STATEDIR)/python3-@package@.targetinstall:
>
> @$(call touch)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-autoconf-in b/rules/templates/template-src-autoconf-in
> index bd724effb96c..abf99f875371 100644
> --- a/rules/templates/template-src-autoconf-in
> +++ b/rules/templates/template-src-autoconf-in
> @@ -5,3 +5,5 @@ config @PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-autoconf-make b/rules/templates/template-src-autoconf-make
> index d8d61988b640..63a55f7b5aba 100644
> --- a/rules/templates/template-src-autoconf-make
> +++ b/rules/templates/template-src-autoconf-make
> @@ -94,4 +94,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call targetinfo)
> # @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-cmake-prog-in b/rules/templates/template-src-cmake-prog-in
> index 37e6541dd57d..47903bec6475 100644
> --- a/rules/templates/template-src-cmake-prog-in
> +++ b/rules/templates/template-src-cmake-prog-in
> @@ -6,3 +6,5 @@ config @PACKAGE@
> select HOST_CMAKE
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-cmake-prog-make b/rules/templates/template-src-cmake-prog-make
> index 9d724f21b41c..6a1b2b74160a 100644
> --- a/rules/templates/template-src-cmake-prog-make
> +++ b/rules/templates/template-src-cmake-prog-make
> @@ -74,4 +74,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call targetinfo)
> # @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-linux-driver-in b/rules/templates/template-src-linux-driver-in
> index 4d0463a9f3f0..9ce768ad3413 100644
> --- a/rules/templates/template-src-linux-driver-in
> +++ b/rules/templates/template-src-linux-driver-in
> @@ -7,3 +7,5 @@ config @PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-linux-driver-make b/rules/templates/template-src-linux-driver-make
> index 4f400947222b..a05f978facd0 100644
> --- a/rules/templates/template-src-linux-driver-make
> +++ b/rules/templates/template-src-linux-driver-make
> @@ -63,4 +63,4 @@ $(STATEDIR)/@package@.targetinstall:
> @$(call compile, @PACKAGE@, $(@PACKAGE@_MAKE_OPT)_install)
> @$(call touch)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-make-prog-in b/rules/templates/template-src-make-prog-in
> index e5cdde56959c..50d71a275481 100644
> --- a/rules/templates/template-src-make-prog-in
> +++ b/rules/templates/template-src-make-prog-in
> @@ -5,3 +5,5 @@ config @PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-make-prog-make b/rules/templates/template-src-make-prog-make
> index 9bd5c8dc5ab3..b57f1db5ff16 100644
> --- a/rules/templates/template-src-make-prog-make
> +++ b/rules/templates/template-src-make-prog-make
> @@ -95,4 +95,4 @@ $(STATEDIR)/@package@.clean:
> @-$(call execute, @PACKAGE@, $(@PACKAGE@_MAKE_ENV) $(MAKE) clean)
> @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-meson-prog-in b/rules/templates/template-src-meson-prog-in
> index 34dc24f9fc56..7debe3757d9b 100644
> --- a/rules/templates/template-src-meson-prog-in
> +++ b/rules/templates/template-src-meson-prog-in
> @@ -6,3 +6,5 @@ config @PACKAGE@
> select HOST_MESON
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-meson-prog-make b/rules/templates/template-src-meson-prog-make
> index 5396db40c951..56b8f276be46 100644
> --- a/rules/templates/template-src-meson-prog-make
> +++ b/rules/templates/template-src-meson-prog-make
> @@ -74,4 +74,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call targetinfo)
> # @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-qmake-prog-in b/rules/templates/template-src-qmake-prog-in
> index a20378948032..fa10faba49e0 100644
> --- a/rules/templates/template-src-qmake-prog-in
> +++ b/rules/templates/template-src-qmake-prog-in
> @@ -6,3 +6,5 @@ config @PACKAGE@
> select QT5
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-qmake-prog-make b/rules/templates/template-src-qmake-prog-make
> index 3d9156499a2c..e4c324a851d2 100644
> --- a/rules/templates/template-src-qmake-prog-make
> +++ b/rules/templates/template-src-qmake-prog-make
> @@ -77,4 +77,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call targetinfo)
> # @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-src-stellaris-in b/rules/templates/template-src-stellaris-in
> index d255fec84903..d1b6cd463f18 100644
> --- a/rules/templates/template-src-stellaris-in
> +++ b/rules/templates/template-src-stellaris-in
> @@ -6,3 +6,5 @@ config @PACKAGE@
> prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-src-stellaris-make b/rules/templates/template-src-stellaris-make
> index 7507243769fa..7c9c99ca64a5 100644
> --- a/rules/templates/template-src-stellaris-make
> +++ b/rules/templates/template-src-stellaris-make
> @@ -102,4 +102,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call clean_pkg, @PACKAGE@)
>
>
> -# vim: syntax=make
> +# vim: ft=make
> diff --git a/rules/templates/template-target-in b/rules/templates/template-target-in
> index ac8b3aa47e4f..68d231677208 100644
> --- a/rules/templates/template-target-in
> +++ b/rules/templates/template-target-in
> @@ -5,3 +5,5 @@ config @PACKAGE@
> @SELECT@ prompt "@package@"
> help
> FIXME
> +
> +# vim: ft=kconfig tw=80
> diff --git a/rules/templates/template-target-make b/rules/templates/template-target-make
> index 6add94b3d663..a6ec5b9f6288 100644
> --- a/rules/templates/template-target-make
> +++ b/rules/templates/template-target-make
> @@ -94,4 +94,4 @@ $(STATEDIR)/@package@.targetinstall:
> # @$(call targetinfo)
> # @$(call clean_pkg, @PACKAGE@)
>
> -# vim: syntax=make
> +# vim: ft=make
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [APPLIED] EditorConfig: add .editorconfig file in root
2025-07-30 17:46 ` [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root Bruno Thomsen
2025-07-31 5:58 ` Bruno Thomsen
@ 2025-08-05 4:59 ` Michael Olbrich
1 sibling, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2025-08-05 4:59 UTC (permalink / raw)
To: ptxdist; +Cc: Bruno Thomsen
Thanks, applied as 34fc073c955f51db7e1fb2b36b6e47b421342b8b.
Michael
[sent from post-receive hook]
On Tue, 05 Aug 2025 06:59:51 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Add an .editorconfig file instead of "noet ts=8 sw=8" vim modeline.
>
> Some code editors have builtin support and others need a plugin or
> an extention. VS Code require an editorconfig extention.
>
> Check all files on Fedora from ptxdist git root directory:
> podman run --rm --volume="$PWD:/check:z" mstruebing/editorconfig-checker
>
> Check a subset of files on Fedora from ptxdist git root directory:
> podman run --rm --volume="$PWD:/check:z" mstruebing/editorconfig-checker ec rules/templates/*-make
>
> Remove :z on Debian/Ubuntu.
> On older hosts it's also possible to replace podman with docker.
>
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20250730174601.19614-2-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/.editorconfig b/.editorconfig
> new file mode 100644
> index 000000000000..aa99f8b0c55f
> --- /dev/null
> +++ b/.editorconfig
> @@ -0,0 +1,22 @@
> +root = true
> +
> +[*]
> +indent_style = tab
> +tab_width = 8
> +indent_size = 8
> +end_of_line = lf
> +insert_final_newline = true
> +trim_trailing_whitespace = true
> +
> +# kconfig uses a mix of tab and spaces in help section
> +[*{.in,-in}]
> +indent_style = unset
> +
> +[*.sh]
> +indent_size = 4
> +
> +[*.py]
> +indent_style = space
> +tab_width = 4
> +indent_size = 4
> +
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-05 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-30 17:46 [ptxdist] [PATCH v2 1/2] templates: update vim modeline for makefile and kconfig files Bruno Thomsen
2025-07-30 17:46 ` [ptxdist] [PATCH v2 2/2] EditorConfig: add .editorconfig file in root Bruno Thomsen
2025-07-31 5:58 ` Bruno Thomsen
2025-08-05 4:59 ` [ptxdist] [APPLIED] " Michael Olbrich
2025-08-05 4:59 ` [ptxdist] [APPLIED] templates: update vim modeline for makefile and kconfig files Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox