Loading ...
Sorry, an error occurred while loading the content.

Re: filetype detect: does not seem to detect the file type of C Program file.

Expand Messages
  • Tony Mechelynck
    ... :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.
    Message 1 of 6 , Jun 27, 2009
    • 0 Attachment
      On 27/06/09 19:27, StarWing wrote:
      >
      >
      >
      > On 6月26日, 上午7时14分, "John Beckett"<johnb.beck...@...> 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
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.