Skip to content
My emacs config
Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Inspired by


(unless (package-installed-p 'use-package)
  (package-install 'use-package))


Shows the total number of matches of a search

(global-anzu-mode +1)

column enforce mode

subtly tells you which characters infringe upon the 80 char limit

(use-package column-enforce-mode
  :ensure t
  :diminish column-enforce-mode
  (setq column-enforce-column 99)
    (add-hook 'prog-mode-hook 'column-enforce-mode)))


(use-package evil
  :ensure t
  ;; Make Evil's point behave more like Emacs'
  (setq evil-want-change-word-to-end nil)
  (setq evil-move-cursor-back nil)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)
;("SPC f" . ido-find-file)
(require 'ido-vertical-mode)
(ido-mode 1)
(ido-vertical-mode 1)
(setq ido-vertical-define-keys 'C-n-and-C-p-only)
(use-package org-bullets
 :ensure t
 (setq org-bullets-bullet-list
  '("" "" "" "" "" ""))
 (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
  '(org-level-1 ((t (:inherit outline-1 :height 1.2))))
  '(org-level-2 ((t (:inherit outline-2 :height 1.1))))
  '(org-level-3 ((t (:inherit outline-3 :height 1.0))))
  '(org-level-4 ((t (:inherit outline-4 :height 0.9))))
  '(org-level-5 ((t (:inherit outline-5 :height 1.8))))
(use-package restart-emacs
  :ensure t
  :bind* (("C-x M-c" . restart-emacs)))

evil commentary

Port of vim’s commentary plugin



(package-install 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)

rainbow delimeters

;;start the mode automatically in most programming modes (requires Emacs 24+)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)

shrink whitespace

(use-package shrink-whitespace
  :ensure t
  :bind* (("M-m g SPC" . shrink-whitespace)))


M-x autocompletion using Ido

(use-package smex
  :ensure t
  (("M-x" . smex)))


move more things into this section

Make a list of modes that are enabled by default but are not useful and disable them

(dolist (mode
         '(tool-bar-mode                ; No toolbars, more room for text
           scroll-bar-mode              ; No scroll bars either
	   menu-bar-mode                ; No menu bar
           blink-cursor-mode))          ; The blinking cursor gets old
  (funcall mode 0))

Line numbers


; Temporary solution (not relative)
(when (version<= "26.0.50" emacs-version )


To prevent accidentally closing emacs (happens to me all the time in i3wm)

(setq confirm-kill-emacs 'y-or-n-p)


LaTex configuration

latex-mode, not tex-mode, should be started when the file extension is .tex

(add-to-list 'auto-mode-alist '("\\.tex\\'" . latex-mode))

Markdown mode

.md files should open in markdown-mode

(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))

Match parenthesis

(show-paren-mode 1)
(setq show-paren-delay 0)

put backup files in a dedicated directory to prevent clutter

(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
  backup-by-copying t    ; Don't delink hardlinks
  version-control t      ; Use version numbers on backups
  delete-old-versions t  ; Automatically delete excess backups
  kept-new-versions 20   ; how many of the newest versions to keep
  kept-old-versions 5    ; and how many of the old

Time in modeline

Useful when in fullscreen mode in i3wm

(display-time-mode 1)
;(setq display-time-format "%I:%M:%S")

‘yes’ or ‘no’

(fset 'yes-or-no-p 'y-or-n-p)



(defun red/dashboard-banner ()
       """Set a dashboard banner including information on package init time and garbage collections."""
       (setq dashboard-banner-logo-title
             (format "Emacs ready in %.2f seconds with %d garbage collections."
                     (float-time (time-subtract after-init-time before-init-time)) gcs-done)))

     (use-package dashboard
       :ensure t
       (add-hook 'after-init-hook 'dashboard-refresh-buffer)
       (add-hook 'dashboard-mode-hook 'red/dashboard-banner)
       ;;(setq dashboard-banner-logo-title "If Brute force doesn't solve your problem, You aren't using enough")
       (setq dashboard-startup-banner "~/.emacs.d/logo_small.png")

       (defun dashboard-insert-space ()
         (insert ""))

       (setq dashboard-items '((recents . 10)
                               ;;(projects . 5)
                               ;;(agenda . 5)

icon set

(use-package all-the-icons)

telephone modeline

;(use-package telephone-line
;  :ensure t
;  :config
;  (setq telephone-line-primary-right-separator 'telephone-line-abs-left
;        telephone-line-secondary-right-separator 'telephone-line-abs-hollow-left)
;  (setq telephone-line-height 30
;        telephone-line-evil-use-short-tag t)
;  (telephone-line-mode 1)
;  )
;(setq battery-mode-line-format "  %p%% %t  ")
;(setq display-time-default-load-average nil)
;; (display-battery-mode 1) -- not for desktop
;(display-time-mode 1)

Doom modeline

(use-package doom-modeline
      :ensure t
      :hook (after-init . doom-modeline-mode))

;; Whether display the icon for major mode. It respects `doom-modeline-icon'.
(setq doom-modeline-major-mode-icon t)

;; Whether display color icons for `major-mode'. It respects
;; `doom-modeline-icon' and `all-the-icons-color-icons'.
(setq doom-modeline-major-mode-color-icon t)

;; The maximum displayed length of the branch name of version control.
(setq doom-modeline-vcs-max-length 12)

Doom themes

(require 'doom-themes)

;; Global settings (defaults)
(setq doom-themes-enable-bold t    ; if nil, bold is universally disabled
      doom-themes-enable-italic t) ; if nil, italics is universally disabled

;; Load the theme (doom-one, doom-molokai, etc); keep in mind that each theme
;; may have their own settings.
(load-theme 'doom-one t)

;; Enable flashing mode-line on errors

;; Enable custom neotree theme (all-the-icons must be installed!)
;; or for treemacs users

;; Corrects (and improves) org-mode's native fontification.

icon set

(require 'all-the-icons)
You can’t perform that action at this time.