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

Re: Prolog filetype problem

Expand Messages
  • Gautier DI FOLCO
    2012/9/30 Ben Fritz ... Clever, thank you. -- You received this message from the vim_use maillist. Do not top-post! Type your reply
    Message 1 of 3 , Oct 1, 2012
    • 0 Attachment
      2012/9/30 Ben Fritz <fritzophrenic@...>
      It looks like Vim will automatically detect prolog rather than Perl if the first non-blank line contains any of:

      1. the word "prolog"
      2. a prolog comment, % or /* ... */
      3. the prolog :- construct

      Otherwise, Vim detects Perl. So for existing files, just get into the habit of starting the file with a header comment and you'll be fine.

      I guess new files will always detect as Perl, but there's really not any way I can think of for Vim to detect in a general way what filetype a brand-new empty file should be. You could set up some BufNewFile autocmds based on project directory or something if you like for this.

      Clever, thank you.

      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.