gpt4 book ai didi

tmux - 在 tmuxinator 项目中指定 Pane 百分比

转载 作者:行者123 更新时间:2023-12-03 04:59:24 26 4
gpt4 key购买 nike

如何在 tmuxinator 中指定 Pane 百分比?

例如:

 project_name: ad_dev
project_root: ~/Programming/WWW/Rails/projects/ApparelDreamDev
rvm: ruby-1.9.2-p290@apparel_dev
pre: SQL
tabs:
- editor:
layout: main-vertical
panes:
- vim 75%
- #empty, will just run plain bash
- top

例如:vim Pane 将占据屏幕的 75%...有没有办法指定这一点?或者我应该查看文档中的哪里?好像到处都找不到。

最佳答案

布局应在 layout: 行中指定。但您并不限于五种预设布局(例如 main-vertical)。来自 man page :

In addition, select-layout may be used to apply a previously used layout - 
the list-windows command displays the layout of each window in a form
suitable for use with select-layout. For example:

$ tmux list-windows
0: ksh [159x48]
layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
$ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}

tmux automatically adjusts the size of the layout for the current window
size. Note that a layout cannot be applied to a window with more panes
than that from which the layout was originally defined.

首先按照您喜欢的方式设置布局 - 您可以使用 resize-pane 调整宽度,直到它适合您。然后运行 ​​tmux list-windows。然后您应该能够使用 tmuxinator.conf 中未更改的输出中的 layout:

因此,根据您要点的输出:

0: tmux [208x73] [layout b147,208x73,0,0[208x62,0,0,208x10,0,63{104x10,0,63,103x10,105,63}]] (active)

tmuxinator conf 文件的相关部分应该是:

  - editor:
layout: b147,208x73,0,0[208x62,0,0,208x10,0,63{104x10,0,63,103x10,105,63}]
panes:
- vim
- #empty, will just run plain bash
- top

关于tmux - 在 tmuxinator 项目中指定 Pane 百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9812000/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com