Aptana Studio
  1. Aptana Studio
  2. APSTUD-3437

Include HTML syntax within PHP quoted strings

    Details

      Description

      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.

        Activity

        Hide
        Ingo Muschenetz added a comment -

        That's for the suggestion...we'll look into it. It may be some time, however, before we can get to it. If we think of a quicker workaround, we'll let you know.

        Show
        Ingo Muschenetz added a comment - That's for the suggestion...we'll look into it. It may be some time, however, before we can get to it. If we think of a quicker workaround, we'll let you know.
        Hide
        Aziz added a comment -

        Thanks for the reassuring reply Ingo. Greatly appreciated. All the best.

        Show
        Aziz added a comment - Thanks for the reassuring reply Ingo. Greatly appreciated. All the best.

          People

          • Assignee:
            Praveen Innamuri
            Reporter:
            Aziz
          • Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: