Re: Prolog filetype problem
- 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