Emacs - 多列一个缓冲区 [英] Emacs - Multiple columns one buffer

查看:23
本文介绍了Emacs - 多列一个缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编辑一些汇编代码,这些代码往往被格式化为长而细的列表.我希望能够使用我拥有的一些水平空间并一次在屏幕上看到更多代码.有没有一种方法可以让 Emacs(或实际上是另一个编辑器)向我显示多列都指向同一个缓冲区?

C-x 3 (emacs) 和 :vsplit (vim) 非常适合代码中的多个单独视图,但我希望它从一列流向另一列(就像报纸上的文本一样).

解决方案

参见 跟随模式.摘录:

<块引用>跟随模式是一种次要模式,它使两个显示相同缓冲区的窗口作为单个高虚拟窗口"滚动.要使用跟随模式,请转到只有一个窗口的框架,使用 C-x 3 将其拆分为两个并排的窗口,然后键入 M-x follow-mode.从那时起,您可以在两个窗口中的任何一个中编辑缓冲区,或滚动其中一个;另一个窗口跟随它.在跟随模式下,如果您将点移到一个窗口中可见的部分之外并移入另一个窗口中的可见部分,则会选择另一个窗口——同样,将这两个窗口视为一个大窗口的一部分.

I'm trying to edit some assembly code which tends to be formatted in long but thin listings. I'd like to be able to use some of the acres of horizontal space I have and see more code on-screen at one time. Is there a method for getting Emacs (or indeed another editor) to show me multiple columns all pointing to the same buffer?

C-x 3 (emacs) and :vsplit (vim) are great for multiple separate views into the code, but I'd like it to flow from one column to the other (like text in a newspaper).

解决方案

See follow-mode. Excerpt:

Follow mode is a minor mode that makes two windows, both showing the same buffer, scroll as a single tall "virtual window." To use Follow mode, go to a frame with just one window, split it into two side-by-side windows using C-x 3, and then type M-x follow-mode. From then on, you can edit the buffer in either of the two windows, or scroll either one; the other window follows it. In Follow mode, if you move point outside the portion visible in one window and into the portion visible in the other window, that selects the other window—again, treating the two as if they were parts of one large window.

这篇关于Emacs - 多列一个缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