aquamacs/emacs窗格自动分配
题
我从几周开始就使用Aquamacs,并且正在尝试找到良好的自定义。首先,我只是希望我的aquamacs在开始时看起来像这样:
我的意思是在左侧,我的源代码。在右侧,壳窗格(从CX 3 + MX壳开始)。
我在Emacs/Aquamacs论坛上以及Stackoverflow进行了一些搜索。但是我仍然对此受到阻碍。谢谢。 :)
解决方案 2
这是东西!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; C编程的东西
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;饥饿的删除很不错,因为我们使用空格而不是标签。 (setq c-luggry-delete-key t)
;让Emacs尽可能自动插入新线。 (SetQ C-Auto-Newline 1)
;启动C模式时,设置K&R压痕样式。
(添加钩'C模式钩
'(lambda ()
(c-set-style "k&r")
(auto-fill-mode 1)
))
其他提示
如果您只需要拆分窗口并在新创建的窗口中打开外壳,则应该能够添加以下内容:
(split-window-horizontally nil)
(other-window 1)
(shell nil)
(other-window 1) ;; return you to the original window.
到你的尽头 .emacs
或者 .emacs.d/init.el
取决于您的初始效果。
或者,使其成为单独的函数,并绑定到键命令。 (将它们添加到 .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)
因此,您可以在需要时使用它,而不仅仅是在启动时使用。
(它将始终显示外壳的同一实例。)
不隶属于 StackOverflow