Friday, April 20, 2012

Re: filetype unknown on startup

On Friday, April 20, 2012 4:13:26 PM UTC-5, JollyJ wrote:
> Greetings,
>
> I am running Vim version 7.3.154 on Ubuntu Oneiric. I'm a newbie, and I
> just set up a .vimrc file with the following commands:
>
> set nocompatible
> set hlsearch
> set incsearch
> set number
> set showmode
> set syntax=ON
> color elflord
>
> All of the features I intended to set work like a charm, the problem is that
> now every time I open a file in VIM, i get the following error:
>
> filetype unknown
> Press ENTER or type command to continue
>
> It does this with all files I've tried to open, (.cpp, .c++, .txt and the
> .vimrc itself) It appears to me that the filetype.vim file should allow for
> all these to be detected, but I don't know for sure what I am reading.
> Funny thing is, the syntax highlighting still works even though the filetype
> is supposedly unknown.
>

I have no idea why syntax highlighting would work without filetype detection. Try putting "filetype indent plugin on" prior to "syntax on" in your .vimrc (without the quotes). If you don't want automatic indenting, just use "filetype plugin on". If you also don't want filetype-specific settings, just "filetype on".

--
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

No comments:

Post a Comment