【问题标题】:Triple even-sized windows in Emacs on startup启动时 Emacs 中的三个均匀大小的窗口
【发布时间】:2012-04-27 16:51:24
【问题描述】:

我想将 Emacs 设置为最大化(或特定大小)并在启动时将我的窗口水平分成三个大小相同的框架。

我发现了其他类似但不完全的问题,Q1Q2

谢谢。

编辑:最大化,而不是全屏。

【问题讨论】:

    标签: emacs configuration window split size


    【解决方案1】:

    好的,这就是我想出的,会有更优雅的方式。尽管如此,这是你想要的。

      (defun split-windows-even-3 ()
        "split into 3 evenly"
        (interactive)
        (save-excursion
          (let ((ps (window-width)))
            (split-window-horizontally (/ ps 3))
            (other-window 1)
            (split-window-horizontally (/ ps 3)))))
    
      ;;; ADD HOOKS to startup
      ;;  split three
      (add-hook 'emacs-startup-hook 'split-windows-even-3)
    
      ;; Fullscreen 
      (add-hook 'emacs-startup-hook (lambda ()
                                      (set-frame-parameter nil 'fullscreen 'fullboth)))
    

    更新:现在可以使用 emacs23 和 emacs24

    【讨论】:

    • @NiklasHansson 它在 Emacs 24 上对我有用,你使用的是哪个版本的 emacs
    • 啊,就是这样。我在 Emacs 23 上。对不起!
    • @NiklasHansson 更改了您现在要尝试的功能
    • 感谢您抽出宝贵时间 (+1),但我仍会选择 @Nicolas Dudebout 的简单答案。
    【解决方案2】:

    要拥有相同大小的窗口,您可以使用命令balance-windows(绑定到C-x + 以进行交互使用)。

    【讨论】:

      猜你喜欢
      • 2014-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-10
      • 1970-01-01
      • 2012-09-06
      相关资源
      最近更新 更多