Date
May. 19th, 2024
 
2024年 4月 12日

Post: Power your terminal using Tmux

Power your terminal using Tmux

Published 06:05 May 02, 2023.

Created by @ezra. Categorized in #macOS, and tagged as #UNIX/Linux, #macOS.

Source format: Asciidoc

Table of Content
Note

以下所有按键都区分大小写!

Tmux

安装

$ sudo apt install tmux # Debian/Ubuntu
$ sudo pacman -S tmux # Arch/LyargoOS
$ brew install tmux # macOS

Oh My Tmux

安装

安装到 $HOME 目录下:

$ cd
$ git clone https://github.com/gpakosz/.tmux.git
$ ln -s -f .tmux/.tmux.conf
$ cp .tmux/.tmux.conf.local .

按键

什么是 <prefix>

  • <prefix>Ctrl + aCtrl + b 键。

  • <prefix> c 指先按下 <prefix> 再按下 c (小写)。

  • <prefix> C-c 指先按下 <prefix> 再按下 Ctrl + c 键。

按键冲突

由于在终端中 Ctrl + a 是十分常用的按键,因此需要编辑 ~/.tmux.conf.local<prefix> 的设定。

# Use C-b as prefixes
set -gu prefix2
unbind C-a
unbind C-b
set -g prefix C-b
bind C-b send-prefix
Warning

注意,使用 Oh My Tmux 请不要编辑 ~/.tmux.conf 文件!

常用按键

  • <prefix> r 重新载入 tmux 配置

  • <prefix> - 纵向分屏

  • <prefix> _ 横向分屏

  • <prefix> C-h<prefix> C-l 导航到上一个/下一个窗口

  • <prefix> H / <prefix J> / <prefix> K / <prefix> L 调整窗口大小

  • <prefix> h / <prefix j> / <prefix> k / <prefix> l 窗口间导航

  • <prefix> > / <prefix> < 交换窗口

  • <prefix> + 最大化/复原当前窗口

  • <prefix> m 开启/关闭鼠标模式

Pinned Message
HOTODOGO
I'm looking for a SOFTWARE PROJECT DIRECTOR / SOFTWARE R&D DIRECTOR position in a fresh and dynamic company. I would like to gain the right experience and extend my skills while working in great teams and big projects.
Feel free to contact me.
For more information, please view online résumé or download PDF
本人正在寻求任职 软件项目经理 / 软件技术经理 岗位的机会, 希望加⼊某个新鲜⽽充满活⼒的公司。
如有意向请随时 与我联系
更多信息请 查阅在线简历下载 PDF