如何在2个Windows Emacs中交换缓冲区 [英] How to swap the buffers in 2 windows emacs

查看:69
本文介绍了如何在2个Windows Emacs中交换缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用emacs,我发现有时我有2个文件分成2个窗口。

I am using emacs I find that sometimes I have 2 files separated into 2 windows.

例如:
我使用打开1个文件Cx Cf file1.c RET

,然后将帧分成两个窗口: Cx 3

and I split the frame into two windows: C-x 3

然后我打开另一个文件 Cx Cf file2.c RET

I then open another file C-x C-f file2.c RET

所以我有2个文件:

窗口1(左) file1.c

窗口2 (右) file2.c

我想知道是否有任何组合键可以交换文件?通常,当我有2个窗口时,我喜欢在左侧窗口上工作。我知道我可以轻松地通过 C-x o 将光标移至右侧窗口。

I am wondering if there is any key combination to swap the files over? Normally I like to work on the left window when I have 2 window. I know I can easily do C-x oto move the cursor to the right window.

但是,我只是想知道是否可以交换文件,以便 file2.c 在左侧窗口中并且 file1.c 在右窗口中?

However, I am just wondering if I can swap the files so that file2.c is in the left window and file1.c is in the right window?

推荐答案

为此,缓冲移动。现在,如果您正在使用左侧的缓冲区,则调用 buf-move-right会将其与右侧的缓冲区互换。我想这就是您想要的。

I use buffer-move for this. Now if you are working on the buffer on the left side, calling 'buf-move-right' will swap it with the one on the right. I guess this is what you want.

这篇关于如何在2个Windows Emacs中交换缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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