Update
This commit is contained in:
@@ -82,14 +82,12 @@
|
|||||||
'("z" . meow-pop-selection)
|
'("z" . meow-pop-selection)
|
||||||
'("'" . repeat)
|
'("'" . repeat)
|
||||||
'("<escape>" . ignore))
|
'("<escape>" . ignore))
|
||||||
;; (meow-define-keys
|
(meow-define-keys
|
||||||
;; 'beacon
|
'beacon
|
||||||
;; '("C-g" . meow-grab))
|
'("C-g" . meow-grab))
|
||||||
;; (meow-define-keys
|
|
||||||
;; 'insert
|
|
||||||
;; '("ESC" . <escape>))
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
(use-package meow
|
(use-package meow
|
||||||
:demand t
|
:demand t
|
||||||
:hook (elpaca-after-init . meow-global-mode)
|
:hook (elpaca-after-init . meow-global-mode)
|
||||||
@@ -100,6 +98,8 @@
|
|||||||
(add-to-list 'meow-mode-state-list '(eshell-mode . insert))
|
(add-to-list 'meow-mode-state-list '(eshell-mode . insert))
|
||||||
(add-to-list 'meow-mode-state-list '(git-commit-elisp-text-mode . insert))
|
(add-to-list 'meow-mode-state-list '(git-commit-elisp-text-mode . insert))
|
||||||
|
|
||||||
|
(define-key input-decode-map (kbd "C-[") [control-bracketleft])
|
||||||
|
(define-key meow-insert-state-keymap [control-bracketleft] 'meow-insert-exit)
|
||||||
(setq meow-keypad-leader-dispatch "C-c"
|
(setq meow-keypad-leader-dispatch "C-c"
|
||||||
meow-use-clipboard t)
|
meow-use-clipboard t)
|
||||||
(setq meow-replace-state-name-list
|
(setq meow-replace-state-name-list
|
||||||
@@ -110,4 +110,40 @@
|
|||||||
(beacon . "<B>")))
|
(beacon . "<B>")))
|
||||||
(setq meow-cursor-type-normal 'bar))
|
(setq meow-cursor-type-normal 'bar))
|
||||||
|
|
||||||
|
;; Meow jk exit
|
||||||
|
(use-package meow
|
||||||
|
:disabled t
|
||||||
|
:after meow
|
||||||
|
:config
|
||||||
|
;; Use jk to escape from insert state to normal state
|
||||||
|
(defvar meow-two-char-escape-sequence "jk")
|
||||||
|
(defvar meow-two-char-escape-delay 0.5)
|
||||||
|
(defun meow--two-char-exit-insert-state (s)
|
||||||
|
"Exit meow insert state when pressing consecutive two keys.
|
||||||
|
|
||||||
|
S is string of the two-key sequence."
|
||||||
|
(when (meow-insert-mode-p)
|
||||||
|
(let ((modified (buffer-modified-p))
|
||||||
|
(undo-list buffer-undo-list))
|
||||||
|
(insert (elt s 0))
|
||||||
|
(let* ((second-char (elt s 1))
|
||||||
|
(event
|
||||||
|
(if defining-kbd-macro
|
||||||
|
(read-event nil nil)
|
||||||
|
(read-event nil nil meow-two-char-escape-delay))))
|
||||||
|
(when event
|
||||||
|
(if (and (characterp event) (= event second-char))
|
||||||
|
(progn
|
||||||
|
(backward-delete-char 1)
|
||||||
|
(set-buffer-modified-p modified)
|
||||||
|
(setq buffer-undo-list undo-list)
|
||||||
|
(meow-insert-exit))
|
||||||
|
(push event unread-command-events)))))))
|
||||||
|
(defun meow-two-char-exit-insert-state ()
|
||||||
|
"Exit meow insert state when pressing consecutive two keys."
|
||||||
|
(interactive)
|
||||||
|
(meow--two-char-exit-insert-state meow-two-char-escape-sequence))
|
||||||
|
(define-key meow-insert-state-keymap (substring meow-two-char-escape-sequence 0 1)
|
||||||
|
#'meow-two-char-exit-insert-state))
|
||||||
|
|
||||||
(provide 'init-meow)
|
(provide 'init-meow)
|
||||||
|
|||||||
@@ -258,6 +258,11 @@ the element after the #+HEADER: tag."
|
|||||||
:hook (org-latex-preview-mode . org-latex-preview-center-mode)
|
:hook (org-latex-preview-mode . org-latex-preview-center-mode)
|
||||||
:bind ("C-c C-x SPC" . org-latex-preview-clear-cache)
|
:bind ("C-c C-x SPC" . org-latex-preview-clear-cache)
|
||||||
:config
|
:config
|
||||||
|
;; preview buffer on enter
|
||||||
|
(add-hook 'org-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(run-with-idle-timer 0.5 nil
|
||||||
|
(lambda () (org-latex-preview '(16))))))
|
||||||
;; Add margin and rescale display math
|
;; Add margin and rescale display math
|
||||||
(defvar my/org-latex-display-math-scale 1)
|
(defvar my/org-latex-display-math-scale 1)
|
||||||
(defvar my/org-latex-display-math-margin 8)
|
(defvar my/org-latex-display-math-margin 8)
|
||||||
|
|||||||
@@ -41,6 +41,9 @@
|
|||||||
:bind (:map eshell-mode-map
|
:bind (:map eshell-mode-map
|
||||||
([remap recenter-top-bottom] . eshell/clear))
|
([remap recenter-top-bottom] . eshell/clear))
|
||||||
:config
|
:config
|
||||||
|
;; (defun eshell/clear ()
|
||||||
|
;; (interactive)
|
||||||
|
;; (eshell/clear-scrollback))
|
||||||
(setq eshell-banner-message ""))
|
(setq eshell-banner-message ""))
|
||||||
|
|
||||||
(use-package xterm-color
|
(use-package xterm-color
|
||||||
|
|||||||
@@ -40,8 +40,15 @@
|
|||||||
:bind ("<f5>" . modus-themes-load-random)
|
:bind ("<f5>" . modus-themes-load-random)
|
||||||
:bind ("C-<f5>" . modus-themes-load-random-light)
|
:bind ("C-<f5>" . modus-themes-load-random-light)
|
||||||
:bind ("M-<f5>" . modus-themes-load-random-dark)
|
:bind ("M-<f5>" . modus-themes-load-random-dark)
|
||||||
|
|
||||||
:init
|
:init
|
||||||
|
(setq ef-themes-light-themes '(ef-arbutus ef-cyprus ef-day ef-duo-light ef-eagle ef-elea-light
|
||||||
|
ef-kassio ef-melissa-light ef-orange ef-reverie
|
||||||
|
ef-spring ef-summer ef-trio-light ef-tritanopia-light))
|
||||||
|
|
||||||
|
(setq ef-themes-dark-themes '(ef-autumn ef-bio ef-cherie ef-dark ef-deuteranopia-dark ef-dream
|
||||||
|
ef-duo-dark ef-elea-dark ef-fig ef-maris-dark
|
||||||
|
ef-melissa-dark ef-night ef-owl ef-rosa ef-symbiosis
|
||||||
|
ef-trio-dark ef-tritanopia-dark ef-winter))
|
||||||
;; This makes the Modus commands listed below consider only the Ef
|
;; This makes the Modus commands listed below consider only the Ef
|
||||||
;; themes. For an alternative that includes Modus and all
|
;; themes. For an alternative that includes Modus and all
|
||||||
;; derivative themes (like Ef), enable the
|
;; derivative themes (like Ef), enable the
|
||||||
@@ -63,13 +70,13 @@
|
|||||||
. (lambda ()
|
. (lambda ()
|
||||||
;; something to execute when dark mode is detected
|
;; something to execute when dark mode is detected
|
||||||
;; (doric-themes-load-random 'dark))
|
;; (doric-themes-load-random 'dark))
|
||||||
(modus-themes-load-random-dark)
|
(ef-themes-load-random-dark)
|
||||||
))
|
))
|
||||||
(auto-dark-light-mode
|
(auto-dark-light-mode
|
||||||
. (lambda ()
|
. (lambda ()
|
||||||
;; something to execute when light mode is detected
|
;; something to execute when light mode is detected
|
||||||
;; (doric-themes-load-random 'light)
|
;; (doric-themes-load-random 'light)
|
||||||
(modus-themes-load-random-light)
|
(ef-themes-load-random-light)
|
||||||
))
|
))
|
||||||
:hook elpaca-after-init)
|
:hook elpaca-after-init)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user