index rss mastodon twitter github linkedin email
Álvaro Ramírez
sponsor

Álvaro Ramírez

21 November 2019 Emacs counsel default search switches

Following up from Enhanced Emacs searching with counsel switches, rather than remembering silver searcher and ripgrep switches, we can use counsel's ivy-initial-inputs-alist to set these up as default visible switches.

(push '(counsel-ag . "--file-search-regex '' -- ") ivy-initial-inputs-alist)
(push '(counsel-rg . "--glob '**' -- ") ivy-initial-inputs-alist)

The default switches stay out of the way in typical searches, but can be easily modified to include (or exclude) results matching specific file names.

default-switches.gif

comments on twitter