Language specific, custom comment and block comment styles


#1

I want to define comment styles for specific file types. For instance, in .html.erb files, I want my comments to turn out like this:

<div class="panel">
<% 
=begin %>
  <div class="panel-heading">
    Heading content
  </div>
<% 
=end %>
  <div class="panel-body">
    Body Content
  </div>
</div>

Because this is the guaranteed way to comment out multiple lines of ERB code using begin/end.


#2

There isn’t support for this in Atom right now. It sounds like an interesting idea for a package though :grinning:


#3

so what you are saying is there is no way to extend the builtin comment function to add more file types(extensions) and corresponding comment syntax?

with support it seems as simple as a few json/cson keys in the config file for extensions and opening and closing syntax

There is an unmaintained package already someone started but it duplicates functionality already built in.