Community
    • Login

    Next/Previous Tab shortcut without cycling

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 667 Views 1 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.
    • fallenrelicsF Offline
      fallenrelics
      last edited by

      The current behavior of ctrl+page down cycles the tabs. For instance if I have 3 tabs {A B C} pressing ctrl+page down will do {A B C, A B C, A B C …}. I’d like to be able to go to the next tab put stop at the last tab {A B C}.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @fallenrelics
        last edited by

        @fallenrelics

        It is not possible to do what you want with Notepad++ itself; however, with scripting it can be done. Something like this snippet logic would do it:

        curr_view = notepad.getCurrentView()
        curr_index = notepad.getCurrentDocIndex(curr_view)
        max_index = -1
        for (pathname, buffer_id, index, view) in notepad.getFiles():
            if view == curr_view:
                if index > max_index:
                    max_index = index
        if curr_index < max_index:
            notepad.menuCommand(MENUCOMMAND.VIEW_TAB_NEXT)
        
        fallenrelicsF 1 Reply Last reply Reply Quote 3
        • fallenrelicsF Offline
          fallenrelics @Alan Kilborn
          last edited by fallenrelics

          @alan-kilborn excellent…thank you.

          1 Reply Last reply Reply Quote 1

          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