(Forgot the attachment) David
On Tue, Jul 8, 2014 at 12:31 PM, David Barnett <dbarn...@google.com> wrote: > Hi, > > Could you integrate the attached patch (or some variation) into vim, under > the vim license? > > It includes: > > - A change to the ftdetect rule to consider files named "README" as > text. > - An ftplugin to override 'comments' and 'commentstring' for text > files, since the default is not at all appropriate for text files. > > Of course, this has no effect on buffers with *no* filetype set, where > people might reasonably want the default catch-all settings. > > David > -- -- 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.
diff -r b8f703a4e55f runtime/filetype.vim --- a/runtime/filetype.vim Fri Jul 04 16:43:17 2014 +0200 +++ b/runtime/filetype.vim Mon Jul 07 17:54:47 2014 -0700 @@ -2664,7 +2664,7 @@ " 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 setf text +au BufNewFile,BufRead README,*.txt,*.text setf text " Use the filetype detect plugins. They may overrule any of the previously diff -r b8f703a4e55f runtime/ftplugin/text.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/runtime/ftplugin/text.vim Mon Jul 07 17:54:47 2014 -0700 @@ -0,0 +1,17 @@ +" Vim filetype plugin +" Language: Text +" Maintainer: David Barnett <daviebdawg+...@gmail.com> +" Last Change: 2014 July 7 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setlocal comments< commentstring<' + +" We intentionally don't set formatoptions-=t since text should wrap as text. + +" Pseudo comment leaders to indent bulleted lists. +setlocal comments=fb:-,fb:* +setlocal commentstring=