Switch to already open file instead of opening a new instance???
-
This has been bugging me for quite some time now. I have np++ open a new instance for each file. The problem is sometimes I forget that a file is already open and go ahead and open it again and np++ opens a new instance of the file. I go ahead and make some modifications in that instance and I already made modifications in the first instance as well. So, now I have two instances of the same file with different modifications and it’s a problem!
So, if I try to open the file which is already open in np++, can it just switch the focus to the already open instance of that file instead of opening a completely new instance???
-
I have np++ open a new instance for each file
I can’t speak to your problem, but I can ask (hopefully non-offensive) questions about your workflow.
Notepad++ provides an (arguably) nice multi-tabbed user interface…why would you “…have np++ open a new instance for each file”? I mean, is there a real reason for one-N++ -instance-per-file, or is it just the way you’ve gotten used to working? Maybe those here can “point you to a better way” if you are accepting of that…with a complete understanding of why you are doing what you currently are…
-
I’d say the main reason for this is because I find it quicker to switch between different files from within windows (usually using alt+tab) rather than go to the np++ window first and from there naviate to the file I need.
Also I find it convenient to have different files open side by side so I could easily copy stuff from one file to another.
And lastly, it’s a habit, it’s how I’ve always used it and never really tried otherwise, though maybe I should have, but just didn’t feel the need to.
Regardless, I’d think there should be an option to switch to the instance of the file if it is already open. If not, I don’t understand why not???
But I am always open to trying things differently if it’s a better way.
-
…quicker to switch between different files from within windows (usually using alt+tab) rather than go to the np++ window first and from there navigate to the file I need.
This one seems to be “six of one, half-a-dozen of the other”…I tried it and I don’t think it is faster your way, but YMMV.
…convenient to have different files open side by side so I could easily copy stuff…
Have you tried the secondary view within Notepad++? Right-click a tab and choose Move to Other View. Very easy to work between 2 files or, when “cloning”, 2 sections of the same file. Your way is probably better if you are copy-pasting between 3+ files at the same time
…it’s a habit…
Yea, probably the hardest to overcome and thus maybe your best argument! :-) I’ve been there myself.
I’d think there should be an option to switch to the instance of the file if it is already open
I don’t know of one but I don’t know it all, maybe someone else has some ideas…? So if there isn’t a way then it would mean a feature request, and change seems to come hard to Notepad++…just warning you that you may never see your feature implemented. It is definitely much more likely to alter your own workflow. I don’t mean to be a Debbie-Downer, but good luck with your feature request.
There are some downsides to multiple-instances. Say you make a change to Notepad++'s configuration preferences in one of your open instances. Maybe you discover the visible line endings feature (you accidentally turn it on in one of your instances) and you decide it is the best feature ever. Then you quit all of your Notepad++ instances for the day, and tomorrow you fire up N++, only to find that “Hey, the damn thing didn’t remember that I wanted visible line-endings…Grrrrr!” Well, in what order did the N++ instances close the previous day?..this will impact which settings get remembered… And maybe this isn’t the biggest “problem” with multiple instances…
-
It is definitely much more likely to alter your own workflow.
Yeah, that’s how it usually is.
Anyway, I’ll take your suggestion and give it a try in a single-instance mode, maybe it is a better way and I just never gave it a shot. Just tried the “Move to Other View” with a tab and it’s not bad actually, so check-mark there.
I still might post a feature request as I think it’s an oversight and should be implemented, though highly unlikely as you said, but who knows.
-
Hello, @alx-fs and All,
Assuming that, in
Settings > Preferences... > MISC.
dialog, the optionsEnable
andEnable MRU behaviour
, of the Document Switcher(Ctrl+TAB) part, are set, then, if several tabs exist in a single instance of Notepad++, you can switch between the last two accessed tabs, with theCtrl + Tab
shortcut, … in a similar way you would useAlt + Tab
to switch between two instances of N++ !Best Regards,
guy038