dea*_*an. 80
似乎tmux-2.1(2015年10月18日发布)现在允许指定单个窗格的颜色.来自更改日志:
* 'select-pane' now understands '-P' to set window/pane background colours.
Run Code Online (Sandbox Code Playgroud)
例如[从手册]将窗格1的前景(文本)更改为蓝色,将背景更改为红色使用:
select-pane -t:.1 -P 'fg=blue,bg=red'
Run Code Online (Sandbox Code Playgroud)
为了回答原始问题,我使用以下几行~/.tmux.conf
来设置背景/前景色以模仿iTerm中的行为:
#set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'
# set the pane border colors
set -g pane-border-fg colour235
set -g pane-border-bg colour238
set -g pane-active-border-fg colour236
set -g pane-active-border-bg colour250
#or if you a brighter active border, uncomment the following line:
#set -g pane-active-border-bg colour51
Run Code Online (Sandbox Code Playgroud)
我之前没有看过window-style
和window-active-style
命令,但也许它们在以前的tmux版本中可用.
此外,这两行对于轻松拆分窗格非常有用:
bind | split-window -h
bind - split-window -v
Run Code Online (Sandbox Code Playgroud)
编辑:正如Jamie Schembri在评论中提到的,tmux 2.1版(至少)现在将安装:
brew install tmux
Run Code Online (Sandbox Code Playgroud)
编辑(2017年10月):brew现在安装tmux 2.6,以上仍然有效.
编辑Vim窗格:如果您发现"非活动着色"不适用于Vim窗格,则可能是由于您使用的colourscheme.试试这个pablo
计划; 即在Vim窗格中:
:colo pablo
Run Code Online (Sandbox Code Playgroud)
要使其与您自己的自定义Vim colourscheme一起使用,请确保Normal
没有ctermbg
或guibg
指定突出显示的设置.例如,"无效着色"不适用于murphy
colourscheme,因为murphy.vim
有一行:
hi Normal ctermbg=Black ctermfg=lightgreen guibg=Black guifg=lightgreen
Run Code Online (Sandbox Code Playgroud)
那台ctermbg
或guibg
来Black
.但是,将此行更改为:
hi Normal ctermfg=lightgreen guifg=lightgreen
Run Code Online (Sandbox Code Playgroud)
将使"无效着色"工作.
没有更改窗格背景颜色的选项,但可以选择设置窗格边框颜色(样式)
pane-active-border-style style
Set the pane border style for the currently active
pane. For how to specify style, see the message-command-style option.
Attributes are ignored.
pane-border-style style
Set the pane border style for paneas aside from the
active pane. For how to specify style, see the message-command-style option.
Attributes are
ignored.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
26805 次 |
最近记录: |