SkillAgentSearch skills...

Witchmacs

My emacs configuration files

Install / Use

/learn @snackon/Witchmacs
About this skill

Quality Score

0/100

Supported Platforms

Universal

Tags

README

#+STARTUP: overview #+TITLE: Witchmacs #+LANGUAGE: en #+OPTIONS: num:nil The cutest Emacs distribution

[[./gnumarisa.png]]

  • Introduction Witchmacs is a very simple and basic configuration file for Emacs. From here you can edit, remove, or add many aspects of Emacs you want. I encourage you to do so, because Emacs works best when it's customized to your own liking!
  • Why would I use this? #+BEGIN_QUOTE What's the difference between a villain and a super villain? Presentation! #+END_QUOTE Currently, the appeal of Witchmacs is seeing a cute Marisa picture everytime you start up Emacs. Also, it is a very basic config which means you can easily add, edit or remove things as you like. You can use this as a building block when making your OWN Emacs config!

#+BEGIN_QUOTE Ogres are like onions

They smell?

Yes - No! layers! onions have layers! ogres have layers! #+END_QUOTE As opposed to many other Emacs distributions, Witchmacs has ZERO customization layers which means you can just jump in, look at the config file and start editing away! After all, Emacs works best when it's customized to your own liking!

  • Quick install #+BEGIN_SRC git clone https://github.com/snackon/Witchmacs ~/.emacs.d #+END_SRC After running this command, the first time you run Emacs will download all of the specified packages in the config.org file, so please be patient!

Also, to get autocompletion on C, C++ and Java files, you'll need to install the corresponding company backend servers first (you'll be automatically prompted to do so the first time you open a relevant file)

  • Dependencies =clang= as backend for C and C++ autocompletion

=llvm= to install irony server

