mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 11:30:23 +10:00
Moving to Doom Emacs!
This commit is contained in:
22
.emacs.d/modules/editor/objed/README.org
Normal file
22
.emacs.d/modules/editor/objed/README.org
Normal 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.)
|
||||
29
.emacs.d/modules/editor/objed/config.el
Normal file
29
.emacs.d/modules/editor/objed/config.el
Normal 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)))
|
||||
4
.emacs.d/modules/editor/objed/packages.el
Normal file
4
.emacs.d/modules/editor/objed/packages.el
Normal file
@@ -0,0 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; editor/objed/packages.el
|
||||
|
||||
(package! objed)
|
||||
Reference in New Issue
Block a user