<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tmux on pemako</title>
    <link>http://pemako.cn/tags/tmux/</link>
    <description>Recent content in Tmux on pemako</description>
    <image>
      <title>pemako</title>
      <url>http://pemako.cn/images/papermod-cover.png</url>
      <link>http://pemako.cn/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.146.6</generator>
    <language>en</language>
    <lastBuildDate>Thu, 09 Apr 2026 20:00:00 +0800</lastBuildDate>
    <atom:link href="http://pemako.cn/tags/tmux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Tmux</title>
      <link>http://pemako.cn/tools/tmux/</link>
      <pubDate>Thu, 09 Apr 2026 20:00:00 +0800</pubDate>
      <guid>http://pemako.cn/tools/tmux/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/tmux/tmu&#34;&gt;https://github.com/tmux/tmu#&lt;/a&gt; tmux 使用&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;安装&#34;&gt;安装&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install tmux
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;配置&#34;&gt;配置&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;插件安装&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;全局配置&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Enable mouse mode (tmux 2.1 and above)
set -g mouse on

#Enable oh my zsh in tmux
set -g default-command /bin/zsh

# Mouse based copy
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel &amp;#34;reattach-to-user-namespace pbcopy&amp;#34;
bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel &amp;#34;reattach-to-user-namespace pbcopy&amp;#34; 

set -g @continuum-boot &amp;#39;on&amp;#39;                         # Automatic Tmux start
set -g @continuum-restore &amp;#39;on&amp;#39;                      # Last saved environment is automatically restored when tmux is started
set -g @continuum-boot-options &amp;#39;iterm,fullscreen&amp;#39;   # start iTerm in fullscreen

# tmux 的插件管理
set -g @plugin &amp;#39;tmux-plugin/tpm&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-sensible&amp;#39;

set -g @plugin &amp;#39;tmux-plugins/tmux-resurrect&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-continuum&amp;#39;

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b &amp;#39;~/.tmux/plugins/tpm/tpm&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;重载配置文件生效&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tmux source ~/.tmux.conf
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;常用命令&#34;&gt;常用命令&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# To start tmux:
tmux

# To detach from tmux:
Ctrl-b d

# To restore tmux session:
tmux attach

# To detach an already attached session (great if you are moving devices with different screen resolutions):
tmux attach -d 

# To display session:
tmux ls

# To rename session:
Ctrl-b $

# To switch session:
Ctrl-b s

# To start a shared session:
tmux -S /tmp/your_shared_session
chmod 777 /tmp/your_shared_session

# To help screen (Q to quit):
Ctrl-b ?

# To scroll in window:
Ctrl-b PageUp/PageDown

# To reload configuation file
Ctrl-b : source-file /path/to/file

# To create a window:
Ctrl-b c

# To go next window:
Ctrl-b n

# To destroy a window:
Ctrl-b x

# To switch between windows:
Ctrl-b [0-9]
Ctrl-b Arrows

# To split windows horizontally:
Ctrl-b %

# To split windows vertically:
Ctrl-b &amp;#34;

# To swap windows:
Ctrl-b :swap-window -s [0-9] -t [0-9]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;问题总结&#34;&gt;问题总结&lt;/h2&gt;
&lt;h3 id=&#34;iterm下滚动问题&#34;&gt;iterm下滚动问题&lt;/h3&gt;
&lt;p&gt;进入iterm2 的设置 &lt;code&gt;Advanced&lt;/code&gt; 搜索 Scroll 找到 Mouse 下 &lt;code&gt;Scroll wheel sends arrow keys when in alternate screen mode.&lt;/code&gt; 修改为 &lt;code&gt;Yes&lt;/code&gt;。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
