aboutsummaryrefslogtreecommitdiffstats
path: root/ftdetect/git.vim
diff options
context:
space:
mode:
authorTeddy Wing2019-06-01 16:10:40 +0200
committerTeddy Wing2019-06-01 16:16:30 +0200
commit4c2a7db6126725e619d7d849c8212aa81698d597 (patch)
treea37936b93cb5e704c2be9a5787db5919196b695e /ftdetect/git.vim
parente377fe0d40162faf1a823cabec28989f8c3e4fae (diff)
downloaddotvim-4c2a7db6126725e619d7d849c8212aa81698d597.tar.bz2
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).
Diffstat (limited to 'ftdetect/git.vim')
-rw-r--r--ftdetect/git.vim2
1 files changed, 2 insertions, 0 deletions
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