Tabs always open on the right?



  • Gotta be in here already, please point me as I missed finding. (I did search…)

    Like ‘new tab always opens right’ in browsers, is there a way to make new tabs always open on the end to the right?

    I highlighted several files in Windows File Explorer (extension is already associated with NPP). Hit enter and NPP opens one file in a tab on the far right, and the rest open tabs on the far left.

    Using 7.8.9 64-bit.

    Thank you for help, kind regards.



  • @appyface ,

    Sorry, I could not reproduce your problem.

    If I have a running instance of Notepad++ and open one or more files from Windows Explorer by hitting ENTER or RClick > Open or RClick > Open with Notepad++, all those files open to the right of the active file.

    Do you have any plugins that might be changing the tab order? (? menu, Debug Info and pasting will give us your list of plugins)

    Do you have Settings > Preferences > General > Tab Bar: ☐ Multi-line enabled? Because if that’s on, if you have a lot of tabs, they will wrap around to a second (or more) row.

    Maybe I’ve misunderstood what you’re asking, but no matter what I do, I cannot get it to open a tab truly to the left of the active tab.

    (Also, I’m not sure why it’s critical that they open to the right.)



  • @PeterJones thank you for your assistance.

    If I have a running instance of Notepad++ and open one or more files from Windows Explorer by hitting ENTER or RClick > Open or RClick > Open with Notepad++, all those files open to the right of the active file.

    This happens for me whether Notepad++ is launched, or not. I’d like new tabs to always open to the far right regardless of active file tab, e.g. “on the end”.

    Do you have any plugins that might be changing the tab order? (? menu, Debug Info and pasting will give us your list of plugins)

    I don’t think so, but list is below.

    Do you have Settings > Preferences > General > Tab Bar: ☐ Multi-line enabled? Because if that’s on, if you have a lot of tabs, they will wrap around to a second (or more) row.

    No it is not enabled. I do have a lot of tabs but they are all on the same row.

    Maybe I’ve misunderstood what you’re asking, but no matter what I do, I cannot get it to open a tab truly to the left of the active tab.

    Mine are not opening to the left of the active tab. All but one file is opening to the extreme left, e.g. they are now the first tabs. Only one is opening to the extreme far right as I wish for.

    Debug Info:
    Notepad++ v7.8.9 (64-bit)
    Build time : Jul 15 2020 - 20:31:49
    Path : C:\program_files_NOINST\npp_x64\notepad++.exe
    Admin mode : ON
    Local Conf mode : ON
    OS Name : Windows 10 Enterprise (64-bit)
    OS Version : 1909
    OS Build : 18363.1016
    Current ANSI codepage : 1252
    Plugins : CodeAlignmentNpp.dll ComparePlugin.dll CsvQuery.dll ElasticTabstops.dll HTMLTag.dll mimeTools.dll NppConverter.dll NppExport.dll XMLTools.dll

    Some screenshots to help clarify…

    1. I’ve highlighted files in explorer.

    134ff3eb-946f-4698-b867-59b27b6c4011-image.png

    1. I hit ENTER. One file opens to extreme far right as I wish for:

    a7599606-8ed0-4723-80df-3da4f69fe1bb-image.png

    1. The remaining files open to extreme far left as the new first tabs:

    a0046272-271c-4bc8-8924-630e90103162-image.png

    Something I just thought about… ALL of my tabs are auto-restored by Notepad++ but have never been saved to any files, when I open these actual disk files from explorer. Because there is no active “file”, could that be the difference? Please try that and see if you can reproduce?

    Thank you. Kind regards.



  • @PeterJones said in Tabs always open on the right?:

    Sorry, I could not reproduce your problem.
    If I have a running instance of Notepad++ and open one or more files from Windows Explorer by hitting ENTER or RClick > Open or RClick > Open with Notepad++, all those files open to the right of the active file.

    I could not reproduce this problem either.

    However… Peter said (repeated for emphasis):

    …files open to the right of the active file

    For me, any files that I open into a running Notepad++ instance using Explorer shell running, I get them open as the far rightmost tabs.

    Maybe this is what Peter meant? And he just had the already-existing rightmost tab active when trying this experiment?



  • @appyface ,

    Sorry, I still cannot reproduce your problem. I closed all my normal files. I created 26 new files, each unsaved with at least one edit per “file”. I activated the first (far left) file “new 1”. I selected three files from Windows Explorer, and hit ENTER. They opened as entries #27-29 on the far right of the tabbar.

    by saying,

    I cannot get it to open a tab truly to the left of the active tab.

    I meant to say anywhere to the left of the active tab, not just immediately to the left of the active tab, so I was including the far left. They don’t open there. They open on the far right.

    I only said “to the right of the active tab” originally because my active tab happened to be the far-right tab, and I didn’t want to state knowledge I had not gained. Now I have gained the knowledge: I cannot get a new tab for one or more files opened from Windows Explorer to appear anywhere but the far right of my tabbar.

    Your plugin list doesn’t look like it would be affecting the way files are opened.

    Did you have one of those files opened earlier in Notepad++, and you had closed it and then later re-opened it when you do Explorer-ENTER? Because maybe it’s still remembering the file’s position from earlier in the current session. (it doesn’t happen that way for me: if I drag one of the tabs to the far left, then close that file, then open one or more of those files from Explorer-ENTER, they still open on the far right for me.)

    Sorry, I cannot reproduce your problem.



  • @PeterJones and @Alan-Kilborn

    Thank you for trying to reproduce.

    In case it matters, all the unsaved tabs I have open, have been there for months, being restored through re-launches and reboots.

    The disk files I’m opening from explorer in the above example have been opened before by Notepad++, but only one at a time through ‘file -> open’ menu.

    I have tested with many groups of files, some have been opened by Notepad++ previously, some never opened by Notepad++. Some with Notepad++ already open, some cause Notepad++ to launch as part of opening. The result is always the same.

    I was able to influence ‘open from explorer’ file group to all open to the far right by opening a single file first - any file. Once this first disk file is open, and on the far right, my explorer launch opens the group of files to the right of that first ‘starter’ file.

    So it sounds like something connected to having a bunch of tabs but no actual saved disk file open, since it seems to work as expected as soon as a saved disk file is in the mix.

    But why you can’t reproduce, I’m not sure… Maybe different settings? I have ‘remember current settings for next launch’ and ‘enable session snapshot and periodic back’ checked, backup every 7 seconds, and a file path for the backup.

    Thanks for your help, I will continue to try to narrow this down.



  • @appyface ,

    Sorry, I still cannot replicate. I took a brand new unzip of v7.8.9-64, ran it; it defaults to the options you specified:
    597806f2-52ac-4703-a83e-c4697c3eb893-image.png

    I created 4 new tabs, with edits in every one. I did the WindowsExplorer>ENTER on three files associated with Notepad++, and they opened on the extreme right, whether I had new 4 or new 1 selected. I closed those three disk files. I exited Notepad++ and ran again; it opened with the four edited-but-unsaved files with new 1 active. I did WindowsExplorer>ENTER on the three files, and they opened to the extreme right.

    Since the most-recently active Notepad++ hijacks any other instance, could you

    1. close all Notepad++,
    2. download portable/zip v7.8.9-64,
    3. unzip to someplace like a folder off your desktop,
    4. run that portable instance of Notepad++,
    5. create four empty but changed files
    6. exit with unsaved changes, with the left file active
    7. run that portable Notepad++
    8. verify that the unchanged files are still there
    9. use Windows Explorer > ENTER to open a set of files
    10. does it open to the right or put one or more of them to the far left

    If it works in the fresh portable but not in your normally-installed-c-program-files-noinst version, then it’s a setting difference – and you can compare all the settings between the fresh and your normally-run version, and see if you can narrow it down (that would be easier for you to do then for us). If the fresh portable behaves the same, it’s something about your Windows setup (or one of your plugins) that’s causing a difference – because our debug info shows up is virtually identical, down to Local Conf mode, OS Name, OS Version, OS Build, and ANSI codepage!

    Oh, wait, I do see a difference: you are running in Admin mode. I do not. Maybe try running non-Admin mode, and see if that gets rid of the problem.



  • @PeterJones

    I am not sure how NOT to run as administrator? I only have one user account with admin rights. I am launching the executable directly. I don’t see any settings in Notepad++ itself?

    I will try another portable installation and see what happens (the one I’m using is installed as portable). Maybe it won’t start out in admin mode and I’ll be able to try.

    Thank you for the ideas. Kind regards.



  • @appyface said in Tabs always open on the right?:

    I am not sure how NOT to run as administrator?

    If you read this post it explains how admin mode is created. In your case I suggest to check those settings, but turn them off.

    https://community.notepad-plus-plus.org/topic/16869/open-in-administrative-mode/3

    Terry



  • @Terry-R
    Administrator is not checked… this is on the executable, which I am launching directly as it is a portable install. Is there anyplace else I can check?

    3c45bbc9-2242-48e7-b7bf-cd4c90aa7af4-image.png



  • @appyface said in Tabs always open on the right?:

    Is there anyplace else I can check?

    Unfortunately I don’t know as I don’t operate in this mode. I just did a test to install a portable version (from @PeterJones link above). I am a local administrator, although there is some security checks on that and ran it, admin mode was off. Yet when I run it by right clicking and use “run as administrator” it’s on, obviously.

    I’m beginning to think if your account is wide open administrator (with uac turned off) you will always get the admin mode as ON. Do you know if you have disabled UAC (user access control)? Here is a link to show you how to check it.
    https://articulate.com/support/article/how-to-turn-user-account-control-on-or-off-in-windows-10

    Looks like for research is warranted. I unfortunately haven’t delved much into this side of Notepad++

    Terry



  • I did another test, this time on a different system which is NOT part of my work AD, so not loaded with additional security controls. The UAC on it was disabled and when I ran Notepad++ (NPP) it ran in Admin Mode. I then turned on UAC to lowest level, again NPP ran in Admin Mode. Upped the UAC level, same and lastly UAC at the highest level, still NPP ran in Admin mode.

    So it’s not a UAC function (at least not by itself) that allows or forbids Admin mode by just double clicking on the NPP executable.

    I will say however that everyone with a “personal” PC generally runs their system as a local administrator. This can be a dangerous way to operate as any malware running in the context of that account (especially if UAC is also turned down or OFF) will be able to easily do so.

    I explain this concept to users when they come to me with problems on their laptop. My suggestion is you should have a normal account for most work, and a administrator account for those times you need to install, remove or otherwise run apps that WON’T work under a normal account. The run as command often allows this to occur and it keeps a tighter control over any malware that wants to wreck havoc on your system.

    At work we call this “Least Privileged Use”. The Wikipedia article is:
    https://en.wikipedia.org/wiki/Principle_of_least_privilege

    Terry



  • @Terry-R , @appyface ,

    At home, I run a privileged account with UAC turned all the way down to Never Notify (so I’ve got full Admin power all the time), and when I run Notepad++ either as my installed copy or from a portable, it does not automatically Run As Administrator , so I’m not sure what’s different.

    Notepad++ v7.9   (64-bit)
    Build time : Sep 14 2020 - 23:02:17
    Path : C:\usr\local\apps\npp\npp.7.9.RC2.bin.x64\notepad++.exe
    Admin mode : OFF
    Local Conf mode : ON
    OS Name : Windows 10 Home (64-bit) 
    OS Version : 2004
    OS Build : 19041.508
    Current ANSI codepage : 1252
    Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
    


  • @PeterJones said in Tabs always open on the right?:

    it does not automatically Run As Administrator , so I’m not sure what’s different.

    This is starting to get complicated. And by now I’ve/we’ve managed to hijack this thread from “open to right”, to how does the admin mode function “automatically”, as opposed to via the “run as…” command (right click).

    As I do seem to have a system which operates most like the OP’s one, I will do some more testing on whether admin mode has a bearing on the “open to right” tab issue that started here. Don’t wait up, this might be a day or so answer.

    Terry



  • @appyface,

    While waiting for @Terry-R to be able to run more experiments:

    1. Definitely try a separate portable in a different location (like your desktop), and see if it still always runs as administrator.
    2. I found this SU question; it has the opposite desire, but a couple of the answers gave interesting things to look at, for things you could undo to get out of the run-as-admin:
      1. this answser shows HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System:EnableLUA=0 will disable LUA and make all apps run as administrator; if yours is set 0, try setting it 1 instead
      2. this answer shows a section of the registry where you can set individual executables to always run as admin, regardless of the properties/shortcut flags. So if you find an entry for notepad++.exe, then remove it.


  • @appyface ,

    And another SU answer that might come in handy – right click on the executable, “Troubleshoot compatibility”, “Troubleshoot”, then turn off all the checkboxes, then “no, I’m done” on the next screen. See if that fixes the problem for you.

    Also, in the RClick > Properties > Compatibility, you might try “change settings for all users”, and see if the run-as-admin is set for all users, rather than just for you.



  • As long as we’re going all directions in my thread (and I don’t mind! great discussion), does anyone know why I’m not receiving emails when you post? I have turned everything on to Notification & Email but still I do not receive any emails. I do not have spam or other filters on this email account. I am watching this topic…

    7ec0c965-509f-4157-b905-50753cc4fc91-image.png



  • With regard to the latest replies, I may not be able to get to all your suggestions until later in the weekend. Will reply back then.



  • @appyface said in Tabs always open on the right?:

    does anyone know why I’m not receiving emails when you post

    Because that feature of the forum is not enabled, despite it being listed in the options.



  • @PeterJones said in Tabs always open on the right?:

    While waiting for @Terry-R to be able to run more experiments:

    Well I’ve have completed my experiments. Whilst not exhaustive in themselves, I’m exhausted in creating 26 tabs each with different and unsaved changes and using the backup plan so unsaved files in themselves. I confirmed that the account I was running had the Admin Mode “ON”. That was further backed up by the titlebar showing [Administrator].
    When I right click on either a single file or several (of type txt and xml) and use the “Edit with Notepad++” option they always appear to the right of any existing tabs. And this is regardless of which tab was the currently viewed one in Notepad++.

    At this point I can safely say that my tests (and results) emulate those of @PeterJones even though I had Admin Mode on “automatically”, not thru having to say “run as…” or changing the shortcut to the compatibility settings with “run this program as administrator” ticked.

    So whatever is causing the new files on loading to appear elsewhere in the “tabbed” list is possibly rather unique or a possible malfunction in the operating system or Notepad++.

    Another possible test to be carried out by the OP is to use “Ctrl+Numpad 1” which is the default hotkey for the first tab in Notepad++ after they do the test as stated in the first post. The issue raised there was that one of the multiple files opens to the "right, the remainder open on the left. So once these multiple files are loaded, and then the hotkey used, does it actually go to one of the new files?

    I’m sort of wondering if the view of the tabs is somewhat skewed, rather than the actual order as Notepad++ sees them. Thus Ctrl+Numpad 1 would STILL go to the original 1st tab (often called New 1).

    As a side note, I had a need to install a fresh Windows 10 system, no AD influence or any changes made. The account I created was “Terry” which is a privileged account (administrator group). I then activated the actual administrator account with a password. My “Terry” account ran Notepad++ NOT in Admin Mode (so it shows OFF), yet when logged in as the actual administrator account I performed the same run and this time Notepad++ had admin Mode as ON!. So just logged in as an administrator level account is (on a fresh system) not enough to run Notepad++ in Admin Mode (ON), again that backs another finding by @PeterJones.

    Sorry I couldn’t find anything that helps, all this did was show that it (appears to) NOT happen. Tabs should always open to the right!

    Terry


Log in to reply