Skip to content

Commit ea043f5

Browse files
authored
Update restoring_vim_and_neovim_sessions.md docs
add persistence usage documentation
1 parent 5035657 commit ea043f5

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

docs/restoring_vim_and_neovim_sessions.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
# Restoring vim and neovim sessions
22

3+
## `persistence.nvim` strategy
4+
- when using [persistence.nvim](https://github.com/folke/persistence.nvim) by Folke, tmux-resurrect will call on it to load sessions if they exist
5+
- in `.tmux.conf` or `.config/tmux/tmux.conf`:
6+
7+
```sh
8+
set -g @resurrect-strategy-nvim 'persistence'
9+
```
10+
## native session strategy
311
- save vim/neovim sessions. I recommend
412
[tpope/vim-obsession](https://github.com/tpope/vim-obsession) (as almost every
513
plugin, it works for both vim and neovim).
6-
- in `.tmux.conf`:
7-
8-
# for vim
9-
set -g @resurrect-strategy-vim 'session'
10-
# for neovim
11-
set -g @resurrect-strategy-nvim 'session'
12-
14+
- in `.tmux.conf` or `.config/tmux/tmux.conf`:
15+
16+
```sh
17+
# for vim
18+
set -g @resurrect-strategy-vim 'session'
19+
# for neovim
20+
set -g @resurrect-strategy-nvim 'session'
21+
```
1322
`tmux-resurrect` will now restore vim and neovim sessions if `Session.vim` file
1423
is present.
1524

0 commit comments

Comments
 (0)