Aquamacs/Emacs 窗格自动配置

发布于 2024-10-12 05:49:31 字数 271 浏览 14 评论 0原文

我使用 Aquamacs 已经有几周了,我正在努力寻找好的定制方案。 首先,我只是希望我的 aquamacs 在启动时看起来像这样:

alt text

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

我在 emacs/aquamacs 论坛以及 stackOverflow 上进行了一些搜索。但我对此仍然受阻。 谢谢。 :)

I'm using Aquamacs since few weeks and I'm trying to find good customizations.
First, I just wanted my aquamacs to look like this on starting :

alt text

I mean on the left, my source code. and on the right a shell pane (started with C-X 3 + M-X shell).

I've done some search on emacs/aquamacs forums, and in stackOverflow too. But I'm still blocked on this.
Thanks.
:)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

莫多说 2024-10-19 05:49:31

如果您需要的只是拆分窗口并在新创建的窗口中打开 shell,您应该能够将以下内容添加

(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 实例。)

If all you need is to split the window and open the shell in the newly created window, you should be able to add this:

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

to the end of your .emacs or .emacs.d/init.el depending on how you initialise emacs.

Alternatively, make it a separate function, and bind to a key command. (add these to .emacs instead of the above code.)

e.g.

(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.
  )

And bind with

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

So you can use it when you want, and not just at startup.

(It will always show the same instance of shell.)

幸福还没到 2024-10-19 05:49:31

这是东西!

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

;; C 编程东西

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

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

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

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

(添加钩子'c-模式钩子

      '(lambda ()
         (c-set-style "k&r")
         (auto-fill-mode 1)
         ))

HEre is the stuff !!

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

;; C programming stuff

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

;; Hungry delete is nice since we use spaces instead of tabs.
(setq c-hungry-delete-key t)

;; Let emacs insert newlines automatically whenever it can.
(setq c-auto-newline 1)

;; Set the K&R indentation style when starting C-mode.

(add-hook 'c-mode-hook

      '(lambda ()
         (c-set-style "k&r")
         (auto-fill-mode 1)
         ))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文