This commit is contained in:
ry
2022-01-11 18:05:13 -08:00
parent 2046befee2
commit 8e7b654716
846 changed files with 71287 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
#+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.
#+begin_quote
This module is incompatible with the =:editor evil=. Enabling them both will
cause errors.
#+end_quote
[[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,27 @@
;;; editor/objed/config.el -*- lexical-binding: t; -*-
(use-package! objed
:after-call pre-command-hook
:config
;; Prevent undo actions from exiting edit state
(pushnew! objed-keeper-commands 'undo-fu-only-undo 'undo-fu-only-redo)
(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 :pin "70f9fb5e0aa1627b0afc7c6b3d0aea9bac70a210")