All Projects → c9s → gsession.vim

c9s / gsession.vim

Licence: other
gsession.vim saves your session files into the same directory (~/.vim/session/) by default. and auto-detect your session file to load session file when you are opening vim editor without arguments.

Programming Languages

Vim Script
2826 projects
Makefile
30231 projects
Visual Basic .NET
514 projects

Global Session Plugin

gsession.vim saves your session files into the same directory (~/.vim/session/ or ~\vimfiles\session\ on Windows by default). and auto-detect your session file to load session file when you are opening vim editor without arguments. you can also define your session dir by g:session_dir option.

gsession.vim also save your session file when you are leaving vim editor.

gsession.vim also support making a local session file <leader>sS, which is just like :mksession! command. but you can define your favorite session filename.

gsession.vim create different sessions for git branches. so session won't conflict between different branches.

Local session & Global session

  1. Local session (limited to specified dir and git branch name)
  2. Global session (system wide, absolute path)

Installation

$ make install

Options

let g:session_dir            = '~/.vim/my-session'

if you prefer to put sessions in other place.

let g:local_session_filename = '.session.vim'

if you want a better session filename.

let g:autoload_session = 0
let g:autosave_session = 0

if you manage save/load yourself.

let g:gsession_non_default_mapping = 1

if you dont like the default mapping.

Usage

( NOTE: <leader> is backslash key \ by default )

<leader>ss    

create local session file (Session.vim by default , same as you type :mksession! )

<leader>sS    

create global session file (located in ~/.vim/session by default)

<leader>se

eliminate current session file (including local session file or global session file)

<leader>sE

eliminate all session file (eliminate global session only).

<leader>sn

make a named global session (completion supported)

<leader>sl

load a named global session (completion supported)

<leader>sN

make a named session in current path space (completion supported)

<leader>sL

load a named session from current path space (completion supported)

Author

Author: Cornelius
Mail:   [email protected]
Web:    http://oulixe.us
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].