Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-3437

Include HTML syntax within PHP quoted strings



      I'm not sure if this is at all possible, but would it be feasible to include HTML syntax within PHP quoted strings?
      It's horrifying to have read HTML code within a php string with no syntax highlighting. It's equally horrifying to have to jump out of php, code out some html, then jump right back in.

      You wouldn't have to need to offer it by default, but as an option which can be toggled on and off through some sort of configuration panel. I've managed to alter Textmate's syntax highlighting to provide html syntax within php quoted string's, it was simply a matter of including the HTML syntax text.html.basic in php's string-single-quoted and string-double-quoted selectors as shown below:

      string-single-quoted = {
          name = 'string.quoted.single.php';
          contentName = 'meta.string-contents.quoted.single.php';
          begin = "'";
          end = "'";
          beginCaptures = { 0 = { name = 'punctuation.definition.string.begin.php'; }; };
          endCaptures = { 0 = { name = 'punctuation.definition.string.end.php'; }; };
          patterns = (
              {   include = 'text.html.basic'; },
              {   name = 'constant.character.escape.php';
                  match = '\\[\\'']';

      It was a bit buggy and sub-par, but I'm sure you guy's can refine it for aptana.

      Thanks in advance.

      P.S: Awesome IDE by the way.




            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              vanity85 Aziz
            • Watchers:
              1 Start watching this issue


              • Created:

                Git Integration