Windows – Notepad++ one instance per each virtual desktop

notepadvirtual-desktopwindows 10

I have problem with opening .txt file on windows-10. Notepad++ is default program to open .txt files, but when there is notepad++ application already running in other virtual desktop OS will automatically switch me to that other application instance and open file in other desktop. I want to open new instance of notepad++ in my current desktop. Is there a way to accomplish that?

[EDIT]
Multi-Instance is one suggested solution, but this is bad in way that you loose tab functionality. I don't want my taskbar clogged with n++ processes.

One n++ for all desktops – this is killing the purpose of using multiple desktops in first place – keep different work processes and task separated.

Best Answer

Here is the hack that may work for you.

Requirements:

  1. Two Portable Notepad++ in two separate folders. (It may work with one NPP installation, but two separate Notepad++ seem to be cleaner approach. You may also not need Portable Notepad++, but it may be easier that way.)
  2. Two or more virtual desktops

How does it work: (I have animated GIF at the end to demonstrate this steps).

  1. Open Notepad++ folder on the first Virtual Desktop.
  2. Right click on Notepad++.exe to create a shortcut.
  3. Right click on the newly created shortcut and go to its properties.
  4. Add -multiInst in the target section. (The text is case-sensitive, and there is a space at the beginning.)
  5. Click OK to close the properties.
  6. Double click on the shortcut.
  7. It should open the new instance of Notepad++ in that virtual desktop.
  8. Now switch to another Virtual Desktop. Open its own Notepad++ folder. And follow steps 2-7.
  9. To keep things organized, I kept two folders, VM1 and VM2 with the notepad++ folders in them. (VM being Virtual Machine)

Some Final Notes:

  • This would work as long as the Notepad++ window in a virtual machine was Active, i.e. you had touched it at least once.
  • This is because when you open text file (or your source code files), it opens in the Last Active instance of Notepad++.
  • I am assuming that you are not changing your virtual desktops very frequently, since that would nullify the actual purpose of virtual desktops.

Here is the animated GIF.

  • You can right click on GIF and open it in new tab to see the steps clearly.
  • GIF shows steps on one virtual desktop, you need to replicate it on the other too.

    enter image description here

I hope it is helpful. Thanks.