Extending Isearch

Nicolas Petton presents a nice bit of Elisp that extends the isearch functionality. With his code, you can search for the symbol at point or the active region if there is one.

The first of these is easily accomplished using【Ctrl+w】from within isearch but that takes an extra key chord. With Petton's code you just invoke his isearch-thing function and it searches for the symbol at point unless there is an active region.

If you are a heavy user of isearch and find yourself typing 【Ctrl+s】 and then 【Ctrl+w】 a lot, this may be win for you.

This entry was posted in General and tagged . Bookmark the permalink.

2 Responses to Extending Isearch

  1. Greg says:

    Looks useful!

    For the sake of completeness, note that Emacs 24.4 introduced isearch-forward-symbol-at-point, bound to 'M-s .' by default.

  2. Ryan says:

    Another useful isearch extension is anzu, which gives you a live preview of how many matches there are for the current search and which one of those matches you're currently on.

    https://github.com/syohex/emacs-anzu

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>