zoukankan      html  css  js  c++  java
  • 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'

  • 相关阅读:
    转:验证日期的正则表达式比较全面地验证
    IIS应用地址池监控
    Net预编译 真的好用与否
    关键字检索,找到所有数据
    vue 文件上传自定义实现
    docker 基础(一)
    input表单中嵌入百度地图
    linux系统光盘开机自动挂载-配置本地yum源
    linux学习笔记基础篇(一)
    构建apache web 服务器
  • 原文地址:https://www.cnblogs.com/S--S/p/8430782.html
Copyright © 2011-2022 走看看