aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorNimit Bhardwaj <nimitbhardwaj@gmail.com>2018-02-14 19:48:01 +0530
committerNimit Bhardwaj <nimitbhardwaj@gmail.com>2018-02-17 00:02:16 +0530
commite9134421ab8f72393d469d9d7793d4a75984cb93 (patch)
tree23570022ea0b899d2360e602937b22c4ad15095b /runtime
parent09b51bbf87b16af9a186cea750ada748d89aa259 (diff)
downloadrneovim-e9134421ab8f72393d469d9d7793d4a75984cb93.tar.gz
rneovim-e9134421ab8f72393d469d9d7793d4a75984cb93.tar.bz2
rneovim-e9134421ab8f72393d469d9d7793d4a75984cb93.zip
vim-patch-8.0.0649 and vim-patch-8.0.0650: autocmd open help 2 times
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.