session_dialog.vim : manage vim sessions using dialogs and the command line
| script karma
Downloaded by 774
Comments, bugs, improvements
script versions (upload new version)
|session_dialog.vim provides a simple dialog and command-line based
interface to Vim's :mksession feature. There are commands to save sessions
and restore, delete, and list sessions from multiple locations. It works
well with the terminal as well as console dialogs in GVIM (set
guioptions+=c), and provides command-line completion of session names.
With no arguments, displays the save dialog. Otherwise, saves a new
session with the given name in SessionSaveDirectory. The session file on
disk will have the SessionFilePrefix and SessionFileSuffix attached (see
"Options" below). Spaces are allowed in the sesison name.
e.g. :SessionSave foo bar creates the session "foo bar"
With no arguments, displays the restore dialog. Otherwise searches for a
session to load in SessionPath. If more than one session was found (if
sessions with the same name were found in different paths or if the
given pattern matched multiple sessions), you will be prompted to choose
e.g. :SessionRestore foo*
Displays the delete session dialog if no arguments were given, otherwise
deletes all the sessions that match the arguments. Spaces need to be
escaped since they would otherwise separate the arguments.
e.g. :SessionDelete foo will delete the session named "foo". If more
than one session is named "foo", you will be prompted to select one. You
can also use a pattern (e.g. :SessionDelete foo*). This will delete all
sessions beginning with "foo".
Prints a list of all the sessions and their locations in SessionPath if
no arguments were given. Otherwise prints a list of sessions that match
e.g. :SessionList foo bar* *baz will show all the sessions named foo,
starting with bar, or ending with baz.
ZS ZR ZD ZL
The default normal mode mappings for :SessionSave, :SessionRestore,
:SessionDelete, and :SessionList, respectively. These can be disabled
with the option SessionCreateDefaultMaps. Note that these will time out,
unlike native commands such as ZZ. (see :help 'timeoutlen')
You can also map the commands yourself using:
Default is "$HOME"
Where to save new sessions. This can be set in your vimrc or while Vim
is running. For example, to get the default behavior of :mksession,
let SessionSaveDirectory = "."
Default is set to the initial value of SessionSaveDirectory
A comma-separated list of paths in which to look for session files to
restore or delete.
e.g. let SessionPath = ".,~,~/.vim/sessions"
Default is ".vimsession_" (on Windows, "_vimsession_")
Default is "" (on Windows, ".vim")
Strings to prepend and append to session names when saving to
SessionSaveDirectory. All files found in SessionPath with these
attributes will be identified as sessions, so the combination of the two
should uniquely identify session files (unless all files found in
SessionPath will be Vim sessions).
Unset by default
The default session name to save to or restore from. This is overridden
by v:this_session. If both are unset, the Vim server name (v:servername)
will be used as the default.
0 or 1 (default)
Set this to 0 to save over an existing session file without asking for
1 or 0 (default)
Whether to exit Vim after saving a new session.
0 or 1 (default)
Whether to create the default normal mode mappings (ZS, ZR, ZD, and ZL).
|Put the file in your Vim 'plugin' directory (usually ~/.vim/plugin, or Program Files/Vim/vimfiles on Windows)|
Click on the package to download.
ip used for rating: 184.108.40.206