mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Move all docs to 'docs/' dir
This commit is contained in:
parent
e81f8e5f37
commit
4d5c30c29a
105
README.md
105
README.md
@ -14,7 +14,8 @@ projects.
|
||||
can be completely restored after a system restart (or when you feel like it).
|
||||
No configuration is required. You should feel like you never quit tmux.
|
||||
|
||||
It even (optionally) [restores vim and neovim sessions](#restoring-vim-and-neovim-sessions)!
|
||||
It even (optionally)
|
||||
[restores vim and neovim sessions](docs/restoring_vim_and_neovim_sessions.md)!
|
||||
|
||||
Automatic restoring and continuous saving of tmux env is also possible with
|
||||
[tmux-continuum](https://github.com/tmux-plugins/tmux-continuum) plugin.
|
||||
@ -28,11 +29,6 @@ Automatic restoring and continuous saving of tmux env is also possible with
|
||||
- `prefix + Ctrl-s` - save
|
||||
- `prefix + Ctrl-r` - restore
|
||||
|
||||
For custom key bindings, add to `.tmux.conf`:
|
||||
|
||||
set -g @resurrect-save 'S'
|
||||
set -g @resurrect-restore 'R'
|
||||
|
||||
### About
|
||||
|
||||
This plugin goes to great lengths to save and restore all the details from your
|
||||
@ -47,13 +43,13 @@ This plugin goes to great lengths to save and restore all the details from your
|
||||
- active pane for each window
|
||||
- "grouped sessions" (useful feature when using tmux with multiple monitors)
|
||||
- programs running within a pane! More details in the
|
||||
[configuration section](#configuration).
|
||||
- restoring vim/neovim sessions (optional). More details in
|
||||
[restoring vim and neovim sessions](#restoring-vim-and-neovim-sessions).
|
||||
- restoring bash history (optional, \*experimental*). More details in
|
||||
[restoring bash history](#restoring-bash-history-experimental).
|
||||
- restoring tmux pane contents (optional, \*experimental*). More details in
|
||||
[restoring pane contents](#restoring-pane-contents-experimental).
|
||||
[restoring programs doc](docs/restoring_programs.md).
|
||||
|
||||
Optional:
|
||||
|
||||
- [restoring vim and neovim sessions](docs/restoring_vim_and_neovim_sessions.md)
|
||||
- [restoring pane contents](docs/restoring_pane_contents.md)
|
||||
- [restoring bash history](docs/restoring_bash_history.md) (experimental)
|
||||
|
||||
Requirements / dependencies: `tmux 1.9` or higher, `bash`.
|
||||
|
||||
@ -85,80 +81,27 @@ Add this line to the bottom of `.tmux.conf`:
|
||||
Reload TMUX environment with: `$ tmux source-file ~/.tmux.conf`.
|
||||
You should now be able to use the plugin.
|
||||
|
||||
### Configuration
|
||||
### Docs
|
||||
|
||||
Configuration is not required, but it enables extra features.
|
||||
**Configuration**
|
||||
|
||||
Only a conservative list of programs is restored by default:<br/>
|
||||
`vi vim nvim emacs man less more tail top htop irssi`.
|
||||
- [Changing the default key bindings](docs/custom_key_bindings.md).
|
||||
- Only a conservative list of programs is restored by default:<br/>
|
||||
`vi vim nvim emacs man less more tail top htop irssi`.<br/>
|
||||
[Restoring programs doc](docs/restoring_programs.md) explains how to restore
|
||||
additional programs.
|
||||
- [Change a directory](docs/save_dir.md) where `tmux-resurrect` saves tmux
|
||||
environment.
|
||||
|
||||
- Restore additional programs with the setting in `.tmux.conf`:
|
||||
**Optional features**
|
||||
|
||||
set -g @resurrect-processes 'ssh psql mysql sqlite3'
|
||||
- [Restoring vim and neovim sessions](docs/restoring_vim_and_neovim_sessions.md)
|
||||
is nice if you're a vim/neovim user.
|
||||
- [Restoring pane contents](docs/restoring_pane_contents.md) feature.
|
||||
|
||||
- Programs with arguments should be double quoted:
|
||||
**Experimental features (also optional)**
|
||||
|
||||
set -g @resurrect-processes 'some_program "git log"'
|
||||
|
||||
- Start with tilde to restore a program whose process contains target name:
|
||||
|
||||
set -g @resurrect-processes 'irb pry "~rails server" "~rails console"'
|
||||
|
||||
- Use `->` to specify a command to be used when restoring a program (useful if
|
||||
the default restore command fails ):
|
||||
|
||||
set -g @resurrect-processes 'some_program "grunt->grunt development"'
|
||||
|
||||
- Don't restore any programs:
|
||||
|
||||
set -g @resurrect-processes 'false'
|
||||
|
||||
- Restore **all** programs (be careful with this!):
|
||||
|
||||
set -g @resurrect-processes ':all:'
|
||||
|
||||
#### Restoring vim and neovim sessions
|
||||
|
||||
- save vim/neovim sessions. I recommend
|
||||
[tpope/vim-obsession](https://github.com/tpope/vim-obsession) (as almost every
|
||||
plugin, it works for both vim and neovim).
|
||||
- in `.tmux.conf`:
|
||||
|
||||
# for vim
|
||||
set -g @resurrect-strategy-vim 'session'
|
||||
# for neovim
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
|
||||
`tmux-resurrect` will now restore vim and neovim sessions if `Sessions.vim` file
|
||||
is present.
|
||||
|
||||
#### Resurrect save dir
|
||||
|
||||
By default Tmux environment is saved to a file in `~/.tmux/resurrect` dir.
|
||||
Change this with:
|
||||
|
||||
set -g @resurrect-dir '/some/path'
|
||||
|
||||
#### Restoring bash history (experimental)
|
||||
|
||||
In `.tmux.conf`:
|
||||
|
||||
set -g @resurrect-save-bash-history 'on'
|
||||
|
||||
Bash `history` for individual panes will now be saved and restored. Due to
|
||||
technical limitations, this only works for panes which have no program running in
|
||||
foreground when saving. `tmux-resurrect` will send history write command
|
||||
to each such pane. To prevent these commands from being added to history themselves,
|
||||
add `HISTCONTROL=ignoreboth` to your `.bashrc` (this is set by default in Ubuntu).
|
||||
|
||||
#### Restoring pane contents (experimental)
|
||||
|
||||
To enable saving and restoring tmux pane contents add this line to `.tmux.conf`:
|
||||
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
|
||||
This feature works fine, but there may be some glitches as we're
|
||||
[actively working on this](https://github.com/tmux-plugins/tmux-resurrect/issues/81).
|
||||
- [restoring bash history](docs/restoring_bash_history.md)
|
||||
|
||||
### Other goodies
|
||||
|
||||
|
11
docs/custom_key_bindings.md
Normal file
11
docs/custom_key_bindings.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Custom key bindings
|
||||
|
||||
The default key bindings are:
|
||||
|
||||
- `prefix + Ctrl-s` - save
|
||||
- `prefix + Ctrl-r` - restore
|
||||
|
||||
To change these, add to `.tmux.conf`:
|
||||
|
||||
set -g @resurrect-save 'S'
|
||||
set -g @resurrect-restore 'R'
|
12
docs/restoring_bash_history.md
Normal file
12
docs/restoring_bash_history.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Restoring bash history (experimental)
|
||||
|
||||
Enable feature with this option in `.tmux.conf`:
|
||||
|
||||
set -g @resurrect-save-bash-history 'on'
|
||||
|
||||
Bash `history` for individual panes will now be saved and restored. Due to
|
||||
technical limitations, this only works for panes which have no program running
|
||||
in foreground when saving. `tmux-resurrect` will send history write command to
|
||||
each such pane. To prevent these commands from being added to history
|
||||
themselves, add `HISTCONTROL=ignoreboth` to your `.bashrc`
|
||||
(this is set by default in Ubuntu).
|
7
docs/restoring_pane_contents.md
Normal file
7
docs/restoring_pane_contents.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Restoring pane contents
|
||||
|
||||
This plugin enables saving and restoring tmux pane contents.
|
||||
|
||||
This feature can be enabled by adding this line to `.tmux.conf`:
|
||||
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
33
docs/restoring_programs.md
Normal file
33
docs/restoring_programs.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Restoring programs
|
||||
|
||||
Only a conservative list of programs is restored by default:<br/>
|
||||
`vi vim nvim emacs man less more tail top htop irssi`.
|
||||
|
||||
This can be configured with `@resurrect-processes` option in `.tmux.conf`. It
|
||||
contains space-separated list of additional programs to restore.
|
||||
|
||||
- Example restoring additional programs:
|
||||
|
||||
set -g @resurrect-processes 'ssh psql mysql sqlite3'
|
||||
|
||||
- Programs with arguments should be double quoted:
|
||||
|
||||
set -g @resurrect-processes 'some_program "git log"'
|
||||
|
||||
- Start with tilde to restore a program whose process contains target name:
|
||||
|
||||
set -g @resurrect-processes 'irb pry "~rails server" "~rails console"'
|
||||
|
||||
- Use `->` to specify a command to be used when restoring a program (useful if
|
||||
the default restore command fails ):
|
||||
|
||||
set -g @resurrect-processes 'some_program "grunt->grunt development"'
|
||||
|
||||
- Don't restore any programs:
|
||||
|
||||
set -g @resurrect-processes 'false'
|
||||
|
||||
- Restore **all** programs (be careful with this!):
|
||||
|
||||
set -g @resurrect-processes ':all:'
|
||||
|
15
docs/restoring_vim_and_neovim_sessions.md
Normal file
15
docs/restoring_vim_and_neovim_sessions.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Restoring vim and neovim sessions
|
||||
|
||||
- save vim/neovim sessions. I recommend
|
||||
[tpope/vim-obsession](https://github.com/tpope/vim-obsession) (as almost every
|
||||
plugin, it works for both vim and neovim).
|
||||
- in `.tmux.conf`:
|
||||
|
||||
# for vim
|
||||
set -g @resurrect-strategy-vim 'session'
|
||||
# for neovim
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
|
||||
`tmux-resurrect` will now restore vim and neovim sessions if `Sessions.vim` file
|
||||
is present.
|
||||
|
6
docs/save_dir.md
Normal file
6
docs/save_dir.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Resurrect save dir
|
||||
|
||||
By default Tmux environment is saved to a file in `~/.tmux/resurrect` dir.
|
||||
Change this with:
|
||||
|
||||
set -g @resurrect-dir '/some/path'
|
Loading…
Reference in New Issue
Block a user