public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] docs: add vim syntax modeline [RFC]
@ 2025-01-13 21:03 M Hickford via GitGitGadget
  2025-01-13 21:33 ` brian m. carlson
  2025-01-13 22:37 ` D. Ben Knoble
  0 siblings, 2 replies; 6+ messages in thread
From: M Hickford via GitGitGadget @ 2025-01-13 21:03 UTC (permalink / raw)
  To: git; +Cc: M Hickford, M Hickford

From: M Hickford <mirth.hickford@gmail•com>

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 <mirth.hickford@gmail•com>
---
    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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-16 18:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 21:03 [PATCH] docs: add vim syntax modeline [RFC] M Hickford via GitGitGadget
2025-01-13 21:33 ` brian m. carlson
2025-01-13 22:50   ` M Hickford
2025-01-13 22:52   ` Junio C Hamano
2025-01-16 18:55     ` M Hickford
2025-01-13 22:37 ` D. Ben Knoble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox