LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   vim php with weird extensions (https://www.linuxquestions.org/questions/linux-software-2/vim-php-with-weird-extensions-395722/)

dlublink 12-22-2005 02:36 PM

vim php with weird extensions
 
Hey,

What do I need to add to the .vimrc file so that files with the extension .somethingelse are recognized as PHP files by Vim so that I get all the colour coding.

Thanks,

David

druuna 12-23-2005 11:50 AM

Hi,

Locate vim's filetype.vim file (/usr/share/vim/vim62/filetype.vim or alike).

Open it and look for the following lines

" Php3
au BufNewFile,BufRead *.php,*.php3 setf php


Add .somethingelse to *.php,*.php3
You should end up with something like this:

" Php3
au BufNewFile,BufRead *.php,*.php3,*.somethingelse setf php


That should do the trick.

Hope this helps.

dlublink 12-24-2005 09:35 AM

Quote:

Originally Posted by druuna
Locate vim's filetype.vim file (/usr/share/vim/vim62/filetype.vim or alike).

Thanks it worked great, only difference was that my folder was vim63 and not vim62.

Merry Christmas!

David


All times are GMT -5. The time now is 07:17 PM.