-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Adding swiper-helm for re-search in helm #4862
Conversation
👍 |
(defun spacemacs/swiper-helm-region-or-symbol () | ||
(interactive) | ||
(swiper-helm | ||
(if (region-active-p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copy-pasted this code because I was not sure where to extract a private function (like spacemacs--region-or-symbol-at-point
) to. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit simpler:
(if (region-active-p)
(buffer-substring-no-properties (region-beginning)
(region-end))
(or (thing-at-point 'symbol t) ""))
What's the difference with |
@syl20bnr Not much, I guess...closing this |
Why close this? Don't give up so easily...defend it! |
@robbyoconnor Well, this one works with numbers and is faster when specifying regexes...not sure this is enough grounds to reopen this though. |
23e744c
to
805d200
Compare
Reopened, now it's a user-configurable option. Can you review again? cc @robbyoconnor @syl20bnr |
|
||
(spacemacs/set-leader-keys | ||
"ss" 'swiper-helm | ||
"sS" 'spacemacs/swiper-helm-region-or-symbol)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now these two substitute helm-swoop by user choice.
I have no objections, but @syl20bnr is the boss |
core/core-dotspacemacs.el
Outdated
@@ -171,6 +171,9 @@ start.") | |||
(defvar dotspacemacs-helm-position 'bottom | |||
"Position in which to show the `helm' mini-buffer.") | |||
|
|||
(defvar dotspacemacs-helm-use-swiper nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be a variable local to the layer, defined in a file config.el
.
No need for a variable, you can add |
☝️ Doooo it DOOOOOOOOOOOOOOOOOO IT |
1401321
to
4f06c1e
Compare
Done, hope it's fine now |
@robbyoconnor @syl20bnr Is this what you mentioned? |
4f06c1e
to
9210807
Compare
Autumnal cleanup: Needs conflicts resolution. What is the status on this PR? |
I don't think this PR makes sense anymore, I'll close it and come back if I ever see a need for this package again. |
Adding swiper-helm to 'Search' menu for regexp-based search with helm.