Broken toggle comment in Textmate

I have a problem with the Toggle Comment command ("Comment Line / Selection") in TextMate for ActionScript 2 (I know, I know). I tried to completely strip the language given to isolate the problem, and tried to go through Ruby, and to no avail. My problem is that the team insists on using block comments to switch comments ( ⌘ + / ) and does not take into account when I add the settings file to change TM_COMMENT_MODE. I even tried using this simple preference:

{   shellVariables = (
        {   name = 'TM_COMMENT_START';
            value = '// ';
        },
    );
}

but no luck. I hope that someone who speaks Ruby is much better than me (i.e. Generally) can find a simple solution for this. You can play back on any (recent) TextMate installation by creating a new actionscript 2 file and try the ⌘ + / section of code (or even the line). Contrast with the JS file that will use the comment on the line. Copy the "Comments" snippet from JavaScript to the Actionscript packages and the problem will persist.

Thank!

+3
source share
1 answer

In your ActionScript package, add the Comments preference. In the editor part add:

{   shellVariables = (
    {   name = 'TM_COMMENT_START';
        value = '// ';
    },
    {   name = 'TM_COMMENT_DISABLE_INDENT';
        value = 'YES';
    },
    {   name = 'TM_COMMENT_START_2';
        value = '/* ';
    },
    {   name = 'TM_COMMENT_END_2';
        value = '*/';
    },
  );
}

and finally, at the bottom, set the area selector: scope.actionscript.2

Here is an image of what mine looks like enter image description here

Reload Bundles .

+6

Source: https://habr.com/ru/post/1795263/


All Articles