Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Cursor positioning behavior

    Help wanted · · · – – – · · ·
    carets
    4
    7
    3452
    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.
    • appar1tion
      appar1tion last edited by

      Is it possible, through plugins or otherwise, to change the caret behavior so that it defaults to moving to the beginning of each line as up and down arrows are used to navigate through a document?

      The current behavior is that the caret remembers its horizontal positioning, and the only way that I know of to get it to quickly return to the beginning of the line is to use the ‘home’ key.
      Because of this, I find myself hitting ‘home’ constantly when using the up and down arrow keys to navigate around my documents.
      I would love the option to disable the caret’s ‘memory’.

      Claudia Frank 1 Reply Last reply Reply Quote 1
      • Claudia Frank
        Claudia Frank @appar1tion last edited by

        @appar1tion

        may sound strange but the easiest would be to record a macro,
        save it with a meaningful name and assign the down/up keys as shortcut.

        You should see that these shortcuts conflicts with existing ones.
        Use Shortcut Mapper and deassing the shortcuts for
        Scintilla commands->SCI_LINEDOWN and SCI_LINEUP.

        Cheers
        Claudia

        Scott Sumner 1 Reply Last reply Reply Quote 2
        • Scott Sumner
          Scott Sumner @Claudia Frank last edited by

          @Claudia-Frank , @appar1tion

          To add to Claudia’s idea, specifically recording two macros (one for moving up a line and one for moving down a line…with the addition to each of “home-ing” the caret) and remapping two existing key-combinations to these macros, I would be sure to do the SCI_HOMEDISPLAY command (default keycombo: Alt+Home) to move to the beginning of the line when recording the macro, NOT simply the Home key.

          The reason for this is that the Home key by itself isn’t definitive when whitespace begins a line–repeating Home key presses will bounce the caret between the absolute start of line and the first non-whitespace character of the line. Alt+Home always moves the caret to column 1.

          1 Reply Last reply Reply Quote 3
          • go2to
            go2to last edited by

            @appar1tion
            I am with you in this regard. I am really annoyed when I press Home and go to the beginning of the first word instead of the beginning of line. After all, it is the universal behavior of text editors and word processors. Except for Npp, that is.

            As for macros (a real weakness in Npp): users could implement Alt+Home to go the beginning of the first word instead of the beginning of line. That is unusual behavior and that’s what macros are for.

            1 Reply Last reply Reply Quote 0
            • go2to
              go2to last edited by

              Speaking of macros -
              I posted in another thread about QEdit, the best text editor of all time. Its macro capabilities are a model in all software. I can only wish Notepad++ would come just close to QEdit. Read:

              https://notepad-plus-plus.org/community/topic/14220/quick-question-if-someone-has-a-free-sec/6

              1 Reply Last reply Reply Quote 0
              • appar1tion
                appar1tion last edited by

                Thanks everyone. Setting up and down to alt+home worked!
                What’s funny is my muscle memory is so accustomed to the caret memory that it’s been tripping me up. Anyhow, it was super easy to macro the new behavior, and I’ll be trying it out to see which style I prefer. Thanks again.

                1 Reply Last reply Reply Quote 0
                • appar1tion
                  appar1tion last edited by

                  @go2to i don’t have need for ascii drawings. and as for macros, i fill out any additional macros that i need with autohotkey. the combination of np++ and ahk make my personal workflow a breeze.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright © 2014 NodeBB Forums | Contributors