Community
    • Login

    Comment left align

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 304 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.
    • Jürgen NießenJ
      Jürgen Nießen
      last edited by

      Is there a setting , so that the comment is like

            code 
      //    code
      

      instead of

             code
             // code
      

      ?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Jürgen Nießen
        last edited by PeterJones

        @Jürgen-Nießen ,

        Sorry, auto-indent keeps comments at the same level of indentation as the code block the comment is a part of (because the auto-indentation is a feature coded at the editor level, whereas the marking of “comment” is coded at the lexer/syntax-highlighter level).

        That said, alternatives include:

        • running code through an external “pretty print” utility – @Michael-Vincent gives examples of how to do that in an old post <edit>: in this old post (which was linked from the other; sorry.)</edit>
        • using one of the scripting plugins (like PythonScript) to set up a hook to watch what you type, and if you type the comment indicator on a line that has only whitespace before that indicator, the script could un-indent for you. Similar things have been done recently, and if you need help, we could dig up links to those previous discussions, and/or someone might be willing to hack up a script engineer a solution for you, if it catches their fancy
        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors