我的tmux配置

这篇博客主要分享了个人的tmux配置详情,包括设置、快捷键和优化,旨在提高开发效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我的tmux配置

此处为备份

# Our .tmux.conf file
# Setting the prefix from C-b to C-z
# START:prefix
set -g prefix C-z
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
#setting the delay between prefix and command
# START:delay
set -s escape-time 1
# END:delay
# Ensure that we can send Ctrl-z to other apps
# START:bind_prefix
bind C-z send-prefix
# END:bind_prefix
# setting Ctrl-z Ctrl-z to last active window
# START: last-window
bind-key C-z last-window
# END: last-window
# Set the base index for windows to 1 instead of 0
# START:index
set -g base-index 1
# END:index
# Set the base index for panes to 1 instead of 0
# START:panes_index
setw -g pane-base-index 1
# END:panes_index
# Reload the file with Prefix r
# START:reload
bind r source-file ~/.tmux.conf \; display "tmux conf reloaded"
# END:reload
# splitting panes
# START:panesplit
bind | split-window -h
bind - split-window -v
# END:panesplit
# moving between panes
# START:paneselect
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# END:paneselect
# Quick pane selection
# START:panetoggle
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# END:panetoggle
# Pane resizing
# START:paneresize
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# END:paneresize
# mouse support - set to on if you want to use the mouse
# START:mouse
setw -g mode-mouse off
# END:mouse
set -g mouse-select-pane off
set -g mouse-resize-pane off
set -g mouse-select-window off
# Set the default terminal mode to 256color mode
# START:termcolor
set -g default-terminal "screen-256color"
# END:termcolor
# enable activity alerts
#START:activity
# setw -g monitor-activity on
set -g visual-activity on
#END:activity
# Status line left side
# START:statusleft
set -g status-left-length 40
# set -g status-left "#[fg=green]session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-left "#[fg=yellow,bright][ #[fg=cyan]#S#[fg=yellow] ][ #[fg=cyan]#P#[fg=yellow] ]"
# END:statusleft
# Status line right side
# 15% | 28 Nov 18:15
# START: statusright
set -g status-right "#[fg=yellow,bright][ #[fg=cyan]#W #[fg=yellow]][ #[fg=cyan]#h #[fg=yellow]]#[default]#[fg=yellow,bright][ #[fg=green]%H:%M#[default]#[fg=yellow,bright] ]"
# END:statusright

# set the status line's colors
# START:statuscolor
set -g status-fg white
set -g status-bg black
# set -g status-bg default
# END:statuscolor

# set the color of the window list
# START:windowstatuscolor
setw -g window-status-fg cyan
setw -g window-status-bg black
setw -g window-status-attr dim
# END:windowstatuscolor
# set colors for the active window
# START:activewindowstatuscolor
setw -g window-status-current-fg white
setw -g window-status-current-bg blue
setw -g window-status-current-attr bright
# END:activewindowstatuscolor

# pane colors
# START:panecolors
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# END:panecolors
# Command / message line
# START:cmdlinecolors
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# END:cmdlinecolors

#START:utf8
set -g status-utf8 on
#END:utf8 
# Update the status bar every sixty seconds
# START:updateinterval
set -g status-interval 2
# END:updateinterval# Center the window list
# START:centerwindowlist
set -g status-justify centre
# END:centerwindowlist# enable vi keys.
# START:vikeys
setw -g mode-keys vi
# END:vikeys# desable automaic-rename
setw -g automatic-rename off
# END: automatic-rename# unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection

# bind -n F12 send-keys "mycustombind..\r"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值