vscode-ruby version: 0.16.0ctrl+shift+7 should outcomment lines in .erb files (<%# %>)
ctrl+shift+7 outcomments lines in .erb files by prepending '#'
Open a html.erb file, select a line, use the 'commentLine' command by default bound to ctrl+shift+7
Reproduced on Windows 10 Pro version 1709 build 16299.192
VSCode version 1.19.3
rebornix.ruby version 0.16.0
Ruby version 2.4.2p198
My default binding is not Ctrl+Shift+7, rather it's Ctrl+/, but this does indeed insert a # rather than a <%# %>. Same behaviour when selecting text to comment it. I suspect this has to do with the (mostly) broken grammar detection in 0.16.0.
Nope, not the grammar. The grammars control the highlighting. The language configuration defines things like comments.
Ah, of course. Can the language configuration be modified to distinguish between making a comment within an ERB escaped area and without?
I'm guessing not since the language config is loaded based on the detected language for the source file. We'd probably have to do something custom to support that use case. This is just off the top of my head, though.
Well I was wrong. Apparently it was a pretty straightforward change to package.json. #260 addresses this.
Most helpful comment
Well I was wrong. Apparently it was a pretty straightforward change to
package.json. #260 addresses this.