emacs - Added swiper-thing-at-point and binds

This commit is contained in:
madmaurice 2017-10-14 12:40:09 +02:00
parent 763d5683e8
commit 3c037e5ef4

View file

@ -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