Add a custom file extension to Netbeans

前端 未结 4 1432
旧巷少年郎
旧巷少年郎 2020-12-23 19:07

I am trying to figure out how to add a custom file type to be recognised by Netbeans.

I am editing .tpl files and I would like them to be recognised as PHP/HTML file

相关标签:
4条回答
  • 2020-12-23 19:44

    Go to

    Netbeans
        tools
         options
          Miscellaneous
            Files
    

    Now find the row file extension select tpl . Then most important to Choose the Associated File Type (MIME) as text/x-php5. After save this, restart netbeans.

    0 讨论(0)
  • 2020-12-23 19:46

    In NetBeans 8.XX this is achieved by going to NetBeans > Preferences > Miscellaneous > Files. In the row File Extension click on NEW and enter your new file extension without the dot (example: tpl). Choose the Associated File Type (MIME) and click Apply.

    0 讨论(0)
  • 2020-12-23 19:58

    If you're looking for how to get Netbeans to recognize smarty templates, there's now a Smarty template plugin that should be more useful: http://plugins.netbeans.org/plugin/37379/php-smarty

    0 讨论(0)
  • 2020-12-23 20:11

    Let me guess, for Smarty templates? I did the following

    1. Open Tools and Select Options.
    2. Select Miscellaneous tab.
    3. Select Files sub-tab thing.
    4. Click on New file extension and enter tpl.
    5. Select the mime type.
    6. Click OK. Done!
    7. (Restart of Netbeans may be required to see the actual changes)
    0 讨论(0)
提交回复
热议问题