Subject: [PATCH] docs: add vim syntax modeline [RFC]

From: "M Hickford via GitGitGadget" <[email-masked]>
Date: Mon, 13 Jan 2025 21:03:14 +0000

From: M Hickford <[email-masked]>

Git documentation is written in AsciiDoc. This format is easily
mistaken for the pervasive Markdown.

Add a vim modeline to help editors identify the format and provide
syntax highlighting, rendering and autocomplete.

This makes editing the documentation easier for prospective
contributors. This is particularly important because new contributors
often start with documentation changes.

An alternative could be to move the modeline up or down the file (the
location is not important).

A simpler alternative could be to rename files *.adoc. This would have
the advantage of being recognised by even more tools.

Signed-off-by: M Hickford <[email-masked]>
---
    docs: add vim syntax modeline [RFC]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1874%2Fhickford%2Fasciidoc-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1874/hickford/asciidoc-v1
Pull-Request: https://github.com/git/git/pull/1874

 Documentation/git-add.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 5f2c3592b8d..123c98541b1 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -1,5 +1,6 @@
 git-add(1)
 ==========
+// vim: syntax=asciidoc
 
 NAME
 ----

base-commit: fbe8d3079d4a96aeb4e4529cc93cc0043b759a05
-- 
gitgitgadget