2009-10-14 20:02:17 +0000 2009-10-14 20:02:17 +0000
50
50
Advertisement

如何让Mac中的终端垂直分割执行不同的操作?

Advertisement

每隔一段时间,我就会看到有人在他们的Mac上使用看起来像终端机的东西,只是在看起来像是一个窗口的地方,他们有一个垂直的 “分割"。在分割的一侧,他们有emacs或其他东西,而在另一侧他们有其他东西。

我怎么能在同一个终端窗口中同时发生两件独立的事情,并被垂直分割开来?看上去很像分割窗格,但分割窗格是水平分割,而且动作在窗格中是镜像的。

Advertisement
Advertisement

答案 (10)

29
29
29
2009-10-14 20:08:28 +0000

可能是GNU Screen垂直分割

它应该已经安装在你的Mac上了,在终端输入screen

你也可以这样做用emacs本身

24
24
24
2013-09-27 05:39:35 +0000

这里下载iTerm2 for macOSX。

使用cmd + d进行垂直分割,cmd + shift + d进行水平分割

要在垂直分割之间以左/右或上/下的方式导航,使用cmd + [cmd +]

我推荐iTerm 2是因为这些功能.

另外,我喜欢按cmd + ;

时发生的自动完成功能,简而言之功能包括以下几点。

  • 分割窗格
  • 热键窗口
  • 搜索
  • 自动完成
  • 无鼠标复制
  • 粘贴历史
  • 即时重放
  • 可配置性
  • 全屏
  • 256 色
  • 类 Unix
  • 可读性
  • 鼠标报告
  • Growl 支持
  • Exposé 标签
  • 标签配置文件
  • 多语言。
20
Advertisement
20
20
2016-10-07 09:44:36 +0000
Advertisement

如果你喜欢在全屏状态下使用终端窗口,你可以使用macOS内置的屏幕分割功能,比如。

1.打开两个终端窗口 2. 将其中一个终端窗口切换为全屏 3. 激活 “任务控制"(默认:F3) 4. 将第二个终端窗口拖到第一个终端窗口的全屏空间 5. 享受垂直分割的全屏终端窗口

你可以用⌘-[和⌘-]切换键盘焦点。

11
11
11
2016-08-03 21:17:06 +0000

Tmux允许你将屏幕垂直或水平地分成两半。

# install tmux
brew install tmux # on mac
sudo apt-get install tmux # on debian

# run it
tmux

# split the screen vertically using this shortcut
CTRL+B %

# split the screen horizontally using this shortcut
CTRL+B "

# switch between screens using this shortcut
CTRL+B o

…。

6
Advertisement
6
6
2014-06-19 04:07:36 +0000
Advertisement

John T的公认答案(GNU屏幕,用screen访问)是我需要的,但我需要花几分钟时间学习一些基础知识才能使它有用。以下是我所需要的键绑定的跳板(直接从手册页面上下载)–注意你需要安装垂直分割的GNU版本(列在我的Mavericks中的FAU版本之后)。

另外,我强烈建议你略过man screen,看看什么适合你的需求。你可以随时使用屏幕启动另一个终端,然后阅读手册……

Screen 版本 4.00.03 (FAU) 23-Oct-06

(包含在 Mavericks 中,很可能在之前的版本中也有类似的功能)

The following table shows the default key bindings: C-a ' (select) Prompt for a window name or number to switch to. C-a " (windowlist -b) Present a list of all windows for selection. C-a 0 (select 0) a| a| C-a 9 (select 9) C-a - (select -) Switch to window number 0 - 9, or to the blank window. C-a tab (focus) Switch the input focus to the next region. See also split, remove, only. C-a C-a (other) Toggle to the window displayed previously. Note that this binding defaults to the command character typed twice, unless overridden. For instance, if you use the option "-e]x", this command becomes "]]".

C-a S (split) Split the current region into two new ones.

……。

C-a ? (help) Show key bindings. C-a \ (quit) Kill all windows and terminate screen.

C-a \* (displays) Show a listing of all currently attached displays.

附加项目与'屏幕版本4.02.01 (GNU) 28-Apr-14’

(刚才使用sudo port install screen安装)

上述4.00.02 (FAU)版本的所有项目,以及。

C-a S (split) Split the current region horizontally into two new ones. See also only, remove, focus.

同上,但这说明它是水平的。…

C-a | (split -v) Split the current region vertically into two new ones.
3
3
3
2011-10-11 05:03:24 +0000

当你在屏幕上垂直分割后,你可以键入屏幕来创建新的实例,或者你也可以使用iTerm或iTerm2来使用垂直分割。或者你也可以使用iTerm或iTerm2,它们可以使用垂直分割。请看这个链接来了解分割的窗格。www.iterm2.com/#/section/features/split_panes

2
Advertisement
2
2
2013-07-04 00:40:01 +0000
Advertisement

和John T关于screen的回答非常相似,但你也可以用tmux http://tmux.sourceforge.net/ )来实现。与screen相比,tmux的好处是垂直分割功能即使在你可以从package(Macports或Mac的homebrew,ubuntu的apt-get等)中得到的版本中也有。

1
1
1
2019-12-31 12:43:53 +0000

根据这里,原生终端(MacOS 10.15)支持通过使用Command-D.和Shift-Command-D来水平分割窗格来关闭窗格。

我觉得很奇怪,没有垂直分割。

1
Advertisement
1
1
2009-10-15 06:23:33 +0000
Advertisement

要在emacs中分割这个文件,使用ctrl + x, b(control和x在一起,然后b)切换到另一个已经打开的缓冲区。你也可以点击底部的文件名来切换到另一个缓冲区。

下面是调整窗口大小的快捷键列表,以及使用emacs做更多的事情链接文本

0
0
0
2009-10-15 07:03:24 +0000

这怎么可能,在同一个终端窗口中同时发生两件独立的事情,并以垂直分割的方式划分?

你可以说这基本上就是在同一个窗口中运行两个程序。

在OS X Snow Leopard中,水平分割 是内置的,但这确实是一个镜像功能。另请参见Mac OS X Snow Leopard - 分割终端窗口

Advertisement

相关问题

12
5
13
8
7
Advertisement