Moving to Doom Emacs!

This commit is contained in:
Derek Taylor
2019-12-16 20:21:19 -06:00
parent d9f2f456f1
commit d4b4c33550
683 changed files with 51877 additions and 100 deletions

View File

@@ -0,0 +1,22 @@
#+TITLE: editor/objed
#+DATE: May 30, 2019
#+SINCE: v2.1
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
* Description
This modules adds [[https://github.com/clemera/objed][objed]], a global minor-mode for navigating and manipulating
text objects. It combines the ideas of versor-mode and other editors like Vim or
Kakoune and tries to align them with regular Emacs conventions.
Note that =objed= is intended as an *alternative* to =evil=, for people who
prefer standard Emacs key-bindings and conventions. It's not recommended to use
these modules together.
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage.
** Module Flags
+ ~+manual~ Do not turn =objed= automatically. The user is responsible for calling
`objed-activate` (bound to `M-SPC` if using the default Emacs bindings.)

View File

@@ -0,0 +1,29 @@
;;; editor/objed/config.el -*- lexical-binding: t; -*-
(use-package! objed
:after-call pre-command-hook
:config
;; Prevent undo actions from exiting edit state
(add-to-list 'objed-keeper-commands 'undo-tree-undo)
(add-to-list 'objed-keeper-commands 'undo-tree-redo)
(add-to-list 'objed-keeper-commands 'undo-tree-visualize)
(defvar +objed--extra-face-remaps nil)
(defadvice! +objed--add-face-remaps-a (&rest _)
"Add extra face remaps when objed activates."
:after 'objed--init
(when (memq 'objed-hl (assq 'hl-line face-remapping-alist))
(push (face-remap-add-relative 'solaire-hl-line-face 'objed-hl)
+objed--extra-face-remaps)))
(defadvice! +objed--remove-face-remaps-a (&rest _)
"Remove extra face remaps when objed de-activates."
:after 'objed--reset
(unless (memq 'objed-hl (assq 'hl-line face-remapping-alist))
(dolist (remap +objed--extra-face-remaps)
(face-remap-remove-relative remap))
(setq +objed--extra-face-remaps nil)))
(unless (featurep! +manual)
(objed-mode +1)))

View File

@@ -0,0 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/objed/packages.el
(package! objed)