XSpace
enhanced vim's native mksession
to provide a solution for sessions management and great integration with git
projects.
When XSpace is on
, it records all changes with your windows position, tabs, buffers, changes (on files), etc.. to help you continue with what you left from last time, even you can undo your changes.
If you start a vim session under a git
project, XSpace
will automatically set it on
with s:xspace_session_dir
is root of the git project directory
let s:xspace_session_dir = system("git rev-parse --show-toplevel 2>/dev/null | tr '\\n' '/'")
Very easy, the plugin provides you three commands
:XSpaceInfo
It will shows state of XSpace
is on/off and path to session file and undo dir.
:XSpaceOn
To start XSpace
if it wasn't started yet or just show a message that XSpace is on already!!!
:XSpaceOff
To stop XSpace
if it's on or just show a message that XSpace is off already!!!
By default, the plugin sets use Session.vim
as session name and .undodir
as undo directory.
You can change if you like to do so
let g:xspace_session_name = 'A_NEW_NAME.vim'
let g:xspace_undodir = 'A_NEW_DIR'
The plugin requires Vim >= 8.0 or Neovim >= 0.4
Plug 'xuta/vim-xspace'
Plugin 'xuta/vim-xspace'
cd /.vim/bundle
git clone https://github.com/xuta/vim-xspace