Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Detect TAG_EDITMSG as gitcommit #5

wants to merge 1 commit into from

4 participants



I tend to write (some) tags in the same subject-body format as commits. There's also NOTES_EDITMSG, but I don't think that the commit style really lends itself to that so I left it out.

@jacknagel jacknagel Detect TAG_EDITMSG as gitcommit
Signed-off-by: Jack Nagel <>

Does this really make sense? conf seems more than adequate, and that happens without us doing anything.

If it does, this needs to be squared away with 1b9c234.


@tpope How about MERGE_MSG?

Recent versions of git default to interactively editing the merge
commit message (like git merge --edit), which opens .git/MERGE_MSG.
This creates git commit objects, so it seems logical to set the filetype
to gitcommit.


I forgot about this, and I don't really care anymore.

@jacknagel jacknagel closed this

There are situations where I could see this making sense—there are git commands (git tag -n, for example) which show the first line of a tag message by default in a similar "email subject-like" way as other commands show the first line of commit messages, so it seems to follow that they could benefit from an application of the same standards as a commit message.

@tpope tpope referenced this pull request from a commit
@tpope Highlight TAG_EDITMSG as a commit
References #5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 12, 2011
  1. @jacknagel

    Detect TAG_EDITMSG as gitcommit

    jacknagel authored
    Signed-off-by: Jack Nagel <>
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  ftdetect/git.vim
2  ftdetect/git.vim
@@ -1,5 +1,5 @@
" Git
-autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG set ft=gitcommit
+autocmd BufNewFile,BufRead *.git/{COMMIT,TAG}_EDITMSG set ft=gitcommit
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
autocmd BufNewFile,BufRead .msg.[0-9]*
Something went wrong with that request. Please try again.