add mwim
This commit is contained in:
7 files changed
+47
-14
No files matched your search
@@ -27,9 +27,6 @@
|
||||
;; Highlight trail whitespace
|
||||
(setq show-trailing-whitespace t)
|
||||
|
||||
(global-whitespace-mode 1)
|
||||
|
||||
|
||||
;; Save minibuffer history
|
||||
(savehist-mode)
|
||||
(setq history-length 1000
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
(require 'lazy-load)
|
||||
|
||||
;;; symbol-overlay-map
|
||||
@@ -19,4 +20,10 @@
|
||||
"symbol-overlay")
|
||||
|
||||
|
||||
;;; mwim
|
||||
(lazy-load-global-keys
|
||||
'(("C-a" . mwim-beginning-of-code-or-line)
|
||||
("C-e" . mwim-end-of-code-or-line))
|
||||
"mwim")
|
||||
|
||||
(provide 'init-edit)
|
||||
@@ -1,4 +1,5 @@
|
||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
(require 'lazy-load)
|
||||
(lazy-load-global-keys
|
||||
'(("C-x g" . magit-status))
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
;; Pulse
|
||||
(defvar creature/pulse-enable t
|
||||
"Whether enable pulse for scroll and switch window.")
|
||||
|
||||
(defun creature/pulse-line (&rest _)
|
||||
"Pulse the current line."
|
||||
(when creature/pulse-enable
|
||||
(pulse-momentary-highlight-one-line (point))))
|
||||
|
||||
;; pulse setup, like beacon
|
||||
(with-eval-after-load 'pulse
|
||||
(setq pulse-delay 0.04))
|
||||
|
||||
(dolist (command '(scroll-up
|
||||
scroll-down
|
||||
recenter))
|
||||
(advice-add command :after #'creature/pulse-line))
|
||||
(add-to-list 'window-selection-change-functions #'creature/pulse-line)
|
||||
|
||||
|
||||
(provide 'init-theme)
|
||||
Reference in new issue
Block a user