4

When I trigger helm-swoop, it autofills the search with the word at point. For my most common use case, this isn't what I want. How do I disable it, so there's nothing in the search.

zck
  • 9,092
  • 2
  • 33
  • 65

1 Answers1

4

When helm swoop starts up, it looks at the variable helm-swoop-pre-input-function. That variable stores a function that returns a string, and helm swoop uses that string as the default value. So, to not have anything in the search, make that value return an empty string:

(setq helm-swoop-pre-input-function (lambda () ""))

Its default value is to call (thing-at-point 'symbol). There are more examples here. For example, to always use the previous search:

(setq helm-swoop-pre-input-function
      (lambda () (if (boundp 'helm-swoop-pattern)
                     helm-swoop-pattern
                     "")))
zck
  • 9,092
  • 2
  • 33
  • 65