Sublime Forum

Package for decorating RST headings?

#1

Hi. I just started using Sublime for editing ReStructured Text (RST) documentation.

Decorating headings with lines of asterisks and other characters is tedious. It seems like the type of repetitive task that someone would have automated.

Is there a package that will decorate a line of text as an RST heading? It would be great to be able to promote or demote a heading with a key combination.

For example:

############
Demote Me
############


Demoted


Thanks!

Peter

0 Likes

#2

Create a snippet like this:

<snippet> <content><![CDATA[${1/./#/g}## ${1:Comment} ${1/./#/g}##]]></content> <tabTrigger>heading</tabTrigger> <scope></scope> </snippet>

Obviously, you can change # to any character you’d want. Please note this part: ${1/./#/g}## last two hashes are manually added and represent the extra chars you may need, the magic happens between curly brackets.

0 Likes

#3

Just type rst in the search box and there may be some plugins about rst.
https://packagecontrol.io/packages/Restructured%20Text%20(RST)%20Snippets

0 Likes