Skip to content

Commit

Permalink
Overload Esc to rotate ring in non-insertion states
Browse files Browse the repository at this point in the history
This is just a quick hack to get the desired behavior. We'll revisit
it down the line.
  • Loading branch information
countvajhula committed Jun 13, 2024
1 parent 9c5b422 commit 0a28471
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rigpa.el
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ and simply toggles whether the menu is visible or not."
(let ((keymap (symbol-value
(intern
(concat "evil-" state "-state-map")))))
(define-key keymap [escape] #'rigpa-enter-higher-level)
(unless (member state chimera-insertion-states)
(if (member state chimera-insertion-states)
(define-key keymap [escape] #'rigpa-enter-higher-level)
(define-key keymap [escape] #'rigpa-rotate-mode-ring-left)
(define-key keymap [return] #'rigpa--enter-lower-or-pass-through))))
;; exit visual state gracefully
(define-key evil-visual-state-map [escape] (lambda ()
Expand Down

0 comments on commit 0a28471

Please sign in to comment.