Skip to content

aquamacs customisation (by Dan Ross)

Dan edited this page Feb 4, 2021 · 6 revisions

Customising Aquamacs

Here's a simple but effective way of customising Aquamacs so that it opens by default with certain preferences. (Aquamacs is the default code editor used by the slippery chicken OSX app and you can also use it separately.)

NB: There are reports that this customisation can mess with native keyboard shortcuts. If this happens to you, then do let me know! [email protected]

Here's a screen-shot: screen shot

If you want to make your slippery chicken interface look similar then just copy the following code to the bottom of the init file and save. It's as easy as that!

Of course you can always hack the code to make it look however you want.

If you use the sc app, the init file can be found here: "/Applications/slippery-chicken-osx.app/Contents/Resources/sc.el"

Otherwise, it is probably here: "/.emacs" or here: "/Library/Preferences/Aquamacs Emacs/Preferences.el"

NB: I do not know where your init file is if you are not running sc on a mac using the app. You'll have to locate it for yourself.

    ;;; Aquamacs Customisation code. Just add it to your init file!

    ;; Set the colour theme and highlighting
    ;; Taken from http://www.cs.berkeley.edu/~prmohan/emacs/
    ;; Thanks to Prashanth Mohan
    (require 'color-theme)
    (color-theme-initialize)
    (color-theme-clarity)
    (defface hl-line '((t (:background "DarkSlateGrey")))
     "Face to use for `hl-line-face'." :group 'hl-line)
    (setq hl-line-face 'hl-line)
    (global-hl-line-mode t) ; turn it on for all modes by default

    ;; Turn on line numbering
    (global-linum-mode t)

    ;; Sizes of the new panes in 1280 x 800 display
    (setq default-frame-alist
      (add-to-list 'default-frame-alist '(width . 1680)))
    (setq default-frame-alist
      (add-to-list 'default-frame-alist '(height . 900)))

    ;; Split the window into 2 panes, left and the right (rather
    ;; than up and down)
    (split-window-horizontally)

    ;; Use the commands "control+x" followed by an arrow to 
    ;; navigate between panes
    (global-set-key (kbd "C-x `<up>`") 'windmove-up)
    (global-set-key (kbd "C-x `<down>`") 'windmove-down)
    (global-set-key (kbd "C-x `<left>`") 'windmove-left)
    (global-set-key (kbd "C-x `<right>`") 'windmove-right)

    ;; Turn on Auto Fill mode, wrap lines at 80 characters.
    (add-hook 'text-mode-hook 'turn-on-auto-fill)

    ;; DJR - Thu 13 Oct 2016 10:55:12 BST
    ;; Stop Aquamacs asking to save changes each time
    (custom-set-variables '(aquamacs-save-options-on-quit nil))
Clone this wiki locally