ediff

编程入门 行业动态 更新时间:2024-10-25 22:35:11
本文介绍了ediff-split-window-function 水平==垂直?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

CentOs 6 上的 Emacs 23.1.1 Ediff 2.81.2

Emacs 23.1.1 Ediff 2.81.2 on CentOs 6

在进行任何自定义之前,默认情况下,Ediff 会水平拆分窗口(一个在另一个之上).

Prior to any customization, Ediff would, by default, split the windows horizontally (one on top of the other).

我希望它们并排,所以我尝试将以下几行添加到我的 .emacs

I wanted them side by side so I tried adding the following lines to my .emacs

(setq ediff-split-window-function 'split-window-vertically)
(setq ediff-merge-split-window-function 'split-window-vertically)

这没有效果 - 窗户仍然水平分割.我还尝试使用 Emacs 自定义界面为 Ediff 获取默认情况下的垂直拆分 - 相同的故事.

This had no effect - the windows were still split horizontally. I also tried using the Emacs Customization interface for Ediff to get the vertical split by default - same story.

请注意,我在与垂直拆分的两个缓冲区进行比较时尝试了此方法.我也在缓冲区中没有打开文件的情况下尝试过,并要求 Ediff 比较两个文件 - 结果相同.

Note that I tried this in a comparison with two buffers that were vertically split. I also tried it with no files open in buffers and asked Ediff to compare two files - same result.

然后我尝试将 split-window-horizo​​ntally 指定为 ediff-split 和 ediff-merge 的拆分窗口函数.

Then I tried specifying split-window-horizontally as the split window function for both ediff-split and ediff-merge.

(setq ediff-split-window-function 'split-window-horizontally)
(setq ediff-merge-split-window-function 'split-window-horizontally)

这导致窗口垂直拆分(彼此相邻).当我注释掉这些行并使用 Emacs 自定义界面来设置这些选项时也是如此.

This caused the windows to split vertically (next to each other). This was also true when I commented out these lines and used the Emacs Customization interface to set these options.

是的,我看过这个问题,但我不想要在全球范围内消除水平拆分 - 我只是希望 Ediff 默认这样做.

And yes, I've seen this question but I don't want to eliminate horizontal splitting on a global basis - I just want Ediff to do it by default.

我是疯了还是有人改变了水平"和垂直"的含义(顺便说一句,我将垂直"和水平"的定义从我的 O' 副本中分离出来Reilly 书学习 Gnu Emacs")?

Am I losing my mind or has someone switched the meaning of "horizontal" and "vertical" (and by the way, I'm taking the definition of "vertical" and "horizontal" splitting from my copy of the O'Reilly book "Learning Gnu Emacs")?

推荐答案

我使用了 emacs 变量自定义,通过 C-h v ediff-split-window-function 调用来更改值.单击保存以备将来使用后,以下内容被写入我的.emacs:

I used emacs variable customization, invoked with C-h v ediff-split-window-function to change the value. After clicking Save for future sessions the following was written to my .emacs:

(custom-set-variables
...
 '(ediff-split-window-function (quote split-window-horizontally))
...)

它完全符合我的要求:并排放置两个缓冲区.是的,emacs 使用水平/垂直与您的想法相反.如果你再次阅读这个问题,你会看到解释,其他人也很困惑.

And it does exactly what I want: putting the two buffers side-by-side. And yes, emacs uses horizontal/vertical in the opposite of what you had in mind. If you read this question again, you will see the explanation, others were confused, too.

这篇关于ediff-split-window-function 水平==垂直?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 23:33:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1125429.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ediff

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!