1

几周以来我一直在使用 Aquamacs,我正在努力寻找好的定制。首先,我只是希望我的 aquamacs 在开始时看起来像这样:

替代文字

我的意思是在左边,我的源代码。右侧是 shell 窗格(从 CX 3 + MX shell 开始)。

我在 emacs/aquamacs 论坛和 stackOverflow 上进行了一些搜索。但我仍然被阻止。谢谢。:)

4

2 回答 2

2

如果您只需要拆分窗口并在新创建的窗口中打开外壳,您应该可以添加以下内容:

(split-window-horizontally nil)
(other-window 1)
(shell nil)
(other-window 1) ;; return you to the original window.

到您的末尾.emacs.emacs.d/init.el取决于您如何初始化 emacs。

或者,使其成为一个单独的函数,并绑定到一个键盘命令。(添加这些.emacs而不是上面的代码。)

例如

(defun split-window-for-shell ()
  "Split the current window and open a shell in the new window."
  (interactive)
    (split-window-horizontally nil)
    (other-window 1)
    (shell nil)
    (other-window 1) ;; return you to the original window.
  )

并绑定

(global-set-key (kbd "C-|") split-window-for-shell)

因此,您可以在需要时使用它,而不仅仅是在启动时。

(它将始终显示相同的 shell 实例。)

于 2011-01-16T01:32:31.383 回答
-2

这是东西!

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;

;; C编程的东西

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;

;; 饥饿删除很好,因为我们使用空格而不是制表符。(setq c-hungry-delete-key t)

;; 让 emacs 尽可能自动插入换行符。(setq c-auto-newline 1)

;; 启动 C 模式时设置 K&R 缩进样式。

(add-hook 'c-mode-hook

      '(lambda ()
         (c-set-style "k&r")
         (auto-fill-mode 1)
         ))
于 2011-01-21T12:42:28.030 回答