Issue with Open in another Instance
-
Hi,
Just a small grip with otherwise an excellent product… If you have text Highlighted, and you select “Open in a another Instance” Notepad++ assumes you have highlighted filenames… and if you have made the mistake of highlighting 100 lines of text for each line it will come up with the message “… \some text doesn’t exist. Create it?”
for every line.The only way is then to go to task manager and kill Notepad++.
Can I suggest a prompt if text is highlighted… “x lines have been highlighted do you wish to Open or Create files in the New Instance?”
Something like that would be great as I always create separate instances.
Great editor by the way I love it.
Keep up the good work.Regards.
-
@Brayner-Chomsky-Luther-Firth-Zinn
looks like you have an outdated version, could this be?
If I use the context menu from the open document I only have open file
and even if more lines are selected it only tries it once.If I use the context menu from the tab, only move to other view and clone to other view are enabled.
Cheers
Claudia -
I am using version 7.3.3 (32 bit)
What I mean is, Highlight Some text and then go to the Run Menu
and select “Open in another Instance”And then you will see what I mean.
Or simply add a Yes, No, Cancel option. If Cancel is selected it stops trying create/open files and simple opens up the New Instance which is what I want.
:-)Regards,
Brayner
-
@Brayner-Chomsky-Luther-Firth-Zinn
Hello Brayner,
you stated
Something like that would be great as I always create separate instances.
does this mean you do not need the open that file in a new instance at all?
If so, you can configure it yourself. All these Run commands are stored in
shortcuts.xml file.
If you open it you will see something similar to this<UserDefinedCommands> <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> <Command name="Get php help" Ctrl="no" Alt="yes" Shift="no" Key="112">http://www.php.net/$(CURRENT_WORD)</Command> <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command> <Command name="Open file in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command> </UserDefinedCommands>
Similar, because I have already deleted some that I don’t use.
As you see, the “Open file in another instance” uses two variable parameters$(NPP_FULL_FILE_PATH)
and
$(CURRENT_WORD)$(NPP_FULL_FILE_PATH) will be replaced with the real path notepad++ was started from and $(CURRENT_WORD) with the current selected word.
What you can do is to delete this parameter then it will just open another npp instance.
Or you create an additional entry which only has the first variable parameter.
Something like<Command name=“Open another instance” Ctrl=“no” Alt=“yes” Shift=“no” Key=“117”>$(NPP_FULL_FILE_PATH) -nosession -multiInst</Command>
Afterwards use shortcut mapper to assign an unique shortcut.
Cheers
Claudia -
Wow thanks, I never knew it was that easy!
You’re a star… I have put up with killing Notepad++ process for years.I will edit the xml file as suggested.
Thanks for your Help
Regards,
Brayner
-
umm … I have just done what you said…
I have amended the line it now reads this:
<Command name="New Open in another instance 2" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_DIRECTORY)\notepad++.exe -nosession -multiInst</Command>
and two minor things
-
The menu Text when I start NPP still still says New Open in another instance and not *New Open in another instance 2 * (just an observation)
-
I still get the popup when starting the New Instance… but this time the Message box contains all the text I have highlighted as one string… So even if I have highlighted 20 lines I get one message bot not 20… a big improvement, I am grateful
Just curious as even though I have removed $(CURRENT_WORD) it is still passing an additional command line argument to notepad++.exe
Strange but true.
I am still in a happy place.
Regards,
Brayner
-
-
@Brayner-Chomsky-Luther-Firth-Zinn
could you post the debug-info? Can be found under ? menu.
Maybe you edited the wrong file? Or another unix/windows difference??Cheers
Claudia -
Here You are:
Notepad++ v7.3.3 (32-bit)
Build time : Mar 8 2017 - 03:37:37
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NppFTP.dll PluginManager.dll SpellChecker.dllps I am a developer and I edited the file in C:\Program Files (x86)\Notepad++\shortcuts.xml
and Since I made the change it has made a difference just with that side effect :-)<NotepadPlus>
<InternalCommands />
<Macros>
<Macro name=“Trim Trailing and save” Ctrl=“no” Alt=“yes” Shift=“yes” Key=“83”>
<Action type=“2” message=“0” wParam=“42024” lParam=“0” sParam=“” />
<Action type=“2” message=“0” wParam=“41006” lParam=“0” sParam=“” />
</Macro>
</Macros>
<UserDefinedCommands>
<Command name=“Launch in Firefox” Ctrl=“yes” Alt=“yes” Shift=“yes” Key=“88”>firefox “$(FULL_CURRENT_PATH)”</Command>
<Command name=“Launch in IE” Ctrl=“yes” Alt=“yes” Shift=“yes” Key=“73”>iexplore “$(FULL_CURRENT_PATH)”</Command>
<Command name=“Launch in Chrome” Ctrl=“yes” Alt=“yes” Shift=“yes” Key=“82”>chrome “$(FULL_CURRENT_PATH)”</Command>
<Command name=“Launch in Safari” Ctrl=“yes” Alt=“yes” Shift=“yes” Key=“70”>safari “$(FULL_CURRENT_PATH)”</Command>
<Command name=“Get php help” Ctrl=“no” Alt=“yes” Shift=“no” Key=“112”>http://www.php.net/ $(CURRENT_WORD)</Command>
<Command name=“Google Search” Ctrl=“no” Alt=“yes” Shift=“no” Key=“113”>http://www.google.com/search?q=$(CURRENT_WORD)</Command>
<Command name=“Wikipedia Search” Ctrl=“no” Alt=“yes” Shift=“no” Key=“114”>http://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command>
<Command name=“Open file” Ctrl=“no” Alt=“yes” Shift=“no” Key=“116”>$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD)</Command>
<Command name=“Open in another instance” Ctrl=“no” Alt=“yes” Shift=“no” Key=“117”>$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) -nosession -multiInst</Command>
<Command name=“Open containing folder” Ctrl=“no” Alt=“no” Shift=“no” Key=“0”>explorer $(CURRENT_DIRECTORY)</Command>
<Command name=“Open current dir cmd” Ctrl=“no” Alt=“no” Shift=“no” Key=“0”>cmd /K cd /d $(CURRENT_DIRECTORY)</Command>
<Command name=“Send via Outlook” Ctrl=“yes” Alt=“yes” Shift=“yes” Key=“79”>outlook /a “$(FULL_CURRENT_PATH)”</Command>
</UserDefinedCommands>
<PluginCommands />
<ScintillaKeys />
</NotepadPlus>Regards,
Brayner
-
@Brayner-Chomsky-Luther-Firth-Zinn
Local Conf mode : OFF
normally means that the configuration files are stored and used from the %APPDATA% directory.
Maybe this explains the different behavior - not sure.
Would you mind giving it a try to edit the shortcuts.xml under %APPDATA%\notepad++ ?Cheers
Claudia -
That’s it ! its worked perfectly, the behavior is fine now, I can have 1,000 lines highlighted and it opens up the new instance without any message boxes.
Thanks so much for your time and effort.
Regards,
Brayner