On Fri, Mar 18, 2011 at 01:12:44PM +0100, Marco wrote:
> When often edit files where the filetype detection fails. The files are
> detected as »conf« instead of »gnuplot« for instance. I can set ft=gnuplot,
> but when I switch to another buffer and switch back, it falls back to »conf«,
> including the wrong syntax highlighting.
>
> How can I make vim remember my manually input file type?
>
> Marco

Vim doesn't remember the file type. When you open a file it
checks if the file matches certain criteria and then sets the
file type (:h filetype for more information).

You can fix this by either writing special rules to detect
gnuplot files (by having a look at the content) or by using the
correct extension (.gpi for gnuplot) which Vim can detect.

You can use a different extension of course by adding this to
your vimrc:

    au BufNewFile,BufRead *.extension-here setf gnuplot

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: pgpkrlA5x1ael.pgp
Description: PGP signature

Reply via email to