Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web development tool that can comprehend the concept of more than one language in a file at once

I currently use notepad++ on windows or gedit on ubuntu. Both of them work great with code highlighting and hinting etc. But both of them suffer from a huge flaw. I am yet to find a code editor that can handle this concept:

<?php
// ooh, look I am doing some php
?><a onclick="alert('hay, some javascript in here now!')">
This link is HTML?!</a>
<?PHP
echo("NOW we have some php as well!");
?>

At the moment, I just have to settle for the one language. I want something that can think of a that text as a default as HTML, but notice when sections are PHP. I want those sections of PHP to have there own code hinting and highlighting. Even more, lets say in an 'if else' I exit PHP, write some HTML then back into PHP, I want it to work out how the braces ( '{' and '}' ) should match up and let me know if I have missed one. I want the sections of in-line JavaScript to be picked up as such. I want all of these languages to get checked for syntax!

Damn it, I want to tool that understands more than one language at once!

Extra

Should point out that I am not willing to pay for such luxury :P

My files are saved as '.php'.

Notepad++ is able to to work out that I am using PHP but when I drop out of php and do some HTML and/or some JavaScript.

like image 495
thecoshman Avatar asked Feb 28 '23 03:02

thecoshman


1 Answers

PHPStorm is probably the most powerful IDE for your requirements. Pricey, but give it a go. I think it's worth it...

like image 168
Rob Fonseca-Ensor Avatar answered Apr 26 '23 09:04

Rob Fonseca-Ensor