aboutsummaryrefslogtreecommitdiff
path: root/runtime/filetype.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-01-07 10:27:34 +0100
committerGitHub <noreply@github.com>2022-01-07 10:27:34 +0100
commitbba679c431069396ad28952620316e1f1fd97945 (patch)
tree4e871f99bd28222e96e067e6601fb69c55a877c9 /runtime/filetype.vim
parente58071c92c98fa54fcb29ab87ac6de7c02ede27b (diff)
downloadrneovim-bba679c431069396ad28952620316e1f1fd97945.tar.gz
rneovim-bba679c431069396ad28952620316e1f1fd97945.tar.bz2
rneovim-bba679c431069396ad28952620316e1f1fd97945.zip
vim-patch:8.2.4014: git and gitcommit file types not properly recognized (#16953)
Problem: Git and gitcommit file types not properly recognized. Solution: Adjust filetype detection. (Tim Pope, closes vim/vim#9477) https://github.com/vim/vim/commit/c689f8c3d98fffe7e13730e198ce120934528f9c
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r--runtime/filetype.vim9
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 7fdbfe32d8..907f806f31 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -493,7 +493,7 @@ au BufNewFile,BufRead */debian/patches/* call dist#ft#Dep3patch()
" Diff files
au BufNewFile,BufRead *.diff,*.rej setf diff
au BufNewFile,BufRead *.patch
- \ if getline(1) =~ '^From [0-9a-f]\{40\} Mon Sep 17 00:00:00 2001$' |
+ \ if getline(1) =~# '^From [0-9a-f]\{40,\} Mon Sep 17 00:00:00 2001$' |
\ setf gitsendemail |
\ else |
\ setf diff |
@@ -672,6 +672,7 @@ autocmd BufRead,BufNewFile *.gift setf gift
" Git
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
+au BufNewFile,BufRead NOTES_EDITMSG,EDIT_DESCRIPTION setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
@@ -680,12 +681,8 @@ if !empty($XDG_CONFIG_HOME)
endif
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
-au BufNewFile,BufRead .msg.[0-9]*
- \ if getline(1) =~ '^From.*# This line is ignored.$' |
- \ setf gitsendemail |
- \ endif
au BufNewFile,BufRead *.git/*
- \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
+ \ if getline(1) =~# '^\x\{40,\}\>\|^ref: ' |
\ setf git |
\ endif