dotfiles/emacs/.emacs.d/config.org

4.2 KiB

Emacs Configuration from TuDatTr

Preface

Before installing and using emacs, emacs should be run as a daemon. This decreases the loading times of the editor enormously and enables you to return to your former emacs session at any time. To do this you first need to make sure emacs --daemon is run during the start up. To access the daemonized emacs you can either run emacsclient -t to use it in the terminal or simply emacsclient if you want to use the GUI version.

Package installation

Preperation

Initialize Emacs builtin package system and add the melpa-package repository.

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

Package installation

use-package

A use-package declaration for simplifying your .emacs

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

(require 'use-package)
(setq use-package-always-ensure t)

diminish

Diminished modes are minor modes with no modeline display

(use-package diminish)

no-littering

Help keeping ~/.emacs.d clean

(use-package no-littering)

evil/evil-collection

The extensible vi layer for Emacs. A set of keybindings for evil-mode

(use-package evil
:init
(setq evil-want-keybinding nil)
:config
(evil-mode 1)
(setq evil-search-module 'evil-search))

(use-package evil-collection
:config
(evil-collection-init))

Ivy/Counsil/Swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!

(use-package prescient)

(use-package ivy-prescient
:config
(ivy-prescient-mode 1))

(use-package ivy)

(use-package counsel  
:diminish counsel-mode
:config
(counsel-mode 1))

(use-package swiper
:bind (("C-s" . 'swiper)))

ox-reveal

Exports Org-mode contents to Reveal.js HTML presentation.

(use-package ox-reveal)

ox-twbs

Export org-mode docs as HTML compatible with Twitter Bootstrap.

(use-package ox-twbs)

org-bullets

utf-8 bullets for org-mode

(use-package org-bullets)

Appearance

This section is for appearance customization. Either via packages or manually.

moe-theme

A customizable colorful eye-candy theme for Emacser. Moe, moe, kyun!

(use-package moe-theme
:config
(moe-dark))

Transparent Emacs

Makes the default color of the background of emacs the same as the terminals color. This is kind of a janky solution, but it works.

(add-hook 'window-setup-hook
   '(lambda ()
(set-face-background 'default "unspecified-bg")))

Menubar

Remove the menu-bar at the top of the screen for better immersion.

(menu-bar-mode -1)

Emacs Configuration

Symbolic Links

Follow symlinks without asking for confirmation.

(setq vc-follow-symlinks t)

Mode Configuration

Org-Mode

Always unfold every section in org files.

(add-hook 'org-mode-hook #'org-show-all)

Enable org-bullets and hide leading stars.

(add-hook 'org-mode-hook 
(lambda () 
 (org-bullets-mode 1)))