• Login
Community
  • Login

How to make comments in code stand out

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
commentsformat textediting python
2 Posts 2 Posters 729 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Cyndi Roether
    last edited by Sep 21, 2021, 8:01 PM

    Hi -

    I am new to Notepad++ and am using it to edit scripts in Python, which I am also new to.

    I know I can place comments pretty much anywhere bracketed by ##'s

    Is there a way to make them a different color so that they stand out from the code?

    Thank You,
    Cyndi

    A 1 Reply Last reply Sep 21, 2021, 8:12 PM Reply Quote 0
    • A
      Alan Kilborn @Cyndi Roether
      last edited by Alan Kilborn Sep 21, 2021, 8:13 PM Sep 21, 2021, 8:12 PM

      @Cyndi-Roether

      The key is to make your file a Python file and then things (comments included) will “stand out”, example:

      e0a23532-387e-46ae-b5fa-64cd45bf26b3-image.png

      See where it says “Python file” on the status bar?

      You can make this appear by saving your file with a name that ends in .py, or by choosing “Python” on the Language menu.

      Also, a Python comment involves no “bracketing”. A # appearing on a line will cause anything following that character (and still on that same line) to be a comment.

      1 Reply Last reply Reply Quote 2
      1 out of 2
      • First post
        1/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors