You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Extended session management for Vim
2
2
3
-
The `session.vim` plug-in improves upon [Vim](http://www.vim.org/)'s built-in [:mksession][mksession] command by enabling you to easily and (if you want) automatically persist and restore your Vim editing sessions. It works by generating a [Vim script](http://vimdoc.sourceforge.net/htmldoc/usr_41.html#script) that restores your current settings and the arrangement of tab pages and/or split windows and the files they contain.
3
+
The vim-session plug-in improves upon [Vim](http://www.vim.org/)'s built-in [:mksession][mksession] command by enabling you to easily and (if you want) automatically persist and restore your Vim editing sessions. It works by generating a [Vim script](http://vimdoc.sourceforge.net/htmldoc/usr_41.html#script) that restores your current settings and the arrangement of tab pages and/or split windows and the files they contain.
4
4
5
5
To persist your current editing session you can execute the `:SaveSession` command. If you don't provide a name for the session 'default' is used (you can change this name with an option). You're free to use whatever characters you like in session names. When you want to restore your session simply execute `:OpenSession`. Again the name 'default' is used if you don't provide one. When a session is active, has been changed and you quit Vim you'll be prompted whether you want to save the open session before quitting Vim:
6
6
@@ -16,7 +16,7 @@ When you start Vim with a custom [server name](http://vimdoc.sourceforge.net/htm
16
16
$ gvim --servername session-plugin
17
17
$ # etc.
18
18
19
-
The session scripts created by this plug-in are stored in the directory `~/.vim/sessions` (on UNIX) or `~\vimfiles\sessions` (on Windows) but you can change the location by setting `g:session_directory`. If you're curious what the session scripts generated by `session.vim` look like see the [sample below](http://peterodding.com/code/vim/session/#sample_session_script).
19
+
The session scripts created by this plug-in are stored in the directory `~/.vim/sessions` (on UNIX) or `~\vimfiles\sessions` (on Windows) but you can change the location by setting `g:session_directory`. If you're curious what the session scripts generated by vim-session look like see the [sample below](http://peterodding.com/code/vim/session/#sample_session_script).
20
20
21
21
If you're still getting to know the plug-in, the "Sessions" menu may help: It contains menu items for most commands defined by the plug-in.
22
22
@@ -72,7 +72,7 @@ Note that this command only deletes the session script, it leaves your open tab
72
72
73
73
### The `:ViewSession` command
74
74
75
-
Execute this command to view the Vim script generated for a session. This command is useful when you need to review the generated Vim script repeatedly, for example while debugging or modifying the `session.vim` plug-in.
75
+
Execute this command to view the Vim script generated for a session. This command is useful when you need to review the generated Vim script repeatedly, for example while debugging or modifying the vim-session plug-in.
76
76
77
77
### Tab scoped sessions
78
78
@@ -104,15 +104,15 @@ The following Vim options and plug-in options (global variables) can be used to
104
104
105
105
### The `sessionoptions` setting
106
106
107
-
Because the `session.vim` plug-in uses Vim's [:mksession][mksession] command you can change how it works by setting ['sessionoptions'][sessionoptions] in your [vimrc script][vimrc], for example:
107
+
Because the vim-session plug-in uses Vim's [:mksession][mksession] command you can change how it works by setting ['sessionoptions'][sessionoptions] in your [vimrc script][vimrc], for example:
108
108
109
109
" If you only want to save the current tab page:
110
110
set sessionoptions-=tabpages
111
111
112
112
" If you don't want help windows to be restored:
113
113
set sessionoptions-=help
114
114
115
-
Note that the session.vim plug-in automatically and unconditionally executes the following change just before saving a session:
115
+
Note that the vim-session plug-in automatically and unconditionally executes the following change just before saving a session:
116
116
117
117
" Don't persist options and mappings because it can corrupt sessions.
118
118
set sessionoptions-=options
@@ -153,7 +153,7 @@ By default this option is set to false (0). When you set this option to true (1)
153
153
154
154
### The `g:session_persist_globals` option
155
155
156
-
The session.vim plug-in uses Vim's [:mksession][mksession] command but it changes ['sessionoptions'][sessionoptions] so that Vim options and mappings are not persisted. The plug-in does this because persistence of options and mappings can break loading of sessions, in other words it's fragile (in my opinion).
156
+
The vim-session plug-in uses Vim's [:mksession][mksession] command but it changes ['sessionoptions'][sessionoptions] so that Vim options and mappings are not persisted. The plug-in does this because persistence of options and mappings can break loading of sessions, in other words it's fragile (in my opinion).
157
157
158
158
If you want the plug-in to persist specific global variables or options you can add their names to the list `g:session_persist_globals` in your [vimrc script][vimrc]:
159
159
@@ -207,19 +207,19 @@ When you enable the aliases, the default command names will still be available.
207
207
208
208
### The `g:loaded_session` option
209
209
210
-
This variable isn't really an option but if you want to avoid loading the `session.vim` plug-in you can set this variable to any value in your [vimrc script][vimrc]:
210
+
This variable isn't really an option but if you want to avoid loading the vim-session plug-in you can set this variable to any value in your [vimrc script][vimrc]:
211
211
212
212
:let g:loaded_session = 1
213
213
214
214
## Compatibility with other plug-ins
215
215
216
-
Vim's [:mksession][mksession] command isn't really compatible with plug-ins that create buffers with generated content and because of this `session.vim` includes specific workarounds for such plug-ins:
216
+
Vim's [:mksession][mksession] command isn't really compatible with plug-ins that create buffers with generated content and because of this the vim-session plug-in includes specific workarounds for such plug-ins:
217
217
218
-
*[BufExplorer](http://www.vim.org/scripts/script.php?script_id=42), [Project](http://www.vim.org/scripts/script.php?script_id=69) and [NERD tree](http://www.vim.org/scripts/script.php?script_id=1658) windows are supported;
218
+
*[BufExplorer](http://www.vim.org/scripts/script.php?script_id=42), [Conque Shell](http://www.vim.org/scripts/script.php?script_id=2771), [NERD tree](http://www.vim.org/scripts/script.php?script_id=1658) and [Project](http://www.vim.org/scripts/script.php?script_id=69) windows are supported;
219
219
* When [shell.vim](http://peterodding.com/code/vim/shell/) is installed Vim's full-screen state is persisted;
220
220
* The [netrw](http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#netrw-start) and [taglist.vim](http://www.vim.org/scripts/script.php?script_id=273) plug-ins support sessions out of the box.
221
221
222
-
If your favorite plug-in doesn't work with `session.vim` drop me a mail and I'll see what I can do. Please include a link to the plug-in in your e-mail so that I can install and test the plug-in.
222
+
If your favorite plug-in doesn't work with the vim-session plug-in drop me a mail and I'll see what I can do. Please include a link to the plug-in in your e-mail so that I can install and test the plug-in.
223
223
224
224
## Known issues
225
225
@@ -236,7 +236,7 @@ This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/M
236
236
237
237
## Sample session script
238
238
239
-
Here's an example session script generated by the `session.vim` plug-in while I was editing the plug-in itself in Vim:
239
+
Here's an example session script generated by the vim-session plug-in while I was editing the plug-in itself in Vim:
240
240
241
241
" ~/.vim/sessions/example.vim: Vim session script.
242
242
" Created by session.vim on 30 August 2010 at 05:26:28.
0 commit comments