emacsorphanage / helm-swoop

Efficiently hopping squeezed lines powered by Emacs helm interface
GNU General Public License v3.0
689 stars 55 forks source link

Helm swoop without input, if nothing selected? #39

Closed ReneFroger closed 9 years ago

ReneFroger commented 9 years ago

When my cursor is on a word, and I start Helm Swoop, I noticed that word where my cursor was placed, is putted in Helm swoop input. I would like to prevent that.

But in a manner way if I selected nothing, there will be nothing putted into swoop. But when I select a word or sentence, that will be putted in Helm swoop then. Is this possible?

And yes, I have read the manual before I asked that question. :smiley:

tuhdo commented 9 years ago

But in a manner way if I selected nothing, there will be nothing putted into swoop.

You can customize helm-swoop-pre-input-function by deleting its value and change to: (lambda () ""). Although this is customizable, the way it displays is not friendly to easily customize. @ShingoFukuyama I suggest that you should change this variable to radio type that has the following options:

Basically the options are things that thing-at-point accepts and you can remove options that you find irrelevant (i.e. page, line and number). custom-function is for user to assign a function name and nil means nothing.

But when I select a word or sentence, that will be putted in Helm swoop then. Is this possible?

This is already implemented. If you have an active region, helm-swoop uses it.

ShingoFukuyama commented 9 years ago

@tuhdo Thanks for answering and the suggestion. Many people have already configured this function on their own. I think it's no need to change, but would be better to show some examples.

ShingoFukuyama commented 9 years ago

Added a few examples on the document.