Skip to content

Instantly share code, notes, and snippets.

@HouCoder
Last active April 21, 2016 06:14

Revisions

  1. HouCoder revised this gist Apr 21, 2016. No changes.
  2. HouCoder revised this gist Dec 14, 2014. 1 changed file with 23 additions and 4 deletions.
    27 changes: 23 additions & 4 deletions .tmux.config
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,22 @@
    # 将前置按键设置为Ctrl+a
    unbind C-b
    set -g prefix C-a
    bind C-a send-prefix
    # 前置按键(bind-key)为Ctrl+b
    # 一些基础的命令:

    # list all sessions: tmux ls
    # create a session: tmux new -s [new-session-name]
    # attach to a session: tmux a -t [session-name]
    # switch Sessions: tmux switch -t [session-name]

    # 一些基础的快捷键
    # bind-key ( 上一个Session
    # bind-key ) 下一个Session
    # bind-key L 最后一个Session
    # bind-key s 从session列表中选择session
    # bind-key ? 显示所有命令及说明

    # bind-key % 将session分割为左右两个面板
    # bind-key " 将session分割为上下两个面板

    # bind-key d 跳出当前session

    # 切换面板
    bind-key k select-pane -U
    @@ -16,7 +31,11 @@ setw -g mode-keys vi
    set -g history-limit 10000

    # 调整面板大小
    # 向左
    bind Left resize-pane -L 5
    # 向右
    bind Right resize-pane -R 5
    # 向下
    bind Down resize-pane -D 5
    # 向上
    bind Up resize-pane -U 5
  3. HouCoder created this gist Jun 14, 2014.
    22 changes: 22 additions & 0 deletions .tmux.config
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # 将前置按键设置为Ctrl+a
    unbind C-b
    set -g prefix C-a
    bind C-a send-prefix

    # 切换面板
    bind-key k select-pane -U
    bind-key j select-pane -D
    bind-key h select-pane -L
    bind-key l select-pane -R

    # 将copy-mode的快捷键设置为VI模式
    setw -g mode-keys vi

    # 设置终端滚动最大历史记录
    set -g history-limit 10000

    # 调整面板大小
    bind Left resize-pane -L 5
    bind Right resize-pane -R 5
    bind Down resize-pane -D 5
    bind Up resize-pane -U 5