-*todo.txt* For Vim version 9.1. Last change: 2025 Feb 21
+*todo.txt* For Vim version 9.1. Last change: 2025 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar
are reflected in each Vim immediately. Could work with local files but
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
-vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:
-vim: set fo+=n :
+vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:fo+=n:
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Mar 06
+" Last Change: 2025 Mar 08
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Listen very carefully, I will say this only once
endif
endfunc
-" Vim help file
-au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
+" Vim help file, set ft explicitly, because 'modeline' might be off
+au BufNewFile,BufRead */doc/*.txt
+ \ if getline('$') =~ 'vim:.*\<\(ft\|filetype\)=help\>'
+ \| setf help
+ \| endif
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
'.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zsh_history',
'.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file',
'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
-
- help: [$VIMRUNTIME .. '/doc/help.txt'],
}
enddef
filetype off
endfunc
+func Test_help_file()
+ filetype on
+ call assert_true(mkdir('doc', 'pR'))
+
+ call writefile(['some text', 'vim:ft=help:'], 'doc/help.txt', 'D')
+ split doc/help.txt
+ call assert_equal('help', &filetype)
+ bwipe!
+
+ call writefile(['some text'], 'doc/nothelp.txt', 'D')
+ split doc/nothelp.txt
+ call assert_notequal('help', &filetype)
+ bwipe!
+
+ filetype off
+endfunc
+
func Test_hook_file()
filetype on
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1186,
/**/
1185,
/**/