Community
    • Login

    Next/Previous Tab shortcut without cycling

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 346 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.
    • fallenrelicsF
      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
        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
          fallenrelics @Alan Kilborn
          last edited by fallenrelics

          @alan-kilborn excellent…thank you.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors