• Login
Community
  • Login

Next/Previous Tab shortcut without cycling

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 367 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.
  • F
    fallenrelics
    last edited by Apr 21, 2022, 2:41 AM

    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}.

    A 1 Reply Last reply Apr 21, 2022, 12:51 PM Reply Quote 0
    • A
      Alan Kilborn @fallenrelics
      last edited by Apr 21, 2022, 12:51 PM

      @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)
      
      F 1 Reply Last reply Apr 21, 2022, 5:18 PM Reply Quote 3
      • F
        fallenrelics @Alan Kilborn
        last edited by fallenrelics Apr 21, 2022, 5:20 PM Apr 21, 2022, 5:18 PM

        @alan-kilborn excellent…thank you.

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