(optional) =mvn= maven for java project handling through =meghanada=

  • Things-to-do
  • Add and configure some extra packages
  • +Make dashboard cooler+
  • Make dashboard EVEN cooler!
  • Maybe add rotating dashboard pictures
  • +Make custom Witchmacs theme+
  • (Maybe) Make custom theme for other Marisa color schemes or different touhous
  • +Clean up/organize init.el+
  • Clean up/organize config.org
  • Optimize startup time
  • QoL section Minor quality-of-life modifications for a more pleasant Emacs experience ** Enable line numbers Emacs breaks certain modes when it has line-numbers-mode enabled, (like docview or ansi-term) so I utilize the approach of only enabling it on some major modes rather than globally #+BEGIN_SRC emacs-lisp (add-hook 'prog-mode-hook 'display-line-numbers-mode) (add-hook 'text-mode-hook 'display-line-numbers-mode) #+END_SRC ** Show parent parentheses #+BEGIN_SRC emacs-lisp (show-paren-mode 1) #+END_SRC ** Disable the default startup screen #+BEGIN_SRC emacs-lisp (setq inhibit-startup-message t) #+END_SRC ** Disable most gui elements #+BEGIN_SRC emacs-lisp (tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1) #+END_SRC ** Enable copypasting outside of Emacs #+BEGIN_SRC emacs-lisp (setq x-select-enable-clipboard t) #+END_SRC ** Disable automatic creation of backup files #+BEGIN_SRC emacs-lisp (setq make-backup-files nil) (setq auto-save-default nil) #+END_SRC ** Enable conservative scrolling #+BEGIN_SRC emacs-lisp (setq scroll-conservatively 100) #+END_SRC ** Disable ring-bell #+BEGIN_SRC emacs-lisp (setq ring-bell-function 'ignore) #+END_SRC ** Indentation #+BEGIN_SRC emacs-lisp (setq-default tab-width 4) (setq-default standard-indent 4) (setq c-basic-offset tab-width) (setq-default electric-indent-inhibit t) (setq-default indent-tabs-mode t) (setq backward-delete-char-untabify-method 'nil) #+END_SRC ** Enable prettify symbols mode #+BEGIN_SRC emacs-lisp (global-prettify-symbols-mode t) #+END_SRC ** Enable bracket pair-matching #+BEGIN_SRC emacs-lisp (setq electric-pair-pairs '( (?{ . ?}) (?( . ?)) (?[ . ?]) (?" . ?") )) (electric-pair-mode t) #+END_SRC ** Creating a new window switches your cursor to it #+BEGIN_SRC emacs-lisp (defun split-and-follow-horizontally () (interactive) (split-window-below) (balance-windows) (other-window 1)) (global-set-key (kbd "C-x 2") 'split-and-follow-horizontally)

    (defun split-and-follow-vertically () (interactive) (split-window-right) (balance-windows) (other-window 1)) (global-set-key (kbd "C-x 3") 'split-and-follow-vertically) #+END_SRC ** Transform yes-or-no questions into y-or-n #+BEGIN_SRC emacs-lisp (defalias 'yes-or-no-p 'y-or-n-p) #+END_SRC ** Easier resize bindigs Super - Control - <arrow> #+BEGIN_SRC emacs-lisp (global-set-key (kbd "s-C-<left>") 'shrink-window-horizontally) (global-set-key (kbd "s-C-<right>") 'enlarge-window-horizontally) (global-set-key (kbd "s-C-<down>") 'shrink-window) (global-set-key (kbd "s-C-<up>") 'enlarge-window) #+END_SRC ** Highlight current line #+BEGIN_SRC emacs-lisp (global-hl-line-mode t) #+END_SRC ** Defer loading most packages for quicker startup times #+BEGIN_SRC emacs-lisp (setq use-package-always-defer t) #+END_SRC

  • =Org= mode ** Description One of the main selling points of Emacs! no Emacs distribution is complete without sensible and well-defined org-mode defaults ** Code #+BEGIN_SRC emacs-lisp (use-package org :config (add-hook 'org-mode-hook 'org-indent-mode) (add-hook 'org-mode-hook '(lambda () (visual-line-mode 1))))

    (use-package org-indent :diminish org-indent-mode)

    (use-package htmlize :ensure t) #+END_SRC

  • Eshell ** Why Eshell? We are using Emacs, so we might as well implement as many tools from our workflow into it as possible *** Caveats Eshell cannot handle ncurses programs and in certain interpreters (Python, GHCi) selecting previous commands does not work (for now). I recommend using eshell for light cli work, and using your external terminal emulator of choice for heavier tasks ** Prompt #+BEGIN_SRC emacs-lisp (setq eshell-prompt-regexp "^[^αλ\n]*[αλ] ") (setq eshell-prompt-function (lambda nil (concat (if (string= (eshell/pwd) (getenv "HOME")) (propertize "~" 'face (:foreground "#99CCFF")) (replace-regexp-in-string (getenv "HOME") (propertize "~" 'face (:foreground "#99CCFF")) (propertize (eshell/pwd) 'face (:foreground "#99CCFF")))) (if (= (user-uid) 0) (propertize " α " 'face (:foreground "#FF6666")) (propertize " λ " 'face `(:foreground "#A6E22E"))))))

    (setq eshell-highlight-prompt nil) #+END_SRC ** Aliases #+BEGIN_SRC emacs-lisp (defalias 'open 'find-file-other-window) (defalias 'clean 'eshell/clear-scrollback) #+END_SRC ** Custom functions *** Open files as root #+BEGIN_SRC emacs-lisp (defun eshell/sudo-open (filename) "Open a file as root in Eshell." (let ((qual-filename (if (string-match "^/" filename) filename (concat (expand-file-name (eshell/pwd)) "/" filename)))) (switch-to-buffer (find-file-noselect (concat "/sudo::" qual-filename))))) #+END_SRC *** Super - Control - RET to open eshell #+BEGIN_SRC emacs-lisp (defun eshell-other-window () "Create or visit an eshell buffer." (interactive) (if (not (get-buffer "eshell")) (progn (split-window-sensibly (selected-window)) (other-window 1) (eshell)) (switch-to-buffer-other-window "eshell")))

    (global-set-key (kbd "<s-C-return>") 'eshell-other-window) #+END_SRC

  • Use-package section ** Initialize =auto-package-update= *** Description Auto-package-update automatically updates and removes old packages *** Code #+BEGIN_SRC emacs-lisp (use-package auto-package-update :defer nil :ensure t :config (setq auto-package-update-delete-old-versions t) (setq auto-package-update-hide-results t) (auto-package-update-maybe)) #+END_SRC ** Initialize =diminish= *** Description Diminish hides minor modes to prevent cluttering your mode line *** Code #+BEGIN_SRC emacs-lisp (use-package diminish :ensure t) #+END_SRC *** Historical 22/04/2019: This macro was provided by user [[https://gist.github.com/ld34/44d100b79964407e5ddf41035e3cd32f][ld43]] after I couldn’t figure out how to make diminish work by being at the top of the config file.

#+BEGIN_SRC emacs-lisp ;(defmacro diminish-built-in (&rest modes) ; "Accepts a list MODES of built-in emacs modes and generates with-eval-after-load diminish forms based on the file implementing the mode functionality for each mode." ; (declare (indent defun)) ; (let* ((get-file-names (lambda (pkg) (file-name-base (symbol-file pkg)))) ; (diminish-files (mapcar get-file-names modes)) ; (zip-diminish (-zip modes diminish-files))) ; (progn ; ,@(cl-loop for (mode . file) in zip-diminish ; collect (with-eval-after-load ,file ; (diminish (quote ,mode))))))) ; This bit goes in init.el ;(diminish-built-in ; beacon-mode ; which-key-mode ; page-break-lines-mode ; undo-tree-mode ; eldoc-mode ; abbrev-mode ; irony-mode ; company-mode ; meghanada-mode) #+END_SRC

27/05/2019: Since the diminish functionality was always built-in in use-package, there was never a point in using a diminish config. lol silly me ** Initialize =spaceline= *** Description I tried spaceline and didn't like it. What I did like was its theme *** Code #+BEGIN_SRC emacs-lisp (use-package spaceline :ensure t) #+END_SRC ** Initialize =powerline= and utilize the spaceline theme *** Description I prefer powerline over spaceline, but the default powerline themes don't work for me for whatever reason, so I use the spaceline theme *** Code #+BEGIN_SRC emacs-lisp (use-package powerline :ensure t :init (spaceline-spacemacs-theme) :hook ('after-init-hook) . 'powerline-reset) #+END_SRC ** Initialize =dashboard= *** Description The frontend

Related Skills

View on GitHub
GitHub Stars163
CategoryDevelopment
Updated5d ago
Forks13

Languages

Emacs Lisp

Security Score

80/100

Audited on Mar 31, 2026

No findings