|Version 6 (modified by szabgab, 4 years ago) (diff)|
Padre recognizes the fact that people work on sets of files not necessarily belong to the same "project". Occasionally they might want to switch to another set of files. In Padre we call this Session Management.
When editing in Padre you can Save the set of currently opened files as a "Session" by pressing File -> Save Session... (or Ctrl-Alt-S) This will open a window listing the already saved sessions. (There is a default session called padre-last). At this point you can either select the name of an existing session or you you can type in the name of a new session. You can also add a description for your convenience. Pressing Save will save the list of the currently open files. If you know close all the files you could return to the current situation by using Open Session via File -> Open Session... (Ctrl-Alt-O) and selecting the name of the desired session.
If you saved a session and open a few more files they will be added to the session only if you save the session again using the Save Session menu option.
At any time you are editing a bunch of files you can switch to a previously saved session using Open Session. This will close all the existing files and open those that were open when the other session was saved.
In order to make this feature even more useful you can tell padre to alway open a session when it starts. You can do it by setting Preferences -> Behaviour -> Open files: to session. If you have set this then every time you launch Padre it will first show you the list of saved sessions and you will be able to pick one of them to be opened. You can also press ESC to open Padre without any files.
You can also open padre with any session by running
padre --session='Session Name'
- Start padre
- Open 3 files
- Save the session via File -> Save Session.. and call it Abc
- Close the middle tab
- Open a 4th file
- Open the session that you saved before by File -> Open Session (TODO: it probably should NOT close the files that are already open)
- Observer that the original 3 files are now open
- Close the middle tab again
- Open the 4th file again
- Press Ctrl-Alt-S
- You should see the Save Session dialog with the current session selected
- Save it
- Close all tabs (via File -> Close ... -> Close All Files)
- Open the earlier session by pressing Ctrl-Alt-O and selecting the name of the session
- Open the preferences window and set Preferences -> Behaviour -> Open files: to session
- Close padre
- Start Padre
- Observe there is a pop-up window listing all the sessions you saved
- Select session "Abc" and load
- Observe that the 4 files that we last open are opened again.
- Close Padre
- Start Padre with padre --session=Abc
- Observe that Padre opens with the 4 files that were open earlier
- Improve the speed at which Padre can switch between sessions.
- Describe autosave of session and include it in the test case