Daniel D Jones wrote:
Using Gvim under Gentoo Linux, if I open a file with a .txt extension,
Gvim
sets the filetype to text and sets the appropriate word wrap, etc.
that I have
configured. But if I open Gvim, create a new buffer with :tabnew and
then save
that as a file with a .txt extension, Gvim doesn't set the
filetype...
Gary replied:
> Vim assumes that you want to determine the file type when a file is
> opened or a new buffer is created, i.e., before you start viewing or
> editing, not when you write the file.
I think that's quite wrong. I put
au! BufRead,BufNewFile *.txt setfiletype text
in my ~/.vim/filetype.vim according to :help new-filetype part C, and
upon :tabnew, :save (or :write) the file type is set to text.
(that's 7.2.330).
Daniel, how is your text file type being set?
Regards, John
--
You received this message from the "vim_use" 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