Comment colour in pydev

JohnXB
2006-07-19
2013-03-15
  • JohnXB

    JohnXB - 2006-07-19

    Newbie question - How can I change the colour used to display comments in python scripts in eclipse(3.1.2 python 2.4)?

    Thanks

    John

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2006-07-19

      In the preferences:

      window > preferences > pydev

      On earlier versions of pydev, that preferences page was kind of big, so, you might have to stretch it depending on the resolution you're using (on the latest versions this was changed).

      Cheers,

      Fabio

       
      • anthony shah

        anthony shah - 2008-05-27

        Why don't multi-line comments conform to the same syntax highlighting preferences as the single-line comments, instead of the string coloring.

        My comments preference is grey, and string is green.  So shouldn't multi-line comments (""" .... """) be grey also, not green like strings ?

        Is this an overlooked bug or do people want their multi-line comments to look like strings, not comments ?

         
        • Fabio Zadrozny

          Fabio Zadrozny - 2008-05-27

          If you use ''' ''' in python, that's a string in the same way that ' ' (so, you can assign it to a var, etc). In functions / classes, the first string is considered a docstring and is assigned to the function / class (but it could be a string with ' ' also, and doesn't necessarily  need a ''' ''').

          So, ''' ''' is actually a string and # is the only comment that python has (there are no multi-line comments in python).

          Cheers,

          Fabio

           
    • drmaples

      drmaples - 2006-07-19

      Window > Preferences.
      click on Pydev
      in the "Appearance color options:" change comments to whatever color you want.

       
    • JohnXB

      JohnXB - 2006-07-19

      Thanks, Fabio, Darrell!
      I had looked there already but I was expanding the '+' so never saw the top level. Doh...
      John

       
  • martin

    martin - 2011-02-23

    Hi Fabio,

    can we have different colors for # comments and ## comments?
    So we could have real comments in maybe green an "outcommented" lines in maybe light grey.

    That would be great!

    Thank you for your work,
    Martin

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-02-23

    Please enter a feature request for that.

    Cheers,

    Fabio

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks