diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 8ca4e5b..ef4b59f 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -259,6 +259,11 @@ (kill-buffer (current-buffer)) ;; If last window, just kill buffer (delete-window (selected-window)))) ;; else delete window +(defun my/swiper-thing-at-point (thing) + (interactive) + (swiper (format "\\<%s\\>" + (thing-at-point thing)))) + (use-package evil :ensure t :demand t @@ -275,6 +280,10 @@ (define-key evil-normal-state-map "gn" 'my/evil-go-forward) (define-key evil-motion-state-map [down-mouse-1] 'silence) (define-key evil-motion-state-map [mouse-1] 'silence) + (define-key evil-normal-state-map (kbd "#") + (lambda () (interactive) (my/swiper-thing-at-point 'word))) + (define-key evil-normal-state-map (kbd "*") + (lambda () (interactive) (my/swiper-thing-at-point 'symbol))) (setq-default evil-cross-lines t)) (use-package evil-org