6

I saved a session in notepad++ and I know how to load that session from notepad++ using the "Load Session..." option. But how do I create a shortcut to open that session when notepad++ starts? My eventual end case is that I will have several shortcuts that I will open using Launchy depending on which session I want to work on.

1
  • 1
    The way I make changes to session files is to copy the session file to something with a different extension (e.g. .txt) and then edit the txt file. When I'm done, I can rename the files.
    – user238240
    Jul 15, 2013 at 12:58

1 Answer 1

6

Found the Answer: In Notepad++ (5.6.8 in my case)

  1. Setting -> Preferences.
  2. Miscellaneous Tab
  3. enter an extension for Session files. I entered nps (without a dot)
  4. Now Notepad++ is aware of session files. and will open the files contained in the session file's xml entries.

For example, a file called nyssis-session.nps has the contents:

<NotepadPlus>
    <Session activeView="0">
        <mainView activeIndex="1">
            <File firstVisibleLine="147" xOffset="0" scrollWidth="960" startPos="6065" endPos="6065" selMode="0" lang="Java" encoding="-1" filename="C:\Dev\ws\AuditJobAndPollForCompletion.java" />
            <File firstVisibleLine="48" xOffset="0" scrollWidth="624" startPos="2277" endPos="2277" selMode="0" lang="Java" encoding="-1" filename="C:\Dev\ws\StartBatchJobAndPoll.java" />
            <File firstVisibleLine="33" xOffset="0" scrollWidth="872" startPos="2331" endPos="2331" selMode="0" lang="Java" encoding="-1" filename="C:\Dev\ws\LoadMatchResultTable.java" />
        </mainView>
        <subView activeIndex="0" />
    </Session>
</NotepadPlus>

Opening this file will now open the three files (not the xml definition - in fact if I want to manually edit this file I need to open it with something other than NotePad++).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .