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.


  • I'm voting to close this question as off-topic because it is about changing settings for a text editor.
    – apaderno
    Commented Jun 8, 2016 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
    Commented Jun 15, 2016 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
    Commented Jun 15, 2016 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.
    – apaderno
    Commented Jun 15, 2016 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
    Commented Jun 21, 2016 at 18:31

1 Answer 1


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.

  • Wow This is super awesome +1 Karma.
    – pal4life
    Commented Aug 6, 2014 at 19:25

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