From 4c2a7db6126725e619d7d849c8212aa81698d597 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 1 Jun 2019 16:10:40 +0200 Subject: Add ftdetect/git.vim Copy one of the Git file detectors from `/usr/local/share/vim/vim74/filetype.vim`. This gives me `gitcommit` filetype features for merge and tag messages even when using a Vim older than 7.4 (Vim 7.3, the default on many Macs, only sets COMMIT_EDITMSG to the `gitcommit` filetype). Additionally, set `gitcommit` on `PULLREQ_EDITMSG` files. This gives me the same features for pull request messages using GitHub's `hub` command line tool (in particular spell checking). --- ftdetect/git.vim | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ftdetect/git.vim (limited to 'ftdetect') diff --git a/ftdetect/git.vim b/ftdetect/git.vim new file mode 100644 index 0000000..e174982 --- /dev/null +++ b/ftdetect/git.vim @@ -0,0 +1,2 @@ +autocmd BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG,PULLREQ_EDITMSG + \ setfiletype gitcommit -- cgit v1.2.3