Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 15: Line 15:
   
 
===Solution===
 
===Solution===
1. Append the following code to your [[vimrc]] or save the file in $HOME/.vim/plugin
+
1. Append the following code to your [[vimrc]].
   
 
Change the variable g:PathToSessions to your desired place, if needed (make sure that this directory exists and is writable)
 
Change the variable g:PathToSessions to your desired place, if needed (make sure that this directory exists and is writable)
Line 186: Line 186:
   
 
The [http://peterodding.com/code/vim/session/ session.vim plug-in] ({{script|id=3150}}) extends the concepts on this page into a more full featured session manager that supports automatic session management (using a `default' session), manual session management (using named sessions) and restoring of dynamic windows created by plug-ins such as {{script|id=1658|text=NERD tree}} and {{script|id=69|text=Project}}.
 
The [http://peterodding.com/code/vim/session/ session.vim plug-in] ({{script|id=3150}}) extends the concepts on this page into a more full featured session manager that supports automatic session management (using a `default' session), manual session management (using named sessions) and restoring of dynamic windows created by plug-ins such as {{script|id=1658|text=NERD tree}} and {{script|id=69|text=Project}}.
 
----
 
 
Here's another, [https://github.com/viespejo/dotvim/blob/master/session.vim session.vim on github].
 
 
----
 
===Alternative: gitsession.vim plug-in===
 
 
I wrote another session plugin based on git projects and branches called [https://github.com/wting/gitsessions.vim gitsessions.vim].
 
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)