How to add a custom file extension that has a dot (blade.php) in NetBeans?

后端 未结 4 1911
旧时难觅i
旧时难觅i 2021-01-01 19:24

I need to assign a custom extension to be recognized as a twig file in netbeans (\'blade.php\' as \'twig\' file and give me syntax highlighting and code completion appropria

4条回答
  •  庸人自扰
    2021-01-01 19:57

    Workaround I figured out and seems to work (at least Netbeans 8.x+)

    • Go to Tools > Options > Miscellaneous > Files
    • Click New
    • Enter blade as the new extension (you can use anything here, but this seems the most natural)
    • Click OK
    • In Associate File Type (MIME) select TWIG (text/x-twig)
    • Click OK of the whole Options window
    • Close Netbeans
    • Open the Netbeans configuration folder - on Windows it's %AppData%\Netbeans\\
    • Go to subfolder config\Services\MIMEResolver
    • Open user-defined-mime-resolver.xml
    • Find the entry (or whatever you entred above)
    • Change the blade to blade.php
    • Save and close the file

    Voilà, higlighting should now work in Netbeans IDE :)

提交回复
热议问题