MarcinKonowalczyk MarcinKonowalczyk -4 years ago 189
CoffeeScript Question

Creating custom minimap-titles grammar for .tex fiels

I've recently started using Atom for my LaTeX needs, and so far it's doing really well. I'm using a package called

to display the whole code as a scrollbar which is very helpful, but I can't get the
package to work properly. The comments I'm getting are generated with the
markers as opposed to with the LaTeX comment characters

How would I go about adding a *.tex file extension to the list of files recognized by
, and subsequently specify the delimiter grammar for it?

Answer Source

I've figured it out. I've added the following code to the switch extension clause in the in lib.

when 'tex', 'cls'
  commentStart = ''
  commentEnd = ''
  # add '% ' to the beginning of each line
  art = art.replace /^/, "% "
  art = art.replace /\n/g, "\n% "

You can edit the code by going to Settings > Packages > Minimap Titles > View Code.

In the hindsight it's pretty trivial actually.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download