objed: add a manual actiation flag

Setting the flag `+manual` of the `objed` module makes the user
responsible for calling `objed-activate` when needed. The binding
`M-SPC` is set in the default Emacs bindings.
This commit is contained in:
UndeadKernel 2019-06-01 13:30:18 +02:00
parent 32e266cfb4
commit 2f910fb91f
3 changed files with 16 additions and 2 deletions

View file

@ -249,6 +249,10 @@
"C-S-s" #'swiper-helm "C-S-s" #'swiper-helm
"C-S-r" #'helm-resume) "C-S-r" #'helm-resume)
;;; objed
(:when (featurep! :editor objed +manual)
"M-SPC" #'objed-activate)
;;; buffer management ;;; buffer management
"C-x b" #'persp-switch-to-buffer "C-x b" #'persp-switch-to-buffer
(:when (featurep! :completion ivy) (:when (featurep! :completion ivy)
@ -278,7 +282,7 @@
"C-p" #'company-search-repeat-backward "C-p" #'company-search-repeat-backward
"C-s" (λ! (company-search-abort) (company-filter-candidates))) "C-s" (λ! (company-search-abort) (company-filter-candidates)))
;;; ein notebokks ;;; ein notebooks
(:after ein:notebook-multilang (:after ein:notebook-multilang
:map ein:notebook-multilang-mode-map :map ein:notebook-multilang-mode-map
"C-c h" #'+ein/hydra/body) "C-c h" #'+ein/hydra/body)

View file

@ -2,6 +2,11 @@
#+DATE: May 30, 2019 #+DATE: May 30, 2019
#+SINCE: v2.1 #+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 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 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. Kakoune and tries to align them with regular Emacs conventions.
@ -11,3 +16,7 @@ prefer standard Emacs key-bindings and conventions. It's not recommended to use
these modules together. these modules together.
[[https://github.com/clemera/objed][See the objed project README]] for information on keybinds and usage. [[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

@ -27,4 +27,5 @@
(advice-add 'objed--init :after #'+objed*add-face-remaps) (advice-add 'objed--init :after #'+objed*add-face-remaps)
(advice-add 'objed--reset :after #'+objed*remove-face-remaps) (advice-add 'objed--reset :after #'+objed*remove-face-remaps)
(objed-mode +1)) (unless (featurep! +manual)
(objed-mode +1)))