Skip to content

Instantly share code, notes, and snippets.

@Gavinok
Last active November 10, 2024 15:12
Show Gist options
  • Save Gavinok/38975384c4a46c291103e7b220dc25e9 to your computer and use it in GitHub Desktop.
Save Gavinok/38975384c4a46c291103e7b220dc25e9 to your computer and use it in GitHub Desktop.
A minimal emacs configuration using evil mode and use-package
;;; Startup
;;; PACKAGE LIST
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
;;; BOOTSTRAP USE-PACKAGE
(package-initialize)
(setq use-package-always-ensure t)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile (require 'use-package))
;;; UNDO
;; Vim style undo not needed for emacs 28
(use-package undo-fu)
;;; Vim Bindings
(use-package evil
:demand t
:bind (("<escape>" . keyboard-escape-quit))
:init
;; allows for using cgn
;; (setq evil-search-module 'evil-search)
(setq evil-want-keybinding nil)
;; no vim insert bindings
(setq evil-undo-system 'undo-fu)
:config
(evil-mode 1))
;;; Vim Bindings Everywhere else
(use-package evil-collection
:after evil
:config
(setq evil-want-integration t)
(evil-collection-init))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment