Different language syntax highlighting within same file
I use a program called phpDesigner that highlights PHP, HTML, CSS, JavaScript all separately in the same document. It does code completion for each part, even if you do style="fon...".
I had to move to it since I couldn't find any other program that was so good when working with PHP (and all the other languages it uses at the same time), including Notepad++. The one thing I wish it did was syntax highlight SQL strings within PHP (it does fine with just SQL), but maybe in a future version.
Related videos on Youtube
dmackerman
Updated on September 17, 2022Comments
-
dmackerman over 1 year
I'm trying to get simple syntax highlighting working within a file. Here's the setup.
I have an
index.php
file, which Notepad++ correctly highlights any PHP code between the<?
and?>
tags. Inside of this file, I have some Javascript, which is properly recognized between the<script type="text/javascript">
and</script>
tags.However, I have some CSS that is not being properly highlighted. I've noticed this with all of the "themes" I've tried with Notepad++. The code is surrounded by
<style type="text/css">
and</style>
yet is not being understood as CSS properly.Any ideas?
Note: Notepad++ does properly highlight individual
.css
files.-
Admin over 11 yearsSo long as it correctly highlights the mixed PHP and Javascript, there should be no problems recognizing other languages. You might have to look at how NPP implements the mixed-language support, and then tweak the properties for all of PHP, (X)HTML, and CSS to support interleaving the languages...
-
-
n00b over 11 yearsi think its the only program written in delphi i like ;P easy to crack tho ;*