Closed xin-jin closed 8 years ago
Note that if you disable pre-input, you can always use C-w
to yank the word at point into the input (similar to helm-occur
), which should give you what you want:
C-s
→ isearch replacement,C-s C-w
→ pre-input the symbol at point.See also #90.
@jeberger But C-s C-w
is two keys. I am not sure how to combine these two functions together into a function (as C-w applies to the Helm Swoop buffer)?
How about this? Overriding helm-swoop-without-pre-input
only within the function.
(defun helm-swoop-with-no-query ()
(interactive)
(let ((_helm-swoop-pre-input-function helm-swoop-pre-input-function))
(unwind-protect
(progn
(setq helm-swoop-pre-input-function (lambda () nil))
(helm-swoop))
(setq helm-swoop-pre-input-function _helm-swoop-pre-input-function))))
@ShingoFukuyama Thanks, this seems to work great! Would you mind incorporating it into the package?
Moreover, one nice feature of helm-occur
is that when we hit RET, the line we select will flash for half-second so that we know exactly where we are. This is actually very useful, since my cursor is only a vertical line, because of which I always need to spend some time looking for where I am when the search buffer window quits.
Possible to implement this?
I added helm-swoop-without-pre-input
.
helm-swoop always highlighting the target line and words both on buffers, as long as your face/color settings are correct.
@ShingoFukuyama Thanks for adding the function!
No, I didn't mean the highlighting when helm-swoop is on. I meant the "flash highlighting" on the target line in the original buffer after the helm occur buffer closes (when I hit RET on the selected line). You can try running helm-occur, and you'll see.
I understood what you meant to do. The feature works in the latest update.
Thanks! It works perfectly now.
Hi,
I know it has been mentioned several times in issues, and I understand that I can configure the pre-input to change the default behavior. But is it possible to just implement something like
helm-swoop-without-pre-input
(with behavior just likehelm-occur
)? I would like to keep both the no-pre-input (to replace isearch) version and the currently default one, and thus doesn't want to change the pre-input-fucntion.Thanks!