如何在 tmux 中终止窗口? [英] How to terminate a window in tmux?
本文介绍了如何在 tmux 中终止窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 tmux 中终止一个窗口?就像 Ctrlak 快捷方式在 screen 以 Ctrla 为前缀.
How to terminate a window in tmux? Like the Ctrlak shortcut in screen with Ctrla being the prefix.
推荐答案
Kent 的回答完全回答了您的问题,但是如果您希望将 tmux 的配置更改为类似于 GNU Screen,这里是我使用过的 tmux.conf实现这一点:
Kent's response fully answered your question, however if you are looking to change tmux's configuration to be similar to GNU Screen, here's a tmux.conf that I've used to accomplish this:
# Prefix key
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Keys
bind k confirm kill-window
bind K confirm kill-server
bind % split-window -h
bind : split-window -v
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
bind . command-prompt
bind a last-window
bind space command-prompt -p index "select-window"
bind r source-file ~/.tmux.conf
# Options
set -g bell-action none
set -g set-titles on
set -g set-titles-string "tmux (#I:#W)"
set -g base-index 1
set -g status-left ""
set -g status-left-attr bold
set -g status-right "tmux"
set -g pane-active-border-bg black
set -g pane-active-border-fg black
set -g default-terminal "screen-256color"
# Window options
setw -g monitor-activity off
setw -g automatic-rename off
# Colors
setw -g window-status-current-fg colour191
set -g status-bg default
set -g status-fg white
set -g message-bg default
set -g message-fg colour191
这篇关于如何在 tmux 中终止窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文