Menu

Python docstring support

2009-06-15
2012-11-13
  • Mats Tjader

    Mats Tjader - 2009-06-15

    Hi,
    I'm using Python for occasional development (mainly test scripts etc) and I like the lightweightness of Notepad++. My problem is that my boss wants me to do proper documentation, and Notepad++ doesn't support highlighting of docstrings.

    Is there a way of adding support myself (except defining my own user-defined Python) or is this something you can easily add for the next version of Notepad++?

     
    • Jocelyn Legault

      Jocelyn Legault - 2009-06-15

      It isn't?
      I thought the doc strings where the ones surrounded by triple quotes. Isn't it the case?
      If so, you are in luck, cause it's supported! :-)

      Go to Menu Settings | Styler Configurator... | Python

      You'll see that you can set a diffrerent style for TRIPLE and TRIPLEDOUBLE. These are the styles for strings surrounded by ''' and """ respectively.

      Hope it helps.

      joce.

       
      • Jan-Philip Gehrcke

        Oh, thanks a lot for making this clear. I ran into the same trouble as mattj452 and found this thread by googling for "notepad++ python docstring".

        Perhaps you should give Python's "TRIPLEDOUBLE" another color than black by default ;)

        > In hindsight, I can see that the left border is yellow and it's possible
        > to compress the docstring

        The left border is independent of the docstrings :-) It marks "last edits" (am I right?). But how did you manage to compress the docstrings? I dont see it...

        Best regards,

        Jan-Philip Gehrcke

         
    • Mats Tjader

      Mats Tjader - 2009-06-16

      Thank you Joce!

      The reason I didn't believe it was supported was because the default coloring scheme was the same as any other text, so it wasn't highlighted.
      In hindsight, I can see that the left border is yellow and it's possible to compress the docstring.

       
MongoDB Logo MongoDB