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

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

问题描述

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

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

例如:我使用 C-x C-f file1.c RET

然后我将框架分成两个窗口:C-x 3

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

然后我打开另一个文件 C-x C-f file2.c RET

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

所以我有 2 个文件:

So I have 2 files:

窗口 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?

推荐答案

我使用 buffer-move 为此.现在,如果您正在处理左侧的缓冲区,则调用 '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天全站免登陆