Merge pull request #4403 from gagbo/fix/bepo-exhaustive-remaps
Fix/bepo exhaustive remaps
This commit is contained in:
commit
e1683dc763
4 changed files with 241 additions and 77 deletions
|
@ -81,7 +81,7 @@
|
||||||
:n "C-#" #'+popup/raise))
|
:n "C-#" #'+popup/raise))
|
||||||
(after! treemacs
|
(after! treemacs
|
||||||
(doom-bepo-rotate-ts-bare-keymap '(evil-treemacs-state-map)))
|
(doom-bepo-rotate-ts-bare-keymap '(evil-treemacs-state-map)))
|
||||||
(after! (:or helm ivy)
|
(after! (:or helm ivy selectrum icomplete)
|
||||||
(doom-bepo-rotate-bare-keymap
|
(doom-bepo-rotate-bare-keymap
|
||||||
'(minibuffer-local-map
|
'(minibuffer-local-map
|
||||||
minibuffer-local-ns-map
|
minibuffer-local-ns-map
|
||||||
|
@ -127,11 +127,44 @@
|
||||||
(t
|
(t
|
||||||
(kbd "C-h !")))
|
(kbd "C-h !")))
|
||||||
'org-time-stamp-inactive)
|
'org-time-stamp-inactive)
|
||||||
(apply #'completing-read args))))
|
(apply #'completing-read args)))
|
||||||
|
;; Finalizing an Org-capture become `C-l C-c` (or `C-r C-c`) on top of `ZZ`
|
||||||
|
(doom-bepo-rotate-bare-keymap '(org-capture-mode-map) doom-bepo-cr-rotation-style))
|
||||||
|
(after! (evil org evil-org)
|
||||||
|
;; FIXME: This map! call is being interpreted before the
|
||||||
|
;; map! call in (use-package! evil-org :config) in modules/lang/org/config.el
|
||||||
|
;; Therefore, this map! needs to be reevaluated to have effect.
|
||||||
|
;; Need to find a way to call the code below after the :config block
|
||||||
|
;; in :lang org code
|
||||||
|
|
||||||
|
;; Direct access for "unimpaired" like improvements
|
||||||
|
(map! :map evil-org-mode-map
|
||||||
|
;; evil-org-movement bindings having "c" and "r" means
|
||||||
|
;; C-r gets mapped to `org-shiftright' in normal and insert state.
|
||||||
|
;; C-c gets mapped to `org-shiftleft' in normal and insert state.
|
||||||
|
:ni "C-r" nil
|
||||||
|
:ni "C-c" nil
|
||||||
|
:ni "C-»" #'org-shiftright
|
||||||
|
:ni "C-«" #'org-shiftleft
|
||||||
|
:m ")" nil
|
||||||
|
:m "(" nil
|
||||||
|
:m "]" #'evil-org-forward-sentence
|
||||||
|
:m "[" #'evil-org-backward-sentence
|
||||||
|
:m ")h" #'org-forward-heading-same-level
|
||||||
|
:m "(h" #'org-backward-heading-same-level
|
||||||
|
:m ")l" #'org-next-link
|
||||||
|
:m "(l" #'org-previous-link
|
||||||
|
:m ")c" #'org-babel-next-src-block
|
||||||
|
:m "(c" #'org-babel-previous-src-block))
|
||||||
(after! (evil org evil-org-agenda)
|
(after! (evil org evil-org-agenda)
|
||||||
(doom-bepo-rotate-bare-keymap '(org-agenda-keymap) doom-bepo-cr-rotation-style)
|
(doom-bepo-rotate-bare-keymap '(org-agenda-keymap) doom-bepo-cr-rotation-style)
|
||||||
(doom-bepo--evil-collection-hook nil '(evil-org-agenda-mode-map)))
|
(doom-bepo--evil-collection-hook nil '(evil-org-agenda-mode-map)))
|
||||||
(after! (evil magit evil-collection-magit)
|
(after! notmuch
|
||||||
|
;; Without this, "s" is mapped to 'notmuch-search and
|
||||||
|
;; takes precedence over the evil command to go up one line
|
||||||
|
(map! :map notmuch-common-keymap :n "s" nil)
|
||||||
|
(map! :map notmuch-common-keymap "s" nil))
|
||||||
|
(after! (evil magit)
|
||||||
(doom-bepo-rotate-ts-bare-keymap
|
(doom-bepo-rotate-ts-bare-keymap
|
||||||
'(magit-mode-map
|
'(magit-mode-map
|
||||||
magit-diff-section-base-map
|
magit-diff-section-base-map
|
||||||
|
@ -140,21 +173,40 @@
|
||||||
magit-untracked-section-map))
|
magit-untracked-section-map))
|
||||||
;; Without this, "s" is mapped to 'magit-delete-thing (the old "k" for "kill") and
|
;; Without this, "s" is mapped to 'magit-delete-thing (the old "k" for "kill") and
|
||||||
;; takes precedence over the evil command to go up one line
|
;; takes precedence over the evil command to go up one line
|
||||||
|
;; :nv doesn't work on this, needs to be the bare map.
|
||||||
|
;; This is the output of `describe-function 'magit-delete-thing` when we add :nv or :nvm
|
||||||
|
;; Key Bindings
|
||||||
|
;; evil-collection-magit-mode-map-backup-map <normal-state> x
|
||||||
|
;; evil-collection-magit-mode-map-backup-map <visual-state> x
|
||||||
|
;; evil-collection-magit-mode-map-backup-map k
|
||||||
|
;; evil-collection-magit-mode-map-normal-state-backup-map x
|
||||||
|
;; evil-collection-magit-mode-map-visual-state-backup-map x
|
||||||
|
;; magit-mode-map <normal-state> x
|
||||||
|
;; magit-mode-map <visual-state> x
|
||||||
|
;; magit-mode-map s
|
||||||
(map! :map magit-mode-map "s" nil)
|
(map! :map magit-mode-map "s" nil)
|
||||||
|
;; Even though magit bindings are part of evil-collection now,
|
||||||
|
;; the hook only runs on `evil-collection-magit-maps`, which is
|
||||||
|
;; way to short to cover all usages.
|
||||||
|
;; The hook is run manually on other maps
|
||||||
|
;; NOTE: magit-mode-map is last because other keymaps inherit from it.
|
||||||
|
;; Therefore to prevent a "double rotation" issue, magit-mode-map is
|
||||||
|
;; changed last
|
||||||
(doom-bepo--evil-collection-hook
|
(doom-bepo--evil-collection-hook
|
||||||
nil
|
nil
|
||||||
'(magit-mode-map
|
'(magit-cherry-mode-map
|
||||||
magit-cherry-mode-map
|
|
||||||
magit-mode-map
|
|
||||||
magit-blob-mode-map
|
magit-blob-mode-map
|
||||||
magit-diff-mode-map
|
magit-diff-mode-map
|
||||||
magit-log-mode-map
|
magit-log-mode-map
|
||||||
magit-log-select-mode-map
|
magit-log-select-mode-map
|
||||||
magit-reflog-mode-map
|
magit-reflog-mode-map
|
||||||
magit-status-mode-map
|
magit-status-mode-map
|
||||||
magit-file-mode-map
|
|
||||||
magit-log-read-revs-map
|
magit-log-read-revs-map
|
||||||
magit-process-mode-map
|
magit-process-mode-map
|
||||||
magit-refs-mode-map)))
|
magit-refs-mode-map
|
||||||
|
magit-mode-map)))
|
||||||
(after! evil-easymotion
|
(after! evil-easymotion
|
||||||
|
;; instead of using gs as the evilem-map we use gé to avoid conflicts with org-mode
|
||||||
|
;; down the road
|
||||||
|
(map! :nvm "gé" evilem-map)
|
||||||
(doom-bepo-rotate-bare-keymap '(evilem-map) doom-bepo-cr-rotation-style))))
|
(doom-bepo-rotate-bare-keymap '(evilem-map) doom-bepo-cr-rotation-style))))
|
||||||
|
|
|
@ -11,18 +11,21 @@
|
||||||
- [[#prerequisites][Prerequisites]]
|
- [[#prerequisites][Prerequisites]]
|
||||||
- [[#features][Features]]
|
- [[#features][Features]]
|
||||||
- [[#bépo][Bépo]]
|
- [[#bépo][Bépo]]
|
||||||
|
- [[#easymotion][Easymotion]]
|
||||||
- [[#leaving-mnemonics-alone-when-possible][Leaving mnemonics alone when possible]]
|
- [[#leaving-mnemonics-alone-when-possible][Leaving mnemonics alone when possible]]
|
||||||
- [[#possible-contributions][Possible contributions]]
|
- [[#possible-contributions][Possible contributions]]
|
||||||
|
- [[#org-mode][Org-mode]]
|
||||||
- [[#configuration][Configuration]]
|
- [[#configuration][Configuration]]
|
||||||
- [[#bépo-1][Bépo]]
|
- [[#bépo-1][Bépo]]
|
||||||
- [[#troubleshooting][Troubleshooting]]
|
- [[#troubleshooting][Troubleshooting]]
|
||||||
|
- [[#how-to-investigate-an-issue-][How to investigate an issue ?]]
|
||||||
- [[#how-to-deactivate-the-new-bindings-and-go-back-to-the-old-ones-][How to deactivate the new bindings and go back to the old ones ?]]
|
- [[#how-to-deactivate-the-new-bindings-and-go-back-to-the-old-ones-][How to deactivate the new bindings and go back to the old ones ?]]
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
This module provides barebones support for using Doom with non-qwerty layouts.
|
This module provides barebones support for using Doom with non-qwerty layouts.
|
||||||
|
|
||||||
** Maintainers
|
** Maintainers
|
||||||
+ @gagbo (Author)
|
+ @gagbo (Author, Bépo)
|
||||||
|
|
||||||
** Module Flags
|
** Module Flags
|
||||||
+ =+bepo= Enables modifications for the BÉPO layout (customized with version 1.1 in mind)
|
+ =+bepo= Enables modifications for the BÉPO layout (customized with version 1.1 in mind)
|
||||||
|
@ -43,15 +46,24 @@ Support for the bépo layout includes:
|
||||||
- Setting Avy keys to the correct home row keys
|
- Setting Avy keys to the correct home row keys
|
||||||
- Changing navigation keys to =ctsr=
|
- Changing navigation keys to =ctsr=
|
||||||
+ old =t= is mapped to =j=
|
+ old =t= is mapped to =j=
|
||||||
+ old =s= is mapped to =k= (i.e. staging in the magit status buffer is done with =k=)
|
+ old =s= is mapped to =k= (i.e. staging in the magit status buffer is done
|
||||||
|
with =k=)
|
||||||
+ See [[*Configuration][Configuration]] to see where old =c= and =r= functions
|
+ See [[*Configuration][Configuration]] to see where old =c= and =r= functions
|
||||||
are remapped
|
are remapped
|
||||||
- Bind =<>= functions to =«»= keys when possible
|
- Bind =<>= functions to =«»= keys when possible
|
||||||
- Bind =[]= functions to =()= keys when possible
|
- Bind =[]= functions to =()= keys when possible (the "unimpaired-like"
|
||||||
|
bindings)
|
||||||
- Bind =é= key to =w= functions when possible
|
- Bind =é= key to =w= functions when possible
|
||||||
- Bind =è= key to useful functions when possible
|
- Bind =è= key to useful functions when possible
|
||||||
- Bind =`~= functions to =$#= keys when possible
|
- Bind =`~= functions to =$#= keys when possible
|
||||||
|
|
||||||
|
*** Easymotion
|
||||||
|
|
||||||
|
If you use =evil-easymotion=, then all the bindings that were on =gs= have been
|
||||||
|
moved to =gé=.
|
||||||
|
|
||||||
|
In short : =g s j= -> =g é t= (evilem-motion-next-line). And so on.
|
||||||
|
|
||||||
*** Leaving mnemonics alone when possible
|
*** Leaving mnemonics alone when possible
|
||||||
Exchanging =hjkl= to =ctsr= has the effect of destroying a few mnemonics: the
|
Exchanging =hjkl= to =ctsr= has the effect of destroying a few mnemonics: the
|
||||||
change operator becomes =l= for example, or the window split becomes =SPC é k=.
|
change operator becomes =l= for example, or the window split becomes =SPC é k=.
|
||||||
|
@ -66,13 +78,32 @@ while =t=, =s=, =j=, and =k= are flipped:
|
||||||
- staging a file/region has been moved to =k=
|
- staging a file/region has been moved to =k=
|
||||||
|
|
||||||
*** Possible contributions
|
*** Possible contributions
|
||||||
|
**** Avoid =g= and =z= to be used too often
|
||||||
A nice addition in the future might be to have all the normal mode bindings that
|
A nice addition in the future might be to have all the normal mode bindings that
|
||||||
start with =g= start with =,= instead to avoid the curl on these common
|
start with =g= start with =,= instead to avoid the curl on these common
|
||||||
bindings. This is *not* implemented for the time being.
|
bindings. This is *not* implemented for the time being.
|
||||||
|
|
||||||
|
The same thing could be done to =z=, potentially using =à= instead.
|
||||||
|
|
||||||
|
**** Proper minor mode
|
||||||
Also, implementing all those changes as a minor we could flip on and off would
|
Also, implementing all those changes as a minor we could flip on and off would
|
||||||
help with adoption
|
help with adoption
|
||||||
|
|
||||||
|
**** Put "word" text objects to é instead of w
|
||||||
|
"inside word" and "around word" are =iw= and =aw=, which use the very poorly
|
||||||
|
rated =w= key in the bépo layout. Finding a way to use =é= or even =è= more for
|
||||||
|
these would be a welcome change
|
||||||
|
|
||||||
|
*** Org-mode
|
||||||
|
=evil-org= allows to define =evil-org-movement-bindings= to automatically map
|
||||||
|
movement bindings on non-hjkl keys. It maps automatically keys to =C-c= and
|
||||||
|
=C-r= in normal and insert states though, and it's not really user friendly in
|
||||||
|
Emacs to remap those.
|
||||||
|
|
||||||
|
Therefore, in org-mode:
|
||||||
|
- =org-shiftright= is bound to =C-»=
|
||||||
|
- =org-shiftleft= is bound to =C-«=
|
||||||
|
|
||||||
* Configuration
|
* Configuration
|
||||||
** Bépo
|
** Bépo
|
||||||
=doom-bepo-cr-rotation-style= controls whether:
|
=doom-bepo-cr-rotation-style= controls whether:
|
||||||
|
@ -86,6 +117,17 @@ actually put all the =c= functions on the key that does not need a curl.
|
||||||
|
|
||||||
* Troubleshooting
|
* Troubleshooting
|
||||||
# Common issues and their solution, or places to look for help.
|
# Common issues and their solution, or places to look for help.
|
||||||
|
** How to investigate an issue ?
|
||||||
|
If a key is misbehaving, use =describe-key= (=C-h k= or =SPC h k= or =F1 k=) to
|
||||||
|
see the functions bound to the key, and more importantly in which map it is
|
||||||
|
bound.
|
||||||
|
|
||||||
|
You should ignore all =evil-collection-...-backup-map= keymaps, as they are
|
||||||
|
artifacts from =evil-collection-translate-key= and those maps are actually not
|
||||||
|
active.
|
||||||
|
|
||||||
|
Most likely the solution is to call one of the "key rotation" functions on the
|
||||||
|
relevant keymaps.
|
||||||
** How to deactivate the new bindings and go back to the old ones ?
|
** How to deactivate the new bindings and go back to the old ones ?
|
||||||
If you are learning a new layout you might want to go back to tho old one to
|
If you are learning a new layout you might want to go back to tho old one to
|
||||||
"get work done". Sadly the only way is to comment out the module, run =doom
|
"get work done". Sadly the only way is to comment out the module, run =doom
|
||||||
|
|
|
@ -117,7 +117,7 @@ See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE"
|
||||||
"Remap evil-{normal,operator,motion,...}-state-map
|
"Remap evil-{normal,operator,motion,...}-state-map
|
||||||
to be more natural with Bépo keyboard layout.
|
to be more natural with Bépo keyboard layout.
|
||||||
See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
||||||
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-visual-state-map)
|
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-visual-state-map evil-operator-state-map)
|
||||||
"c" "h"
|
"c" "h"
|
||||||
"C" "H"
|
"C" "H"
|
||||||
"t" "j"
|
"t" "j"
|
||||||
|
@ -131,13 +131,13 @@ See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
||||||
"k" "s"
|
"k" "s"
|
||||||
"K" "S")
|
"K" "S")
|
||||||
(cond ((eq cr-style 'ergodis)
|
(cond ((eq cr-style 'ergodis)
|
||||||
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-visual-state-map)
|
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-visual-state-map evil-operator-state-map)
|
||||||
"h" "r"
|
"h" "r"
|
||||||
"H" "R"
|
"H" "R"
|
||||||
"l" "c"
|
"l" "c"
|
||||||
"L" "C"))
|
"L" "C"))
|
||||||
(t
|
(t
|
||||||
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-visual-state-map)
|
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-visual-state-map evil-operator-state-map)
|
||||||
"h" "c"
|
"h" "c"
|
||||||
"H" "C"
|
"H" "C"
|
||||||
"l" "r"
|
"l" "r"
|
||||||
|
@ -171,18 +171,18 @@ See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
||||||
|
|
||||||
|
|
||||||
;; <> as direct access
|
;; <> as direct access
|
||||||
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map)
|
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-operator-state-map)
|
||||||
"«" "<"
|
"«" "<"
|
||||||
"»" ">")
|
"»" ">")
|
||||||
|
|
||||||
;; " è replaces ^0 to go at BOL
|
;; " è replaces ^0 to go at BOL
|
||||||
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map)
|
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-operator-state-map)
|
||||||
"è" "^"
|
"è" "^"
|
||||||
"È" "0")
|
"È" "0")
|
||||||
|
|
||||||
;; [W] -> [É]
|
;; [W] -> [É]
|
||||||
;; [C-W] -> [W]
|
;; [C-W] -> [W]
|
||||||
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-operator-state-map)
|
(evil-collection-translate-key nil '(evil-normal-state-map evil-motion-state-map evil-operator-state-map evil-operator-state-map)
|
||||||
"é" "w"
|
"é" "w"
|
||||||
"É" "W"
|
"É" "W"
|
||||||
"w" (kbd "C-w")
|
"w" (kbd "C-w")
|
||||||
|
@ -195,7 +195,7 @@ See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
||||||
(let* ((cr-style (or cr-style 'ergodis))
|
(let* ((cr-style (or cr-style 'ergodis))
|
||||||
(doom-bepo-hook (lambda (_mode mode-keymaps &rest _rest)
|
(doom-bepo-hook (lambda (_mode mode-keymaps &rest _rest)
|
||||||
(dolist (keymap mode-keymaps)
|
(dolist (keymap mode-keymaps)
|
||||||
(evil-collection-translate-key '(normal motion visual) keymap
|
(evil-collection-translate-key '(normal motion visual operator) keymap
|
||||||
"c" "h"
|
"c" "h"
|
||||||
"C" "H"
|
"C" "H"
|
||||||
"t" "j"
|
"t" "j"
|
||||||
|
@ -207,19 +207,59 @@ See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
||||||
"j" "t"
|
"j" "t"
|
||||||
"J" "T"
|
"J" "T"
|
||||||
"k" "s"
|
"k" "s"
|
||||||
"K" "S")
|
"K" "S"
|
||||||
|
(kbd "C-c") (kbd "C-h")
|
||||||
|
(kbd "C-C") (kbd "C-H")
|
||||||
|
(kbd "C-t") (kbd "C-j")
|
||||||
|
(kbd "C-T") (kbd "C-J")
|
||||||
|
(kbd "C-s") (kbd "C-k")
|
||||||
|
(kbd "C-S") (kbd "C-K")
|
||||||
|
(kbd "C-r") (kbd "C-l")
|
||||||
|
(kbd "C-R") (kbd "C-L")
|
||||||
|
(kbd "C-j") (kbd "C-t")
|
||||||
|
(kbd "C-J") (kbd "C-T")
|
||||||
|
(kbd "C-k") (kbd "C-s")
|
||||||
|
(kbd "C-K") (kbd "C-S")
|
||||||
|
(kbd "M-c") (kbd "M-h")
|
||||||
|
(kbd "M-C") (kbd "M-H")
|
||||||
|
(kbd "M-t") (kbd "M-j")
|
||||||
|
(kbd "M-T") (kbd "M-J")
|
||||||
|
(kbd "M-s") (kbd "M-k")
|
||||||
|
(kbd "M-S") (kbd "M-K")
|
||||||
|
(kbd "M-r") (kbd "M-l")
|
||||||
|
(kbd "M-R") (kbd "M-L")
|
||||||
|
(kbd "M-j") (kbd "M-t")
|
||||||
|
(kbd "M-J") (kbd "M-T")
|
||||||
|
(kbd "M-k") (kbd "M-s")
|
||||||
|
(kbd "M-K") (kbd "M-S"))
|
||||||
(cond ((eq cr-style 'ergodis)
|
(cond ((eq cr-style 'ergodis)
|
||||||
(evil-collection-translate-key '(normal motion visual) keymap
|
(evil-collection-translate-key '(normal motion visual operator) keymap
|
||||||
"h" "r"
|
"h" "r"
|
||||||
"H" "R"
|
"H" "R"
|
||||||
"l" "c"
|
"l" "c"
|
||||||
"L" "C"))
|
"L" "C"
|
||||||
|
(kbd "C-h") (kbd "C-r")
|
||||||
|
(kbd "C-H") (kbd "C-R")
|
||||||
|
(kbd "C-l") (kbd "C-c")
|
||||||
|
(kbd "C-L") (kbd "C-C")
|
||||||
|
(kbd "M-h") (kbd "M-r")
|
||||||
|
(kbd "M-H") (kbd "M-R")
|
||||||
|
(kbd "M-l") (kbd "M-c")
|
||||||
|
(kbd "M-L") (kbd "M-C")))
|
||||||
(t
|
(t
|
||||||
(evil-collection-translate-key '(normal motion visual) keymap
|
(evil-collection-translate-key '(normal motion visual operator) keymap
|
||||||
"h" "c"
|
"h" "c"
|
||||||
"H" "C"
|
"H" "C"
|
||||||
"l" "r"
|
"l" "r"
|
||||||
"L" "R")))
|
"L" "R"
|
||||||
|
(kbd "C-h") (kbd "C-c")
|
||||||
|
(kbd "C-H") (kbd "C-C")
|
||||||
|
(kbd "C-l") (kbd "C-r")
|
||||||
|
(kbd "C-L") (kbd "C-R")
|
||||||
|
(kbd "M-h") (kbd "M-c")
|
||||||
|
(kbd "M-H") (kbd "M-C")
|
||||||
|
(kbd "M-l") (kbd "M-r")
|
||||||
|
(kbd "M-L") (kbd "M-R"))))
|
||||||
|
|
||||||
|
|
||||||
(evil-collection-translate-key '(insert) keymap
|
(evil-collection-translate-key '(insert) keymap
|
||||||
|
@ -234,27 +274,48 @@ See `doom-bepo-cr-rotation-style' for the meaning of CR-STYLE."
|
||||||
(kbd "C-j") (kbd "C-t")
|
(kbd "C-j") (kbd "C-t")
|
||||||
(kbd "C-J") (kbd "C-T")
|
(kbd "C-J") (kbd "C-T")
|
||||||
(kbd "C-k") (kbd "C-s")
|
(kbd "C-k") (kbd "C-s")
|
||||||
(kbd "C-K") (kbd "C-S"))
|
(kbd "C-K") (kbd "C-S")
|
||||||
|
(kbd "M-c") (kbd "M-h")
|
||||||
|
(kbd "M-C") (kbd "M-H")
|
||||||
|
(kbd "M-t") (kbd "M-j")
|
||||||
|
(kbd "M-T") (kbd "M-J")
|
||||||
|
(kbd "M-s") (kbd "M-k")
|
||||||
|
(kbd "M-S") (kbd "M-K")
|
||||||
|
(kbd "M-r") (kbd "M-l")
|
||||||
|
(kbd "M-R") (kbd "M-L")
|
||||||
|
(kbd "M-j") (kbd "M-t")
|
||||||
|
(kbd "M-J") (kbd "M-T")
|
||||||
|
(kbd "M-k") (kbd "M-s")
|
||||||
|
(kbd "M-K") (kbd "M-S"))
|
||||||
(cond ((eq cr-style 'ergodis)
|
(cond ((eq cr-style 'ergodis)
|
||||||
(evil-collection-translate-key '(insert) keymap
|
(evil-collection-translate-key '(insert) keymap
|
||||||
(kbd "C-h") (kbd "C-r")
|
(kbd "C-h") (kbd "C-r")
|
||||||
(kbd "C-H") (kbd "C-R")
|
(kbd "C-H") (kbd "C-R")
|
||||||
(kbd "C-l") (kbd "C-c")
|
(kbd "C-l") (kbd "C-c")
|
||||||
(kbd "C-L") (kbd "C-C")))
|
(kbd "C-L") (kbd "C-C")
|
||||||
|
(kbd "M-h") (kbd "M-r")
|
||||||
|
(kbd "M-H") (kbd "M-R")
|
||||||
|
(kbd "M-l") (kbd "M-c")
|
||||||
|
(kbd "M-L") (kbd "M-C")))
|
||||||
(t
|
(t
|
||||||
(evil-collection-translate-key '(insert) keymap
|
(evil-collection-translate-key '(insert) keymap
|
||||||
(kbd "C-h") (kbd "C-c")
|
(kbd "C-h") (kbd "C-c")
|
||||||
(kbd "C-H") (kbd "C-C")
|
(kbd "C-H") (kbd "C-C")
|
||||||
(kbd "C-l") (kbd "C-r")
|
(kbd "C-l") (kbd "C-r")
|
||||||
(kbd "C-L") (kbd "C-R"))))
|
(kbd "C-L") (kbd "C-R")
|
||||||
|
(kbd "M-h") (kbd "M-c")
|
||||||
|
(kbd "M-H") (kbd "M-C")
|
||||||
|
(kbd "M-l") (kbd "M-r")
|
||||||
|
(kbd "M-L") (kbd "M-R")
|
||||||
|
)))
|
||||||
|
|
||||||
;; <> en direct
|
;; <> en direct
|
||||||
(evil-collection-translate-key '(normal motion visual) keymap
|
(evil-collection-translate-key '(normal motion visual operator) keymap
|
||||||
"«" "<"
|
"«" "<"
|
||||||
"»" ">")
|
"»" ">")
|
||||||
|
|
||||||
;; è pour aller au début de ligne
|
;; è pour aller au début de ligne
|
||||||
(evil-collection-translate-key '(normal motion visual) keymap
|
(evil-collection-translate-key '(normal motion visual operator) keymap
|
||||||
"è" "^"
|
"è" "^"
|
||||||
"È" "0")
|
"È" "0")
|
||||||
|
|
||||||
|
|
|
@ -990,60 +990,69 @@ compelling reason, so..."
|
||||||
#'+org-cycle-only-current-subtree-h
|
#'+org-cycle-only-current-subtree-h
|
||||||
;; Clear babel results if point is inside a src block
|
;; Clear babel results if point is inside a src block
|
||||||
#'+org-clear-babel-results-h)
|
#'+org-clear-babel-results-h)
|
||||||
(map! :map evil-org-mode-map
|
(let-alist evil-org-movement-bindings
|
||||||
:ni [C-return] #'+org/insert-item-below
|
(let ((Cright (concat "C-" .right))
|
||||||
:ni [C-S-return] #'+org/insert-item-above
|
(Cleft (concat "C-" .left))
|
||||||
;; navigate table cells (from insert-mode)
|
(Cup (concat "C-" .up))
|
||||||
:i "C-l" (cmds! (org-at-table-p) #'org-table-next-field
|
(Cdown (concat "C-" .down))
|
||||||
|
(CSright (concat "C-" (capitalize .right)))
|
||||||
|
(CSleft (concat "C-" (capitalize .left)))
|
||||||
|
(CSup (concat "C-" (capitalize .up)))
|
||||||
|
(CSdown (concat "C-" (capitalize .down))))
|
||||||
|
(map! :map evil-org-mode-map
|
||||||
|
:ni [C-return] #'+org/insert-item-below
|
||||||
|
:ni [C-S-return] #'+org/insert-item-above
|
||||||
|
;; navigate table cells (from insert-mode)
|
||||||
|
:i Cright (cmds! (org-at-table-p) #'org-table-next-field
|
||||||
#'org-end-of-line)
|
#'org-end-of-line)
|
||||||
:i "C-h" (cmds! (org-at-table-p) #'org-table-previous-field
|
:i Cleft (cmds! (org-at-table-p) #'org-table-previous-field
|
||||||
#'org-beginning-of-line)
|
#'org-beginning-of-line)
|
||||||
:i "C-k" (cmds! (org-at-table-p) #'+org/table-previous-row
|
:i Cup (cmds! (org-at-table-p) #'+org/table-previous-row
|
||||||
#'org-up-element)
|
#'org-up-element)
|
||||||
:i "C-j" (cmds! (org-at-table-p) #'org-table-next-row
|
:i Cdown (cmds! (org-at-table-p) #'org-table-next-row
|
||||||
#'org-down-element)
|
#'org-down-element)
|
||||||
:ni "C-S-l" #'org-shiftright
|
:ni CSright #'org-shiftright
|
||||||
:ni "C-S-h" #'org-shiftleft
|
:ni CSleft #'org-shiftleft
|
||||||
:ni "C-S-k" #'org-shiftup
|
:ni CSup #'org-shiftup
|
||||||
:ni "C-S-j" #'org-shiftdown
|
:ni CSdown #'org-shiftdown
|
||||||
;; more intuitive RET keybinds
|
;; more intuitive RET keybinds
|
||||||
:n [return] #'+org/dwim-at-point
|
:n [return] #'+org/dwim-at-point
|
||||||
:n "RET" #'+org/dwim-at-point
|
:n "RET" #'+org/dwim-at-point
|
||||||
:i [return] (cmd! (org-return electric-indent-mode))
|
:i [return] (cmd! (org-return electric-indent-mode))
|
||||||
:i "RET" (cmd! (org-return electric-indent-mode))
|
:i "RET" (cmd! (org-return electric-indent-mode))
|
||||||
:i [S-return] #'+org/shift-return
|
:i [S-return] #'+org/shift-return
|
||||||
:i "S-RET" #'+org/shift-return
|
:i "S-RET" #'+org/shift-return
|
||||||
;; more vim-esque org motion keys (not covered by evil-org-mode)
|
;; more vim-esque org motion keys (not covered by evil-org-mode)
|
||||||
:m "]h" #'org-forward-heading-same-level
|
:m "]h" #'org-forward-heading-same-level
|
||||||
:m "[h" #'org-backward-heading-same-level
|
:m "[h" #'org-backward-heading-same-level
|
||||||
:m "]l" #'org-next-link
|
:m "]l" #'org-next-link
|
||||||
:m "[l" #'org-previous-link
|
:m "[l" #'org-previous-link
|
||||||
:m "]c" #'org-babel-next-src-block
|
:m "]c" #'org-babel-next-src-block
|
||||||
:m "[c" #'org-babel-previous-src-block
|
:m "[c" #'org-babel-previous-src-block
|
||||||
:n "gQ" #'org-fill-paragraph
|
:n "gQ" #'org-fill-paragraph
|
||||||
;; sensible vim-esque folding keybinds
|
;; sensible vim-esque folding keybinds
|
||||||
:n "za" #'+org/toggle-fold
|
:n "za" #'+org/toggle-fold
|
||||||
:n "zA" #'org-shifttab
|
:n "zA" #'org-shifttab
|
||||||
:n "zc" #'+org/close-fold
|
:n "zc" #'+org/close-fold
|
||||||
:n "zC" #'outline-hide-subtree
|
:n "zC" #'outline-hide-subtree
|
||||||
:n "zm" #'+org/hide-next-fold-level
|
:n "zm" #'+org/hide-next-fold-level
|
||||||
:n "zM" #'+org/close-all-folds
|
:n "zM" #'+org/close-all-folds
|
||||||
:n "zn" #'org-tree-to-indirect-buffer
|
:n "zn" #'org-tree-to-indirect-buffer
|
||||||
:n "zo" #'+org/open-fold
|
:n "zo" #'+org/open-fold
|
||||||
:n "zO" #'outline-show-subtree
|
:n "zO" #'outline-show-subtree
|
||||||
:n "zr" #'+org/show-next-fold-level
|
:n "zr" #'+org/show-next-fold-level
|
||||||
:n "zR" #'+org/open-all-folds
|
:n "zR" #'+org/open-all-folds
|
||||||
:n "zi" #'org-toggle-inline-images
|
:n "zi" #'org-toggle-inline-images
|
||||||
|
|
||||||
:map org-read-date-minibuffer-local-map
|
:map org-read-date-minibuffer-local-map
|
||||||
"C-h" (cmd! (org-eval-in-calendar '(calendar-backward-day 1)))
|
Cleft (cmd! (org-eval-in-calendar '(calendar-backward-day 1)))
|
||||||
"C-l" (cmd! (org-eval-in-calendar '(calendar-forward-day 1)))
|
Cright (cmd! (org-eval-in-calendar '(calendar-forward-day 1)))
|
||||||
"C-k" (cmd! (org-eval-in-calendar '(calendar-backward-week 1)))
|
Cup (cmd! (org-eval-in-calendar '(calendar-backward-week 1)))
|
||||||
"C-j" (cmd! (org-eval-in-calendar '(calendar-forward-week 1)))
|
Cdown (cmd! (org-eval-in-calendar '(calendar-forward-week 1)))
|
||||||
"C-S-h" (cmd! (org-eval-in-calendar '(calendar-backward-month 1)))
|
CSleft (cmd! (org-eval-in-calendar '(calendar-backward-month 1)))
|
||||||
"C-S-l" (cmd! (org-eval-in-calendar '(calendar-forward-month 1)))
|
CSright (cmd! (org-eval-in-calendar '(calendar-forward-month 1)))
|
||||||
"C-S-k" (cmd! (org-eval-in-calendar '(calendar-backward-year 1)))
|
CSup (cmd! (org-eval-in-calendar '(calendar-backward-year 1)))
|
||||||
"C-S-j" (cmd! (org-eval-in-calendar '(calendar-forward-year 1)))))
|
CSdown (cmd! (org-eval-in-calendar '(calendar-forward-year 1)))))))
|
||||||
|
|
||||||
|
|
||||||
(use-package! evil-org-agenda
|
(use-package! evil-org-agenda
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue