老版本的Tmux开启鼠标模式的方法: 先按Ctrl + B, 松开以后,输入冒号,输入set mouse-mode on 回车。 新版本取消了这条命令。...在新版本中,开启鼠标模式的方法为: 先按Ctrl + B, 松开以后,输入冒号,输入set -g mouse on 回车。
set -g renumber-windows on # 关掉某个窗口后,编号重排 set -g allow-rename off # 禁止活动进程修改窗口名 set -g...) set -g @plugin 'seebi/tmux-colors-solarized' set -g @plugin 'tmux-plugins/tmux-pain-control' set -g...@plugin 'tmux-plugins/tmux-prefix-highlight' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin...'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins.../tmux-yank' set -g @plugin 'tmux-plugins/tpm' # tmux-resurrect set -g @resurrect-dir '~/.tmux/resurrect
~/.tmux.conf中 # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible...' # Other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'git@github.com/...# List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -...g @plugin 'tmux-plugins/tmux-pain-control' set -g @plugin 'seebi/tmux-colors-solarized' # Other examples...: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'git@github.com/user/plugin' # set
配置tmux.config vim ~/.tmux.conf 贴入: set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible...' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @continuum-restore 'on' run '~/.tmux/plugins/tpm.../tpm' set -g default-shell /bin/zsh set -g default-command /bin/zsh set-option -g prefix2 ` bind s...setw synchronize-panes set -g default-terminal "screen-256color" set -g mouse on set-option -g allow-rename...off 使之生效: source ~/.tmux.conf
. # File: ~/.tmux.conf set -g default-terminal "screen-256color" # Mac and Ubuntu 坑 2:Change background...From the changelog: * 'select-pane' now understands '-P' to set window/pane background colours. e.g....window styles set -g window-style 'fg=colour247,bg=colour236' set -g window-active-style 'fg=colour250...,bg=black' # set the pane border colors set -g pane-border-style 'fg=colour235,bg=colour238' set -...g pane-active-border-style 'fg=colour51,bg=colour236' 坑 3:Reloading tmux config 写完配置文件后,需要手动 source 使其生效
#-- base --# set -g default-terminal "screen-256color" set -g display-time 3000 set -g history-limit...10000 set -g base-index 1 set -g pane-base-index 1 set -s escape-time 0 set -g mouse on #-- bindkeys...#-- statusbar --# set -g status-justify centre set -g status-left "#[fg=red]s#S:w#I.p#P#[default]" set...120 set -g status-right-length 120 set -g status-utf8 on set -g status-interval 1 set -g visual-activity...set -g set-titles-string '#T' set -g status-justify "centre" set -g window-status-format '#I #W' set
/tao12345666333/dotfiles/master/tmux/tmux.conf -O $HOME/.tmux.conf 常用配置的说明 基础配置 set -g default-terminal...-g status-fg '#55ff53' set -g status-bg '#0a4174' set -g status-left-fg '#55ff53' set -g status-left-bg...'#0a4174' set -g status-right-fg '#55ff53' set -g status-right-bg '#0a4174' set -g status-left-length...90 set -g status-right-length 90 set -g status-left '[#(whoami)]' set -g status-right '[#(date +" %m...-%d %H:%M ")]' set -g status-justify "centre" set -g pane-active-border-fg '#55ff53' set -g pane-border-fg
Tmux安装 yum -y install tmux Tmux个性化配置 此类配置可以在命令行模式中输入show-options -g查询 tmux加上下列参数,实现个性化设置 set-option...'#bbbbbb' set-option -g status-left-fg green set-option -g status-left-bg blue set-option -g status-right-fg...```Tmux安装 yum -y install tmux Tmux个性化配置 ``` 此类配置可以在命令行模式中输入show-options -g查询 tmux加上下列参数,实现个性化设置 set-option...```Tmux安装 yum -y install tmux Tmux个性化配置 ``` 此类配置可以在命令行模式中输入show-options -g查询 tmux加上下列参数,实现个性化设置 set-option...```Tmux安装 yum -y install tmux Tmux个性化配置 ``` 此类配置可以在命令行模式中输入show-options -g查询 tmux加上下列参数,实现个性化设置 set-option
插件准备 # 下载 tqm 到~/.tmux/plugins # tqm是tmux插件管理工具 git clone https://github.com/tmux-plugins/tpm ~/.tmux...# 保存tmux会话到disk git clone https://github.com/tmux-plugins/tmux-continuum.git # 定时保存,自动加载 在~/.tmux.conf...中配置: vim ~/.tmux.conf set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-resurrect'...set -g @plugin 'tmux-plugins/tmux-continuum' # 自动备份时间间隔60min, 默认15min set -g @continuum-save-interval...'60' set -g @continuum-restore 'on' set -g @resurrect-capture-pane-contents 'on' # Other config ..
* set -g mouse-resize-pane off * set -g mouse-select-window off # 设置默认终端模式为 256color set -g default-terminal...): # 基础设置 set -g default-terminal "screen-256color" set -g display-time 3000 set -g escape-time 0 set...-g history-limit 65535 set -g base-index 1 set -g pane-base-index 1 # 前缀绑定 (Ctrl+a) set -g prefix ^a...set -g @plugin 'tmux-plugins/tmux-resurrect' # List of plugins set -g @plugin 'tmux-plugins/tpm' set...-g @plugin 'tmux-plugins/tmux-sensible' # Other examples: # set -g @plugin 'github_username/plugin_name
如果你希望新的配置项能够立即生效; 将以下配置加入到 Tmux 的配置文件 ~/.tmux.conf 中: unbind C-b set -g prefix C-a #快捷键前缀变更为 Ctrl-a...> [200~ XTermPasteBegin() #美化 Tmux 的状态栏 # 状态栏 # 颜色 set -g status-bg black set -g...status-fg white # 对齐方式 set-option -g status-justify centre # 左下角 set-option -g status-left...setw -g automatic-rename on set-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey...[fg=dim]' # 右下角 set -g status-right '#[fg=green][#[fg=cyan]%Y-%m-%d#[fg=green]]' tmux配置效果图
: set-option -g default-shell /bin/zsh 或者使用以下配置项: set-option -g default-command /bin/zsh default-command...Tmux 2.1 之后的版本: set-option -g mouse on Tmux 2.1 之前版本: setw -g mouse-resize-pane on setw -g mouse-select-pane...on setw -g mouse-select-window on setw -g mode-mouse on 配置文件 .tmux.conf 对所有之后新建的 Tmux Session 都会起作用...-g base-index 1 # 设置窗口的起始下标为 1 set -g pane-base-index 1 # 设置面板的起始下标为 1 自定义状态栏 set -g status-utf8...on # 状态栏支持utf8 set -g status-interval 1 # 状态栏刷新时间 set -g status-justify left # 状态栏列表左对齐 setw -g monitor-activity
tee ~/.tmux.conf <<'EOF' # 取消默认按键前缀 unbind C-b # 快捷键前缀变更为 Ctrl-a set -g prefix C-a # 美化 Tmux 的状态栏...# 状态栏 # 颜色 set -g status-bg black set -g status-fg white # 对齐方式 set-option -g status-justify centre...# 左下角 set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#S#[fg=green]]' set-option -g status-left-length...20 # 窗口列表 setw -g automatic-rename on set-window-option -g window-status-format '#[dim]#I:#[default...]#W#[fg=grey,dim]' set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg
: tmux kill-session -t myname Kill all the tmux sessions: tmux ls | grep : | cut -d....To enable it, add this line to .tmux.conf: setw -g mode-keys vi With this option set, we can use h, j...* setw -g mode-mouse off * 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 set -g default-terminal "screen-256color" # enable...activity alerts setw -g monitor-activity on set -g visual-activity on # Center the window list set
# Status bar # colors set -g status-bg black set -g status-fg white # alignment set-option -g status-justify...centre # spot at left set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#S#[fg=green]]' set-option...-g status-left-length 20 # window list setw -g automatic-rename on set-window-option -g window-status-format...'#[dim]#I:#[default]#W#[fg=grey,dim]' set-window-option -g window-status-current-format '#[fg=cyan,...bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]' # spot at right set -g status-right '#[fg=green][#[fg=cyan
Tmux 快捷键 & 速查表 启动新会话: tmux [new -s 会话名 -n 窗口名] 恢复会话: tmux at [-t 会话名] 列出所有会话: tmux ls 关闭会话: tmux kill-session...要是想启用 Vi 模式,只需要把下面这一行添加到 .tmux.conf 中: setw -g mode-keys vi 启用这条配置后,就可以使用 h、j、k、l 来移动光标了。...列出所有快捷键 : 命令提示符 配置选项: 鼠标支持 - 设置为 on 来启用鼠标 setw -g mode-mouse off set -g mouse-select-pane off set -g...mouse-resize-pane off set -g mouse-select-window off 设置默认终端模式为 256color set -g default-terminal “screen...-256color” 启用活动警告 setw -g monitor-activity on set -g visual-activity on 居中窗口列表 set -g status-justify
在tmux(v1.6)默认配置下,vim的主题solarized, molokai等颜色设置都会失效 这是由于tmux term设置的问题。...需要在~/.bashrc中添加: alias tmux="TERM=screen-256color-bce tmux" 再在~/.tmux.conf中添加: set -g default-terminal..."xterm" 如果是osx,可能在~/.bashrc要添加: alias tmux="TERM=screen-256color-bce tmux" 在~/.tmux.conf中添加: set -g...参考: http://stackoverflow.com/questions/10158508/lose-vim-colorscheme-in-tmux-mode http://rhnh.net/2011.../08/20/vim-and-tmux-on-osx
接下来我们花十分钟来掌握下 tmux 的基础用法: 安装运行 macOS 上使用 Homebrew 安装即可: brew install tmux 安装完成后,运行 tmux 新建一个 tmux 的会话...shell 主进程下运行以下命令可以操作 tmux 会话: tmux new -s foo # 新建名称为 foo 的会话tmux ls # 列出所有 tmux 会话tmux a # 恢复至上一次的会话...在文件中增加以下内容: # 开启鼠标模式set -g mode-mouse on # 允许鼠标选择窗格set -g mouse-select-pane on # 如果喜欢给窗口自定义命名,那么需要关闭窗口的自动命名...set-option -g allow-rename off # 如果对 vim 比较熟悉,可以将 copy mode 的快捷键换成 vi 模式set-window-option -g mode-keys...vi 配置文件修改完成后,可以 tmux kill-server 重启所有 tmux 进程,或者在 tmux 会话中使用 ⌃b : 进入控制台模式,输入 source-file ~/.tmux.conf
最近在用screen,后来发现,tmux更好用啊。...alias vi ~/.zshrc alias tls="tmux ls" alias ta="tmux attach -t " alias tk="tmux kill-session -t" alias...ts="tmux switch -t " alias tn="tmux new -s" 编辑配置文件 touch ~/.tmux.conf vi ~/.tmux.conf set -g default-terminal...'screen-256color' # 设置默认颜色 set -g status-utf8 on # 支持 utf-8 set -g history-limit 100000 # 设置历史记录最大条数...setw -g mode-keys vi # 设置按键模式为 Vi 模式 # 把快捷键改成c-x,手短 set -g prefix C-x unbind C-b bind C-x send-prefix
里面的[ -z " # 0 is too far from ` ;) set -g base-index 1 # Automatically set window title set-window-option...-g automatic-rename on set-option -g set-titles on # set -g default-terminal screen-256color set -g...setw -g mode-keys vi #setw -g monitor-activity on setw -g mouse on set -s escape-time 50 bind c run-shell...-g default-terminal "screen-256color" # THEME set -g status off set -g status-bg colour234 set -g status-fg...white # set -g mode-style bg=white,fg=black set -g status-interval 60 set -g status-left-length 30 set