aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-02-17 12:09:44 +0100
committerGitHub <noreply@github.com>2018-02-17 12:09:44 +0100
commit8b543d09d834994f7e696716ce8c146ab0652011 (patch)
treec768daf477d4ef3c44f23ebdb8154af10002f206 /runtime
parent2f018b1833247aea885ad01d6ac7a6649254b9ac (diff)
parente9134421ab8f72393d469d9d7793d4a75984cb93 (diff)
downloadrneovim-8b543d09d834994f7e696716ce8c146ab0652011.tar.gz
rneovim-8b543d09d834994f7e696716ce8c146ab0652011.tar.bz2
rneovim-8b543d09d834994f7e696716ce8c146ab0652011.zip
Merge pull request #8011 from nimitbhardwaj/vim-8.0.0649
vim-patch:8.0.0649 and vim-patch:8.0.0650
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim12
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index a2e1f23bf1..4e0f145c18 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Nov 02
+" Last Change: 2018 Feb 14
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -48,6 +48,9 @@ func! s:StarSetf(ft)
endif
endfunc
+" Vim help file
+au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
+
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call s:Check_inp()
@@ -2804,8 +2807,13 @@ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
" Plain text files, needs to be far down to not override others. This avoids
" the "conf" type being used if there is a line starting with '#'.
-au BufNewFile,BufRead *.txt,*.text,README setf text
+au BufNewFile,BufRead *.text,README setf text
+" Help files match *.txt but should have a last line that is a modeline.
+au BufNewFile,BufRead *.txt
+ \ if getline('$') !~ 'vim:.*ft=help'
+ \| setf text
+ \| endif
" Use the filetype detect plugins. They may overrule any of the previously
" detected filetypes.