KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.84k stars 154 forks source link

Comment line/block doesn't work for EEX files #936

Open kandeshvari opened 6 years ago

kandeshvari commented 6 years ago

subj

  1. Select block/line
  2. press ctrl + /
  3. no profit :(
KronicDeth commented 6 years ago

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.

x-ji commented 6 years ago

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.

manuelgeek commented 4 years ago

any solution on this?

dunker1304 commented 4 years ago

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

manuelgeek commented 4 years ago

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

karthikbp21 commented 1 month ago

Any update on this issue ? Please let me know