From e9134421ab8f72393d469d9d7793d4a75984cb93 Mon Sep 17 00:00:00 2001 From: Nimit Bhardwaj Date: Wed, 14 Feb 2018 19:48:01 +0530 Subject: vim-patch-8.0.0649 and vim-patch-8.0.0650: autocmd open help 2 times --- runtime/filetype.vim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'runtime') 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 -" 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. -- cgit