tmux-resurrect README

The project's README from github.com/tmux-plugins/tmux-resurrect. As one markdown file: README.md.

Tmux Resurrect

Build Status

Restore tmux environment after system restart.

Tmux is great, except when you have to restart the computer. You lose all the running programs, working directories, pane layouts etc. There are helpful management tools out there, but they require initial configuration and continuous updates as your workflow evolves or you start new projects.

tmux-resurrect saves all the little details from your tmux environment so it 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!

Automatic restoring and continuous saving of tmux env is also possible with tmux-continuum plugin.

Screencast

screencast screenshot

Key bindings

About

This plugin goes to great lengths to save and restore all the details from your tmux environment. Here's what's been taken care of:

Optional:

Requirements / dependencies: tmux 1.9 or higher, bash.

Tested and working on Linux, OSX and Cygwin.

tmux-resurrect is idempotent! It will not try to restore panes or windows that already exist.
The single exception to this is when tmux is started with only 1 pane in order to restore previous tmux env. Only in this case will this single pane be overwritten.

Add plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'tmux-plugins/tmux-resurrect'

Hit prefix + I to fetch the plugin and source it. You should now be able to use the plugin.

Manual Installation

Clone the repo:

$ git clone https://github.com/tmux-plugins/tmux-resurrect ~/clone/path

Add this line to the bottom of .tmux.conf:

run-shell ~/clone/path/resurrect.tmux

Reload TMUX environment with: $ tmux source-file ~/.tmux.conf. You should now be able to use the plugin.

Docs

Configuration

Optional features

Other goodies

Reporting bugs and contributing

Both contributing and bug reports are welcome. Please check out contributing guidelines.

Credits

Mislav Marohnić - the idea for the plugin came from his tmux-session script.

License

MIT

tmux-resurrect (tmux-plugins/tmux-resurrect)

Searching Database…

这是什么?这是一个 tmux 插件,可以保存你整个 tmux 环境(会话、窗口、窗格、布局、正在运行的程序),并在系统重启后恢复。
这是独立应用还是 tmux 插件?它是一个 tmux 插件(由 shell 脚本组成),通过你的 tmux 配置接入,而不是一个独立的应用程序。
我该怎么安装和使用它?在 .tmux.conf 中添加 'set -g @plugin tmux-plugins/tmux-resurrect',然后通过 Tmux Plugin Manager 按下 prefix + I;或者手动克隆仓库,并在 .tmux.conf 中添加 'run-shell ~/clone/path/resurrect.tmux'。之后,使用 prefix + Ctrl-s 保存,使用 prefix + Ctrl-r 恢复。
运行它需要什么?只需要 tmux 1.9 或更高版本以及 bash,开箱即用,无需额外配置。
它会自动恢复所有正在运行的程序吗?否,只会恢复一份保守的默认程序列表(vi、vim、nvim、emacs、man、less、more、tail、top、htop、irssi、weechat、mutt);其他程序需要根据「恢复程序」文档进行额外配置。
它在 Mac 和 Windows 上也能用吗,还是只支持 Linux?已在 Linux、macOS(OSX)和 Cygwin 上测试,并可正常运行。
它会打乱我已经打开的窗格吗?不会。它可以重复执行而不产生副作用,不会覆盖已有的窗格或窗口,唯一的例外是为恢复已保存的环境而全新启动 tmux 时,那个初始窗格。
它也能恢复我的 vim 会话吗?能。恢复 vim 和 neovim 会话是它支持的一项可选功能。
它会自动持续保存,还是我必须手动保存?单独使用时,你需要通过快捷键手动保存和恢复;但如果搭配 tmux-continuum 插件,就能实现自动持续保存和恢复。
到底会恢复哪些内容?会话、窗口、窗格及其顺序、工作目录、精确的窗格布局(包括已缩放的状态)、活动和备用的会话与窗口、窗口焦点、分组会话,甚至每个窗格中正在运行的程序。
Size
0.6 MB
Stars
13.1K
Updated
CommitMar 06
Age
12y
Commits · 90 Days