From 5509256a023ebba38d49f0ca1a31e267b029f258 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Thu, 28 Aug 2014 01:09:55 +0200 Subject: [PATCH] Update readme --- CHANGELOG.md | 1 + README.md | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3535505..5c1959b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - enable whitelisting processes that will be restored - expand readme with configuration options - enable command strategies; enable restoring vim sessions +- update readme: explain restoring vim sessions ### v0.0.4, 2014-08-26 - restore pane layout for each window diff --git a/README.md b/README.md index 44a8123..0916f1f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,13 @@ projects. Enter `tmux-session-saver`: tmux persistence without configuration so there are no interruptions in your workflow. +It will even (optionally) [restore vim sessions](#restoring-vim-sessions)! + +### Key bindings + +- `prefix + Alt-s` - save +- `prefix + Alt-r` - restore + ### About This plugin goes to great lengths to save and restore all the details from your @@ -18,19 +25,16 @@ This plugin goes to great lengths to save and restore all the details from your - all sessions, windows, panes and their order - current working directory for each pane -- **exact panes layout** within a window +- **exact pane layouts** within windows - active and alternative session - active and alternative window for each session - active pane for each window - programs running within a pane! More details in the [configuration section](#configuration). +- restoring vim sessions (optional). More details in + [restoring vim sessions](#restoring-vim-sessions). Requirements / dependencies: `tmux 1.9` or higher, `pgrep` -### Key bindings - -- `prefix + Alt-s` - save -- `prefix + Alt-r` - restore - ### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended) Add plugin to the list of TPM plugins in `.tmux.conf`: @@ -78,16 +82,26 @@ Open a github issue if you think some other program should be on the default lis set -g @session-saver-processes ':all:' +#### Restoring vim sessions + +- save vim sessions - I recommend [tpope/vim-obsession](tpope/vim-obsession) +- in `.tmux.conf`: + + set -g @session-saver-strategy-vim "session" + +`tmux-session-saver` will now restore vim sessions if `Sessions.vim` file is +present. + ### Reporting bugs and contributing Code contributions are welcome! If you find a bug please report it in the issues. When reporting a bug please -attach a file that is symlinked to `~/.tmux/sessions/last`. +attach a file symlinked to `~/.tmux/sessions/last`. ### Credits -[Mislav Marohnic](https://github.com/mislav) - the idea for the plugin came from his +[Mislav Marohnić](https://github.com/mislav) - the idea for the plugin came from his [tmux-session script](https://github.com/mislav/dotfiles/blob/master/bin/tmux-session). ### License