diff options
author | ObserverOfTime <chronobserver@disroot.org> | 2022-09-10 11:04:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-10 11:04:24 +0100 |
commit | 9ba2786f15f0b53a90fd221832a5bedfc6dbfe20 (patch) | |
tree | c19d4117e873b0f54a1b0c545bde556d3500c2aa /runtime/filetype.vim | |
parent | 12553ada3b1ceee0179527abc9980b8392fd6c7e (diff) |
patch 9.0.0434: gitignore files are not recognizedv9.0.0434
Problem: gitignore files are not recognized.
Solution: Add patterns for the gitignore filetype. (closes #11102)
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r-- | runtime/filetype.vim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9c43fb85fd..0223402a4b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -721,12 +721,15 @@ au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig if !empty($XDG_CONFIG_HOME) au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig au BufNewFile,BufRead $XDG_CONFIG_HOME/git/attributes setf gitattributes + au BufNewFile,BufRead $XDG_CONFIG_HOME/git/ignore setf gitignore endif au BufNewFile,BufRead .gitattributes,*.git/info/attributes setf gitattributes -au BufNewFile,BufRead */.config/git/attributes setf gitattributes -au BufNewFile,BufRead */etc/gitattributes setf gitattributes -au BufNewFile,BufRead git-rebase-todo setf gitrebase -au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail +au BufNewFile,BufRead */.config/git/attributes setf gitattributes +au BufNewFile,BufRead */etc/gitattributes setf gitattributes +au BufNewFile,BufRead .gitignore,*.git/info/exclude setf gitignore +au BufNewFile,BufRead */.config/git/ignore setf gitignore +au BufNewFile,BufRead git-rebase-todo setf gitrebase +au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail au BufNewFile,BufRead *.git/* \ if getline(1) =~# '^\x\{40,\}\>\|^ref: ' | \ setf git | |