Search code examples
pycharm

How to add a custom highlighting rule in PyCharm


How does one add a custom highlighting rule in PyCharm? I mean, for example:

html = """
    <html>
        <body>
            In %s hour(s) it will be %s.
        </body>
    </html>
    """ % (offset, dt)

Pycharm does not highlight the %s part of the string, which the variable html holds. How does one add a rule such that the % in a string and the letter after it will be highlighted or shown in a different color? This feature is available in Sublime Text 2, so I hope it can be made possible with PyCharm 2.7.1 as well.

Your help is highly appreciated.


Solution

  • After much research, I've realised that this cannot be done.