emacsorphanage / helm-swoop

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

Could you please implement this feature? #65

Open yinhang-e5b0b9e888aa opened 9 years ago

yinhang-e5b0b9e888aa commented 9 years ago

Hi,

It might be more convenient if I can input search string after opening swoop, instead of using the symbol under the cursor, like helm-occur did.

Especially while parsing large files, if currently the cursor is at above whitespace, swoop tries to copy the whole buffer to mini buffer, which lags a lot.

P.S. Could you improve the performance of handling large files, such as 50MB .

Thanks.

tuhdo commented 9 years ago

You can disable pre-input with:

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

So, helm-swoop won't automatically use symbol at point. But originally, you can always erase the symbol in your Helm prompt.

About handling large file. you can disable color to improve performance:

(setq helm-swoop-speed-or-color nil)

But I agree there should be an option to not copy the whole buffer into Helm Swoop buffer.

ghost commented 9 years ago

But I agree there should be an option to not copy the whole buffer into Helm Swoop buffer.

:+1:

Most of the time I'll search and not realize how huge the file was. I thought that it was a problem with C++ mode but it just happened with a very large JSON file as well & it only happens when using helm swoop.

For now I've thrown in a check for file size before performing helm swoop & falling back to the default C-s search.

CeleritasCelery commented 6 years ago

you should also be able to reduce helm-swoop-candidate-number-limit and it will improve performance.