I've added a smarty (.tpl) file to my Notepad++ and now I'm trying to make .html and .js syntax highlighting work in .tpl files.
What I mean by this is: when you view php code in Notepad++ and there is some html and javascript in the page, syntax highlighting will appear for php, html, and javascript (in their appropriate sections).
I am attempting to do the same from a smarty file where you might have all 3 PLUS the smarty syntax. However, I have not been able to find where this is.
I found a section in Preferences > File Association where there is an entry under "Supported exts" for "web(html) script" and extensions such as .js, .html, .php are in that category. However, I cannot edit that category to add the .tpl (smarty) extension.
Is this the right approach?
If so, how do I edit this section.
If not, what do I need to do to make .tpl have html, js, php highlighting?
Please help :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the styler configurator, you can add your own extensions so those files get opened in that language auytomatically.
However, you cannot combine smarty and PHP/HTML/Javacript together, you can only adjust the keywords of those languages that already exist.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-12-02
Hm, exactly the same problem. Cant work out this GUI.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Smarty is a user defined language, as far as Notepad++ is concerned, and so does not support embedded scripts the way PHP does.
A way out, but it is hardly practical, would be to rip the LexHTML.cxx source file and turn it into the source for an external lexer, ie a plugin dll adding support for the language. If you know how to make a dll - it does not need to be written in C++ -, then you can have a go at this.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've added a smarty (.tpl) file to my Notepad++ and now I'm trying to make .html and .js syntax highlighting work in .tpl files.
What I mean by this is: when you view php code in Notepad++ and there is some html and javascript in the page, syntax highlighting will appear for php, html, and javascript (in their appropriate sections).
I am attempting to do the same from a smarty file where you might have all 3 PLUS the smarty syntax. However, I have not been able to find where this is.
I found a section in Preferences > File Association where there is an entry under "Supported exts" for "web(html) script" and extensions such as .js, .html, .php are in that category. However, I cannot edit that category to add the .tpl (smarty) extension.
Is this the right approach?
If so, how do I edit this section.
If not, what do I need to do to make .tpl have html, js, php highlighting?
Please help :)
In the styler configurator, you can add your own extensions so those files get opened in that language auytomatically.
However, you cannot combine smarty and PHP/HTML/Javacript together, you can only adjust the keywords of those languages that already exist.
Hm, exactly the same problem. Cant work out this GUI.
Smarty is a user defined language, as far as Notepad++ is concerned, and so does not support embedded scripts the way PHP does.
A way out, but it is hardly practical, would be to rip the LexHTML.cxx source file and turn it into the source for an external lexer, ie a plugin dll adding support for the language. If you know how to make a dll - it does not need to be written in C++ -, then you can have a go at this.
CChris