Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have seen a few posts suggesting how to customize SublimeText for better drupal development, although I did not see any mention of and not sure how SublimeText2 would recognize my custom module's .module as php file and show the various color highlighting for it.

Currently it just treats my .module file as an unknown file and does not show any color highlighting on it.

Thanks.

share|improve this question

closed as off-topic by kiamlaluno Jun 8 at 9:24

  • This question does not appear to be about Drupal within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
I'm voting to close this question as off-topic because it is about changing settings for a text editor. – kiamlaluno Jun 8 at 9:24
    
@kiamlaluno You have 62.6k reputation, I just have 349 , why do you want to take away all the few reputations I got because of this question. :) – pal4life Jun 15 at 5:37
    
But on a serious note. Sublime text is heavily used for Drupal development and perhaps this is one of the first questions any one could get for that. As per the Help center this question is related to - Site-building how-tos , thus falls under that. – pal4life Jun 15 at 5:40
    
Drupal Answers is for questions that require a specific Drupal knowledge to be answered. Following your reasoning, you could also ask how to sort an array, just because you are trying to do that in a module. At that point, we would be Stack Overflow 2. We exist because we are a specialized Stack Exchange site; differently, we would not exist. – kiamlaluno Jun 15 at 9:00
    
Sorry your example about array sort is totally misleading..module is a speciaized file that only is related to Drupal, hence it matters here for Drupal Answers. As a drupal dev you would look here first for answers related to .module file. For an array sort even a newbie knows to ask at regular stack overflow. If you have an issue with guidelines then improve that but this question is as per guideline on drupal.stackexchange.com/help/on-topic under 'Site-building how-tos' and deserves to be opened. – pal4life Jun 21 at 18:31
up vote 12 down vote accepted

When you have the .module file open, go to:

View -> Syntax -> Open all with current extension as

and select PHP. This will then default all .module files to use PHP syntax.

share|improve this answer
    
Wow This is super awesome +1 Karma. – pal4life Aug 6 '14 at 19:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.