Hi guys,

I'm developing on Drupal now a days and find it annoying that gvim cannot 
detect that the .module are PHP files. So I added a few lines of code to 
my filetype.vim to paliate. I would imagine some other vi lovers will run 
in this one too. We could also support the .install files I guess. Also 
that I do not have much of a problem with.

Thank you.
Alexis Wilke
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

--- filetype.vim.orig   2008-10-09 11:59:45.000000000 -0700
+++ filetype.vim        2008-10-09 17:20:05.000000000 -0700
@@ -2080,7 +2080,13 @@
 au BufNewFile,BufRead .viminfo,_viminfo                setf viminfo
 
 " Virata Config Script File
-au BufRead,BufNewFile *.hw,*.module,*.pkg      setf virata
+" Or Drupal Module
+au BufNewFile,BufRead *.hw,*.module,*.pkg
+       \ if getline(1) =~ '<\?php' |
+       \   setf php |
+       \ else |
+       \   setf virata |
+       \ endif
 
 " Visual Basic (also uses *.bas) or FORM
 au BufNewFile,BufRead *.frm                    call s:FTVB("form")

Raspunde prin e-mail lui