intellij-elixir icon indicating copy to clipboard operation
intellij-elixir copied to clipboard

Comment line/block doesn't work for EEX files

Open kandeshvari opened this issue 7 years ago • 6 comments
trafficstars

subj

  1. Select block/line
  2. press ctrl + /
  3. no profit :(

kandeshvari avatar Dec 03 '17 11:12 kandeshvari

Cmd + / works fine for me once inside an EEx tag, but it uses # because that's the Elixir comment. So, that needs to be fixed

elixir comment when in eex tag

Selecting consecutive EEx tags works, but this also shows that uncommenting with Cmd + / doesn't work because the Elixir comment is put outside the EEx tag.

multiple eex tag selection comment

This could be a side-effect of having to treat the whitespace between EEx tags as belonging to EEx in order to handle spacing between the do and stab operations as normally that would count as template data:

<% cond do %>
  <% false -> %>
      ...
<% end %>

Finally, inter-language commenting does not work when the selection spans both HTML tags and EEx tags.

cross-language comment

Only the ending language, Elixir comment is used. I'm not even sure OpenAPI handles this. It may be something I need to do custom.

KronicDeth avatar Dec 03 '17 13:12 KronicDeth

Now even if I want to comment on pure HTML lines, IntelliJ uses #, which is wrong... Would there be a way to fix it or maybe temporarily use the HTML commenting syntax instead? It's much harder to type than the single # required for commenting out Elixir, actually.

x-ji avatar Mar 05 '18 22:03 x-ji

any solution on this?

manuelgeek avatar Feb 10 '20 11:02 manuelgeek

@manuelgeek use <!-- multi line here -->

dunker1304 avatar Feb 25 '20 08:02 dunker1304

@dunker1304 thank you, I hadn't tried this, it works

manuelgeek avatar Feb 25 '20 09:02 manuelgeek

Any update on this issue ? Please let me know

karthikbp21 avatar Sep 30 '24 07:09 karthikbp21