• linux tmux 工具使用 tmux.conf 文件


    set -g prefix ^a

    unbind ^b
    bind a send-prefix

    unbind '"'
    bind - splitw -v
    unbind %
    bind splitw -h
    bind r source-file ~/.tmux.conf ;

    unbind C-[
    unbind C-]
    bind C-n new-session

    bind Tab last-window

    #set status-interval 1
    set-option -g status on
    set-option -g status-interval 1
    set-option -g status-justify "left"
    set-option -g status-left-length 60
    set-option -g status-right-length 90
    #选择分割的窗格
    bind k selectp -U
    bind j selectp -D
    bind h selectp -L
    bind l selectp -R
    #重新调整窗格的大小
    bind ^k resizep -U 10
    bind ^j resizep -D 10
    bind ^h resizep -L 10
    bind ^l resizep -R 10
    #swap to panels
    bind ^u swapp -U
    bind ^d swapp -D

    set -g status-fg colour055
    set -g status-bg colour032
    set -g default-terminal "screen-256color"

    # 对齐方式
    set-option -g status-justify left

    # 左下角
    # set-option -g status-left '#[bg=black,fg=green][#[fg=blue]#S#[fg=green]]'
    set-option -g status-left-length 20
    set-option -g allow-rename off #do not change your window title automaticly.
    set-window-option -g window-status-format '#[fg=colour226,bold]#I:#W_#{window_panes}'
    # add count for your window pannels.
    set-window-option -g window-status-current-format '#[fg=colour046,bold]<<#I:#W_#{window_panes}>>'
    set -g status-right '#[fg=colour226,bold][%Y-%m-%d %H:%M:%S]'

    ## just for mac settings.
    ## install reattach-to-user-namespace first.
    ## Copy-paste integration
    ## Use vim keybindings in copy mode
    ## Setup 'v' to begin selection as in Vim
    # set-option -g default-command "reattach-to-user-namespace -l zsh"
    ## if your are in osx env , uncomment line up.

    # setw -g mode-keys vi
    # bind-key -t vi-copy v begin-selection
    # bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
    # unbind -t vi-copy Enter
    # bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
    # bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"

    if "test ! -d ~/.tmux/plugins/tpm"
    "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"

    set-option -g mouse on

    # List of plugins
    set -g @plugin 'tmux-plugins/tmux-sensible'
    set -g @plugin 'nhdaly/tmux-better-mouse-mode'
    set -g @plugin 'NHDaly/tmux-scroll-copy-mode'
    set -g @plugin 'tmux-plugins/tmux-resurrect'
    set -g @plugin 'tmux-plugins/tmux-yank'

    # setting for tmux-resurrect
    set -g @resurrect-strategy-vim 'session'
    set -g @resurrect-strategy-nvim 'session'
    set -g @scroll-down-exit-copy-mode "on"
    set -g @scroll-in-moused-over-pane "on"
    set -g @scroll-without-changing-pane "on"
    set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"

    run '~/.tmux/plugins/tpm/tpm'

  • 相关阅读:
    JS学习专辑(3) DOM
    JS学习专辑(4) 变量作用域和语句
    JS学习专辑(6) 函数
    JS学习专辑(2) BOM
    WPF Adorner学习(1)
    C# 递归
    IEnumerable和IEnumerator
    C# 索引器
    JS学习专辑(5) 对象和数组
    JS学习专辑(1) 入门
  • 原文地址:https://www.cnblogs.com/S--S/p/8430782.html
Copyright © 2020-2023  润新知