tmux-os

作者: 扇子和杯子 | 来源:发表于2020-07-28 12:02 被阅读0次

    参考链接:
    https://www.jianshu.com/p/fd3bbdba9dc9


    1. prefix

    control+B
    

    2. 配置文件

    2.1. 内容
    # 窗口序号从1开始计数
    set -g base-index 1
    # 开启鼠标模式
    set-option -g mouse on
    
    
    # 通过前缀+KJHL快速切换pane
    #up
    bind-key k select-pane -U
    #down
    bind-key j select-pane -D
    #left
    bind-key h select-pane -L
    #right
    bind-key l select-pane -R
    
    # 和系统粘贴板接通
    set-window-option -g mode-keys vi
    set -g default-command "reattach-to-user-namespace -l ${SHELL}"
    
    bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
    bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
    bind-key p paste-buffer
    
    2.2. 更新
    tmux source-file ~/.tmux.conf
    

    3. 复制粘贴步骤

    1⃣️prefix
    2⃣️[
    3⃣️触摸板选中所需内容
    4⃣️y
    

    4. 常用快捷键

    左右分屏 :Ctrl + b, % (分割当前窗口)
    上下分屏 :Ctrl + b, " (分割当前窗口)
    关闭分屏 :Ctrl + b, x (关闭所在分屏窗口)
    显示分屏编号 :Ctrl + b, q (显示分屏编号)
    分屏切换 :Ctrl + b, 方向键 (基本可以自由切换)
    

    5. session

    tmux ls # 查看所有session
    prefix + $ # session重命名
    tmux kill-session -a # 断掉所有session
    tmux kill-session -t <session-name> #断掉某个sessin
    tmux new -s py35 #新建一个名为py35的session
    

    6. tmux卡住

    killall -9 tmux
    

    相关文章

      网友评论

          本文标题:tmux-os

          本文链接:https://www.haomeiwen.com/subject/uthfrktx.html