- Save this "particular file" if it need.
- Do RMB on it's tab and choose
'Close ALL BUT This'
.
- Close
Notepad++
.
More convenient will be to create macro.
But your goal's final step is to exit Npp
... It's unpossible to save macro on closed Npp
:)
So, do the following
Locate where your Npp
shortcuts.xml
is placed.
Possible pathes are:
%APPDATA%\Notepad++\shortcuts.xml
Npp_install_folder\shortcuts.xml
- On path specified in
Npp_install_folder\cloud\choice
(file w/o extension)
Go to this place and create new folder in it with name you want, say - BUP
.
- Copy original
shortcuts.xml
to BUP
folder.
- Create backup copy of
BUP\shortcuts.xml
. Say - shortcuts_bup.xml
.
Open in Npp BUP\shortcuts.xml
and insert in it's section <Macros>
the following block:
<Macro name="_SaveMe_CloseAllButMe_And_Exit" Ctrl="no" Alt="no" Shift="no" Key="0">
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41005" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41011" lParam="0" sParam="" />
</Macro>
Finally, BUP\shortcuts.xml
should look as:
<NotepadPlus>
<InternalCommands />
<Macros>
' here is something by default ..
<Macro name="_SaveMe_CloseAllButMe_And_Exit" Ctrl="no" Alt="no" Shift="no" Key="0">
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41005" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41011" lParam="0" sParam="" />
</Macro>
</Macros>
<UserDefinedCommands>
' .. and here too. All the rest, reagrdles present it or not, does not concern you.
</UserDefinedCommands>
<PluginCommands />
<ScintillaKeys />
</NotepadPlus>
- Save it.
- Close all instances of
Npp
.
- Copy
BUP\shortcuts.xml
over existing shortcuts.xml
on path you already found.
- Start
Npp
and reproduce setup you wrote above.
- Select the line you want on "particular file"
- Choose on meny bar
'Macro -> _SaveMe_CloseAllButMe_And_Exit'
- Run
Npp
again.
- Enjoy (if 13 does not bother you and you are not superstitious :)
.