15

I need Notepad++ running in multiple instance mode without "-multiInst" parameter. I can't use .lnk shortcuts, I can't use cmd.exe /c notepad++.exe -multiInst, is there another way?

SchurigH
  • 369
  • 2
  • 4
  • 12

9 Answers9

20

The only way I can think of doing this would be using a wrapper. Create a file called "np++.bat" with the following content:

"C:\Program Files\Notepad++\Notepad++" -multiInst %1

Put it somewhere in your PATH. You can then invoke it as:

np++.bat file.txt
qbert220
  • 11,220
  • 4
  • 31
  • 31
  • He says he can't use `-multiInst`. – BoltClock Feb 17 '11 at 11:35
  • It worked! It seems that I can use -multiInst with this workaround, I didn't know that... sorry BoltClock; would you have suggested the same? – SchurigH Feb 17 '11 at 13:33
  • 1
    @SchurigH: Actually, I would have, so I'll upvote this answer. Anyway, did you look at my edited answer? You can emulate Notepad mode by adding the `asNotepad.xml` file, without the need for a batch file. – BoltClock Feb 17 '11 at 14:00
12

If you need MDI-mode Notepad++, there is no way to force it to start in multi-instance mode without the -multiInst parameter.

If you can work with SDI-mode Notepad++ (like Notepad), it'll default to multi-instance mode just like the default Notepad on Windows: one window per file. To trigger SDI mode, place an empty file called asNotepad.xml in %ProgramFiles%\Notepad++. Be sure to back up your %AppData%\Notepad++ folder before starting Notepad++ again.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
  • Okay, thanks. Short question: Which is the best multiple instance editor in your opinion? I need an alternative editor now... :-/ – SchurigH Feb 17 '11 at 11:26
  • @SchurigH: Do you need your editor to have each file in its own instance like Notepad? – BoltClock Feb 17 '11 at 11:29
  • Yes, multiple instances for each file, like notepad. I searched for a few more editors and I picked out Notepad 2, phase 5 HTML Editor. But I havn't tested them yet. – SchurigH Feb 17 '11 at 12:22
  • I will test this .xml trick too, thank you. The advantage of batching SDI over .xml is that I can use Notepad++ MDI for my daily work as usual and Notepad in SDI just for Zope developing. – SchurigH Feb 19 '11 at 10:14
  • Quite a bite late, but this is a fantastic answer! It works flawlessly, and does exactly what is asked in the question! – SNag Jan 09 '13 at 18:45
11

You can also manually create another instance by going to Run > Open in another instance.

Pang
  • 9,564
  • 146
  • 81
  • 122
Ian Dunn
  • 3,541
  • 6
  • 26
  • 44
7

Actually there is a way to do it without the -multiInst parameter:

create a totally empty file called 'asNotepad.xml' and put it in the Notepad++ directory at the same level as the notepad++.exe file

https://superuser.com/questions/202399/how-to-make-notepad-open-each-file-in-new-window

Community
  • 1
  • 1
lbalazscs
  • 17,474
  • 7
  • 42
  • 50
  • 1
    Thanks, it works well but I see 2 disadvantages here: - it seems that Notepad++ opens with just a new document instead of holding the last opened files (which .exe -multiInst does) and - with the batch script I can choose whether to open/switch to the "normal" instance of Notepad++ (original .exe) or to open a new instance (.bat script). But it depends on the situation whether these points are relevant or not. – SchurigH Nov 26 '12 at 16:45
5
  • Settings > Preferences... > Multi-instance
  • Click "Always in multi-instance mode"
  • Click Close
  • Close all Notepad++ programs

It did not work the first two times I tried it. Maybe Notepad++ takes a while to fully exit.

David
  • 61
  • 1
  • 3
  • I am curios why this was down voted. My assumption is that "Always in multi-instance mode" will always open in multiple instance mode and even if opened from command line, this setting will still be valid. Anybody care to explain? – sgowd Jul 22 '15 at 22:54
  • At least in April 2017 this works immediately, so imho this is by far the best answer. – Olaf Apr 27 '17 at 07:37
  • Agreed, now we're october 2017 and this is the best option for me, especially when using in a multi-virtual desktop environment using Windows 10. If this is not set to the proper value, it would switch virtual desktop to where the window of notepad++ was currently located, making it very confusing for me. – klaar Oct 04 '17 at 12:55
1

Hoi, in a n++.bat file, in your path just enter: (for the x86 version )

start "N++ Multi Instance" /D"C:\Program Files (x86)\Notepad++\" Notepad++ -multiInst %1

Then pull the link to that bat file via right mouse click and drag and drop it to your desktop.

Just click on the link/icon and your n++ starts with every click!

Nicolas78
  • 5,124
  • 1
  • 23
  • 41
isinfo
  • 11
  • 1
0

recently I got same problem.

As I think the easiest way is to write simple .bat file something like this:

...

SET var1="C:\Users\churaev.s\Desktop\a01_strt.bat"
SET var2="C:\Users\churaev.s\Desktop\b02_code.mat"

SET var3="C:\Users\churaev.s\Desktop\c03_data.txt"

...

START "" "C:\Program Files (x86)\Notepad++\notepad++.exe" %var1%

START "" "C:\Program Files (x86)\Notepad++\notepad++.exe" %var2%

START "" "C:\Program Files (x86)\Notepad++\notepad++.exe" %var3%

...
Kampai
  • 22,848
  • 21
  • 95
  • 95
0

I had a similar problem with Notepad++ not remembering that I had chosen not the "Remember Current Session". I tried hacking the config file, but that didn't work. Then I found out that there is a secret config file in your C:\Users\myuseraccount\AppData\Roaming\Notepad++ directory (Windows 7 x64). Mine was empty, meaning who know where the config was really coming from, but I copied over the file with the one in C:\Program Files (x86)\Notepad++ and now everything works just like you would expect it to.

Don Rolling
  • 2,301
  • 4
  • 30
  • 27
-1

The easiest way is to right-click a tab and "open in new window"... voilà!

Kalzem
  • 7,320
  • 6
  • 54
  • 79