git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Vim configurations, add gitcommit filetype to submodules

From
PMPatrick F. Marques <patrickfmarques@gmail.com>
Date
Mar 16, 2012, 11:47 UTC
Message-ID
<CANigeX1MuhT8tG0Gb4cNXrZKzd2jt66wS84VswL-w1dngBD92w@mail.gmail.com>

Git commit in submodules doesn't use the correct vim syntax. (filetype is set to conf instead of gitcommit)

This will set ft to gitcommit in all submodules (also tested on submodules of submodules)

Signed-off-by: Patrick F. Marques <patrickfmarques@gmail.com>
---
diff --git a/contrib/vim/README b/contrib/vim/README
--- a/contrib/vim/README
+++ b/contrib/vim/README
@@ -19,6 +19,7 @@ To install:
   2. To auto-detect the editing of various git-related filetypes:
 	$ cat >>$HOME/.vim/filetype.vim <<'EOF'
 	autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG    setf gitcommit
+	autocmd BufNewFile,BufRead *.git/modules/*/COMMIT_EDITMSG    setf gitcommit
 	autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
 	autocmd BufNewFile,BufRead git-rebase-todo         setf gitrebase
 	autocmd BufNewFile,BufRead .msg.[0-9]*
--
Message 1 of 1 in “Vim configurations, add gitcommit filetype to submodules”
  1. Vim configurations, add gitcommit filetype to submodulesPatrick F. Marques, Mar 16, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.