• tmux resurrect 配置


    概述

    tmux 用了很长时间了, 快捷键定制了不少, 唯一的遗憾是没法保存 session, 每次关机重开之后, 恢复不到之前的 tmux session. 虽然也能忍受, 但是每天都手动打开之前的 session, 总觉得有些麻烦, 直到找到了 tmux-resurrect

    tmux-resurrect 可以方便的保存和恢复 tmux session.

    安装

    可以直接安装, 也可以通过 tpm 来安装, tpm(tmux package management)可以非常方便的安装和卸载 tmux plugin

    tpm 安装

    tpm 路径: https://github.com/tmux-plugins/tpm

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

    复制如下内容到 ~/.tmux.conf

    # List of plugins
    set -g @plugin 'tmux-plugins/tpm'
    set -g @plugin 'tmux-plugins/tmux-sensible'
    
    # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
    run -b '~/.tmux/plugins/tpm/tpm'
    

    重启 tmux 之后, 就安装完成了

    tmux-resurrect 安装

    在上面的 #List of plugins 下面添加 tmux-resurrect plugin

    # List of plugins
    set -g @plugin 'tmux-plugins/tpm'
    set -g @plugin 'tmux-plugins/tmux-sensible'
    set -g @plugin 'tmux-plugins/tmux-resurrect'  #  <-- 这个是新添加的
    

    重启 tmux 之后, 输入 prefix + I, 就会自动安装 plugin

    使用

    tmux-resurrect 的使用非常简单, 默认的保存和恢复 session 的快捷键如下:

    • prefix + Ctrl-s Save
    • prefix + Ctrl-r Restore
  • 相关阅读:
    java 编译
    MapReduce
    搜索引擎中index、attribute和summary概念
    正排索引和倒排索引简单介绍
    SVN 使用
    PlantUML + Chrome 联合使用
    vim 多标签和多窗口
    关于数据库不适合docker的原因(摘抄)
    跨域
    is_valid校验机制
  • 原文地址:https://www.cnblogs.com/wang_yb/p/10208075.html
Copyright © 2020-2023  润新知