tmux 很赞啊!

2013-06-22 19:38:23 +08:00
 chuhades
http://en.wikipedia.org/wiki/Tmux
10135 次点击
所在节点    tmux
49 条回复
firsthym
2013-06-28 09:09:58 +08:00
不错的分享
openroc
2013-06-28 09:32:11 +08:00
贴个配置文件,版本大于1.7

#!/usr/local/bin/tmux
# vim: syntax=tmux

# rebind bind key (screen)
#set -g prefix C-a
#bind C-a last-window

#
bind C-b last-window
bind C-z run-shell '/usr/local/bin/tmux-zoom.sh'

# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."

# troggle statusbar
bind q set status

# display time
set -g display-time 2500

set -g history-limit 65535

# Look good
#set -g default-terminal "screen-256color"

# Start tab numbering at 1
set -g base-index 1

# Enable mouse support
setw -g mode-mouse off
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on

# enable resize for attaching via different resolution display
setw -g aggressive-resize on

# enable monitor
setw -g monitor-activity on
set -g visual-activity on

# Act like Vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# use different keys to split vertical and horizonal
bind | split-window -h
bind - split-window -v

bind -n M-v split-window -h
bind -n M-s split-window -v

#--Status-Bar-------------------------------------------------------------------
# status bar
set -g status-utf8 on

# Default colors
set -g status-bg black
set -g status-fg white

## Left side of status bar : Show session-name and host-name
set -g status-left-length 20
set -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[fg=green]]'

## Middle of status bar, window labels
#Inactive
setw -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
# Current or active
setw -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
# Alerted window in status bar. Windows which have an alert (bell, activity or content).
setw -g window-status-bell-fg red
setw -g window-status-bell-bg white

## Right side of status bar
# show current window title, date and time in my choice of colors
set -g status-right '#[fg=green][#[fg=white]#T#[fg=green]][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]#[fg=green]]'


set -g status-position top
tinytub
2013-06-28 12:21:32 +08:00
非专职开发人员表示,xshell这类的工具已经够用了...
chaker
2013-06-28 12:44:05 +08:00
@sdpfoue 装在自己的home里啊,-prefix=~/bin
saharabear
2013-07-06 01:30:57 +08:00
@likuku 我也用screen习惯了,所谓的分屏功能,基本上用Emacs就替代了.目前连screen的多窗口也不用了,现在我居然搞成了screen+Emacs, screen单屏操作.
venmos
2013-07-06 16:19:48 +08:00
我的Tmux Configure => https://gist.github.com/venmos/5939219

预览

tioover
2013-07-07 00:14:55 +08:00
用了半天,感觉还是没多大用,zsh + gnome 的虚拟终端就够了,tty 下倒是比较实用。
tioover
2013-07-07 00:40:24 +08:00
唔,求教 man看到调整分栏大小用的是 C-上下左右,但是每次只能调整一点

M-Up, M-Down M-Left,M-Right
Resize the current pane in steps of five cells.

这里的M 是什么键

另外楼上设置里面的 Enable mouse support ,放到配置里面以后鼠标还是没办法呀。
013231
2013-07-07 04:13:45 +08:00
@tioover
Ctrl keys may be prefixed with `C-' or `^', and Alt (meta) with `M-'. -- from man page

順便說一下, 如果是OS X的Terminal, 需在Preferences -> Settings -> Keyboard裏勾上"Use option as meta key".

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/73262

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX