In a plain Vim installation, if I have a personal ftplugin ~/.vim/ftplugin/text.vim that contains the line
setlocal expandtab then 'expandtab' will be on in Vim "help" files. It would be better not to apply settings for "text" files to help files. Would this be an acceptable fix? Alternatively, we could just try to detect help files directly. Best, -- David diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4d2ffe8..460f6bf 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2713,7 +2713,11 @@ 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 +au BufNewFile,BufRead *.txt + \ if !(expand('<amatch>:p:h:t') ==# 'doc' && getline(1) =~# '^\*.*\*') + \| setf text + \|endif " Use the filetype detect plugins. They may overrule any of the previously -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.