Community
    • Login

    How do you open a new tab next to the current?

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 272 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.
    • PiotrMP006P
      PiotrMP006
      last edited by

      Hi

      How do you open a new tab next to the current?

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

        @PiotrMP006

        I don’t believe it can be done by Notepad++ itself.

        If by “next to” you mean “to the right of”, then the following PythonScript script can do it:

        # -*- coding: utf-8 -*-
        
        from Npp import *
        
        curr_view = notepad.getCurrentView()
        total_tabs_in_view = 0
        for (pathname, buffer_id, index, view) in notepad.getFiles():
            if view == curr_view: total_tabs_in_view += 1
        curr_tab_index = notepad.getCurrentDocIndex(curr_view)
        notepad.new()
        for __ in range(total_tabs_in_view - curr_tab_index - 1):
            notepad.menuCommand(MENUCOMMAND.VIEW_TAB_MOVEBACKWARD)
        
        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors