Community
    • Login

    Comment left align

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 487 Views 2 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors