• Login
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.
  • P
    PiotrMP006
    last edited by Feb 1, 2024, 7:26 AM

    Hi

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

    A 1 Reply Last reply Feb 1, 2024, 12:30 PM Reply Quote 0
    • A
      Alan Kilborn @PiotrMP006
      last edited by Alan Kilborn Feb 1, 2024, 12:31 PM Feb 1, 2024, 12:30 PM

      @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
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors