LoginSignup
2

More than 3 years have passed since last update.

swiper-isearch-region

Last updated at Posted at 2019-07-11

swiper-isearch をregion選択状態からも使えるようにするための設定です。

PS:
ballforestさんから、swiper-thing-at-point/swiper-iserch-thing-at-point という関数を教えてもらったので修正しました。

設定

(bind-key "C-s" 'swiper-isearch-region)
(bind-key "M-s" 'swiper-isearch-thing-at-point)
(bind-key "M-S" 'swiper-thing-at-point)

(defun swiper-isearch-region ()
  "If region isn't selected, `swiper-isearch'.
If region is selected, `swiper-isearch-thing-at-point'."
  (interactive)
  (if (not (use-region-p))
      (swiper-isearch))
  (swiper-isearch-thing-at-point))

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2