Language specific comments in erb files

How do I get the comments to changes based on what type of languge is being used in an erb file?

For istance, if I am in a file called hello_world.js.erb... I'd like to hit cmd+/ and the comments are either /*...*/ or // for javascript blocks. Presently, I'm getting html comments <!-- ... -->.
The IDE correctly identifies the different code contexts/languages when doing its syntax highlighting and autocomplete. So I figure that this should be possibl?

Thanks
H

4 comments
Comment actions Permalink

Could you please provide an example of your file with information about caret placement where you try to comment something? (to be more specific)

0
Comment actions Permalink

filename hello_worl.js.erb

1: var student_name = '<%= h student.name %>';

2:

3: var SomeClass = Class.create({

4:   initialize:function(students) {

5:     this.students = students;

6:   }

7: });

8:

9: new SomeClass([student_name]);


If I put the cursor at line 3 and press cmd+/ it changes to <!-- var some_class = Class.create({ --> instead of //var some_class = Class.create({

If I hightlight lines 4 throught 8 I get:

4: <!--initialize:function(students) {-->

5: <!--this.students = students;-->

6: <!--}-->

7: <!--});-->

8: <!---->

instead of:

4: //initialize:function(students) {

5: //this.students = students;

6: //}

7: //});

8: //


H

0
Comment actions Permalink

I've created an issue for this: http://youtrack.jetbrains.net/issue/RUBY-5565

Best regards,
Oleg

0
Comment actions Permalink

Thanks. Looking forward to the fix.

H

0

Please sign in to leave a comment.