LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-22-2005, 03:36 PM   #1
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
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
 
Old 12-23-2005, 12:50 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402
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.
 
Old 12-24-2005, 10:35 AM   #3
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Original Poster
Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php-devel & PHP extensions EHCanadian Mandriva 0 06-23-2005 07:06 PM
add compile-time extensions to php built from a package chr15t0 Slackware 2 02-24-2005 05:17 PM
Php extensions won't load myranalis Linux - General 0 05-07-2004 03:11 AM
MYSQL Extensions For PHP? hbidad Linux - Software 0 02-09-2003 03:57 PM
php AND extensions kaiozero Linux - Software 1 05-30-2002 06:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration