Pin files



  • Hi, I think notepad++ must have the option to pin files that each person uses frequently.

    So we don’t need to be searching the same file after open many others.

    TIA.



  • Notepad++ has sessions.
    I guess that most people either use “remember current session” or don’t use sessions at all but you are free to define a manual session with the files you want “pinned” and just load it on start.

    Just for the sport, if you want a new feature take the time to provide a full definition.
    What does “pinning” mean?
    What should happen when you close pinned file?
    What should happen when you reopen a file that was previously pinned?
    What should happen on restart? For pinned files? For unpinned files?
    What should happen when pinned file is removed from disk? Changed on disk?
    What should be the visual hint for pinning? Does tab ordering change due to pinning?



  • There are many examples of pinning files, at least for Windows programs. I am using the “Classic Shell” with Windows 10 and I am not sure how much of that is the same for others but for me I just right-click a program in the Start Menu and select “Pin to Start Menu”. From that moment on, the program is at the top of the Start Menu. Also, for the Taskbar, I just right-click and choose “Pin to Taskbar” and from that moment on the program always exists in the Taskbar, even before it is executed.

    As for “What should happen when you close pinned file” and “What should happen when you reopen a file that was previously pinned” , nothing; nothing differently at least. A pinned file would always exist in the most recently used list.

    As for “What should happen on restart? For pinned files? For unpinned files” I don’t understand the questions.

    As for “What should happen when pinned file is removed from disk? Changed on disk?”, some programs just say they can’t find the file. A better solution is to ask if the file should be removed from the list. That can be done for all files in the recently used list, not just pinned ones.

    In my opinion, Notepad++ can really benefit from an ability to open files that we specify we want to always have available. The option to pin files to the MRU list would be a good option but I think there are better ways that I will describe elsewhere. If I figure out how to write plugins (I have been programming for nearly half a century) then I might write something.

    But really, I think there are plenty of examples of what pinning is.



  • @SamuelCalifornia Totally agree, and it was brought up on this thread: https://notepad-plus-plus.org/community/topic/23/pinning-locking-a-tab, which also gives some good implementation guidelines / use-cases.



  • @SamuelCalifornia IMO pinned files should differ from other files on as far as tab bar behaviour goes:

    • They are grouped on the left or right end of the tab bar.
    • They stay opened between session.
    • They can be closed only by right clicking and selecting close and there should always be a confirmation pop-up.
    • They can be rearranged within the pinned files group, but they cannot be dragged out of it and mixed with regular files.
    • They are not affected by the different Close all actions.

    Other than that, they should be handled as any other file.



  • Hello, @AlesAlitis and All,

    Ah yes, interesting idea, with these additional hypotheses !

    So, I advice you to make a feature request, using the method described here


    In short, If I understand you properly, this would create two file groups :

    • A 1st group, including the classical files :

      • With tabs located outside of the pinned files area.

      • And for which all the allowed options would apply

    • A 2nd group, including the pinned files :

      • Always displayed, even if no session is remembered, at the very beginning or at the very end of the list of tabs, displayed in a single or multi-lines area

      • And which can only be closed after selecting the Close option and express confirmation !


    Remainder :

    In order to move to the first / last tab of your list of tabs, especially when it’s displayed as a single line, use these two steps :

    • Move the mouse’s pointer over the tab’s area

    • Hit the Ctrl and Shift keys and moves up/down the Middle mouse Wheel

    Best Regards,

    guy038



  • @guy038 said in Pin files:

    Hit the Ctrl and Shift keys and moves up/down the Middle mouse Wheel

    As I didn’t know this (surprise!), I did some further experimentation to find (some of this I knew, some not):

    • While pointing at tab bar (active tab doesn’t matter), hold Ctrl+Shift, scroll mouse wheel: activates first tab (if scroll wheel up) or last tab (if scroll wheel down) – this one is exactly @guy038’s above, just restating it as part of this list

    • Considering the active tab, while pointing at tab bar, hold Ctrl, scroll mouse wheel: activates tab to the left of the currently-active tab (if scroll wheel up) or activates tab to the right of the currently-active tab (if scroll wheel down)

    • Considering the active tab, while pointing at tab bar, hold Shift, scroll mouse wheel: moves the activate tab one position to its current left (if scroll wheel up) or moves the activate tab one position to its current right (if scroll wheel down)

    Note that adding the Alt key to the mix does nothing; it is if it is not held during the operation.

    Note that only the last bullet point action changes the tab ordering; there others are just tab navigation.

    This is probably in the user manual, but it’s probably ok to reiterate it here as a refresher.

    (And, biggest point, I hope what I’ve said is accurate!)


Log in to reply