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.

link|improve this question

75% accept rate
feedback

1 Answer

up vote 2 down vote accepted

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++).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.