On 27/06/09 19:27, StarWing wrote:
>
>
>
> On 6月26日, 上午7时14分, "John Beckett"<[email protected]>  wrote:
>> Prasad Joshi wrote:
>>> I started VIM without giving the file name and started
>>> writing a C program ...
>>
>>> I ran the command
>>> :filetype detect
>>
>> The buffer has no file name, so detect can't guess that it is a
>> C program from the extension. Instead, it has to inspect the
>> contents and it reached a false conclusion.
>>
>> I would just enter command:
>>
>>      :set ft=c
>>
>> There are some minor suggestions 
>> here:http://vim.wikia.com/wiki/File_type_plugins
>>
>> John
>
> maybe "setf c" is a better choice?

":setf c" will not override an already-set filetype (such as config). If 
you know that the correct filetype is c, use ":setlocal ft=c".


Best regards,
Tony.
-- 
Time is money.  Especially if you make clocks.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to