Mercurial > vim
comparison runtime/doc/usr_21.txt @ 3920:c53344bacabf
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 15 Nov 2012 21:28:22 +0100 |
parents | 073ff46fe397 |
children | 6ec6b7ff2d43 |
comparison
equal
deleted
inserted
replaced
3919:23fc3dc4317e | 3920:c53344bacabf |
---|---|
1 *usr_21.txt* For Vim version 7.3. Last change: 2008 Nov 09 | 1 *usr_21.txt* For Vim version 7.3. Last change: 2012 Nov 02 |
2 | 2 |
3 VIM USER MANUAL - by Bram Moolenaar | 3 VIM USER MANUAL - by Bram Moolenaar |
4 | 4 |
5 Go away and come back | 5 Go away and come back |
6 | 6 |
280 | 280 |
281 | 281 |
282 SESSION HERE, SESSION THERE | 282 SESSION HERE, SESSION THERE |
283 | 283 |
284 The obvious way to use sessions is when working on different projects. | 284 The obvious way to use sessions is when working on different projects. |
285 Suppose you store you session files in the directory "~/.vim". You are | 285 Suppose you store your session files in the directory "~/.vim". You are |
286 currently working on the "secret" project and have to switch to the "boring" | 286 currently working on the "secret" project and have to switch to the "boring" |
287 project: > | 287 project: > |
288 | 288 |
289 :wall | 289 :wall |
290 :mksession! ~/.vim/secret.vim | 290 :mksession! ~/.vim/secret.vim |
293 This first uses ":wall" to write all modified files. Then the current session | 293 This first uses ":wall" to write all modified files. Then the current session |
294 is saved, using ":mksession!". This overwrites the previous session. The | 294 is saved, using ":mksession!". This overwrites the previous session. The |
295 next time you load the secret session you can continue where you were at this | 295 next time you load the secret session you can continue where you were at this |
296 point. And finally you load the new "boring" session. | 296 point. And finally you load the new "boring" session. |
297 | 297 |
298 If you open help windows, split and close various window, and generally mess | 298 If you open help windows, split and close various windows, and generally mess |
299 up the window layout, you can go back to the last saved session: > | 299 up the window layout, you can go back to the last saved session: > |
300 | 300 |
301 :source ~/.vim/boring.vim | 301 :source ~/.vim/boring.vim |
302 | 302 |
303 Thus you have complete control over whether you want to continue next time | 303 Thus you have complete control over whether you want to continue next time |
421 | 421 |
422 | 422 |
423 A VIEW WITH A NAME | 423 A VIEW WITH A NAME |
424 | 424 |
425 The second basic way to use views is by storing the view in a file with a name | 425 The second basic way to use views is by storing the view in a file with a name |
426 you chose. This view can be loaded while editing another file. Vim will then | 426 you choose. This view can be loaded while editing another file. Vim will |
427 switch to editing the file specified in the view. Thus you can use this to | 427 then switch to editing the file specified in the view. Thus you can use this |
428 quickly switch to editing another file, with all its options set as you saved | 428 to quickly switch to editing another file, with all its options set as you |
429 them. | 429 saved them. |
430 For example, to save the view of the current file: > | 430 For example, to save the view of the current file: > |
431 | 431 |
432 :mkview ~/.vim/main.vim | 432 :mkview ~/.vim/main.vim |
433 | 433 |
434 You can restore it with: > | 434 You can restore it with: > |