Community
    • Login

    Cursor positioning behavior

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    carets
    7 Posts 4 Posters 4.7k 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.
    • appar1tionA
      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 FrankC 1 Reply Last reply Reply Quote 1
      • Claudia FrankC
        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 SumnerS 1 Reply Last reply Reply Quote 2
        • Scott SumnerS
          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
          • go2toG
            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
            • go2toG
              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
              • appar1tionA
                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
                • appar1tionA
                  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
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors