通过emacs的打开多个文件分割垂直-nw [英] opening more than one file split vertically through emacs -nw

查看:228
本文介绍了通过emacs的打开多个文件分割垂直-nw的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用的emacs -nw文件1文件2 我可以一次打开多个文件。然而,Emacs会在水平分割打开它们。有没有一种方法来设置默认的拆分行为,以垂直?我看过:

Using emacs -nw file1 file2 I can open multiple files at once. However, emacs will open them in horizontal splits. Is there a way to set default split behavior to vertical? I have looked at:

ToggleWindowSplit

如果我能有emacs的调用自动每次我打开多个文件,会做什么,我期待的。

If I could have emacs call that automatically every time I open multiple files that would do what I am looking for.

我也看了一下这个SO职位。
他们的加入建议(setq分高阈值无)(setq裂宽度阈值0)〜/的.emacs 并没有为我工作。我已经单独和共同尝试过。

I also looked at this SO post. Their suggestion of adding (setq split-height-threshold nil) and (setq split-width-threshold 0) in ~/.emacs did not work for me. I have tried them separately and together.

推荐答案

在您的init文件,添加切换窗口分割函数code。然后,code的下面一行添加到您的init文件:

In your init file, add the toggle-window-split function code. Then, add the following line of code to your init file:

(add-hook 'emacs-startup-hook 'toggle-window-split)

这将调用自动切换窗口分割功能,每次启动emacs的时间。如果你启动emacs的在命令行上2档,他们将被显示在垂直分割。

This will call the toggle-window-split function automatically every time you startup emacs. If you startup emacs with 2 files on the command line, they will be displayed in vertical splits.

这篇关于通过emacs的打开多个文件分割垂直-nw的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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