threads / patch / 29962

patchVim configurations, add gitcommit filetype to submodules

Subject: [PATCH] Vim configurations, add gitcommit filetype to submodules

## tl;dr

One message between Mar 16, 2012 and Mar 16, 2012. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Patrick F. Marques· Mar 16, 2012, 11:47 UTC · lore

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>
---
Show changes to contrib/vim/README +1 −1
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]*
--

← back to recent threads