-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
counsel-git-grep' followed by
ivy-next-history-element'
#409
Comments
It works on my end. Try to reproduce with |
Still not working. It's only after I remove the ''<" and the ">" that it finds a match. |
|
|
Can you try with 2.7.2? |
I'm having a hard time setting I'm using this: (use-package swiper
:ensure t
:init (ivy-mode 1)
:diminish ivy-mode
:bind (("C-S-s" . swiper)
("C-c C-r" . ivy-resume)
("<f6>" . ivy-resume)
("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file)
("<f1> f" . counsel-describe-function)
("<f1> v" . counsel-describe-variable)
("<f1> l" . counsel-load-library)
("<f2> i" . counsel-info-lookup-symbol)
("<f2> u" . counsel-unicode-char)
("C-c g" . counsel-git)
("C-c j" . counsel-git-grep)
("C-x l" . counsel-locate))
:config
(csetq ivy-use-virtual-buffers t)
(use-package counsel
:ensure t
:config
(setq-default counsel-git-grep-cmd "/home/jdahm/src/git/git --no-pager grep --full-name -n --no-color -i -e %S")
(setq-default counsel-git-grep-cmd-history "/home/jdahm/src/git/git --no-pager grep --full-name -n --no-color -i -e %S"))) |
Looks like the
A plain
No need to set this manually. This is simply the initial history for C-u |
Thanks for the quick reply. Even after a few years with Emacs I'm not an expert, and always looking to learn tips.
I got the idea from your config, but for now I'm using (defmacro csetq (var val)
"Call `customize-set-variable' to set VAR to VAL."
`(funcall 'customize-set-variable ',var ,val)) The idea was something like customize-setq to use the customize interface instead of directly `set-variable'. On a related note, I'm still not sure the best way to deal with the defcustom vs defvar issues, but we should discuss that another time. Here's what I ended up using to debug: (defun my-counsel-git-grep ()
(interactive)
(counsel-git-grep "/home/jdahm/src/git/git --no-pager grep --full-name -n --no-color -i -e %S")) Executing |
Seems to not even work on the command line: $ ~/src/git/git --no-pager grep --full-name -n --no-color -i -e \_<String\_>
-bash: syntax error near unexpected token `newline' I tried wrapping |
Try wrapping it with single quotes. You see, |
I tried that, and then it matches nothing in the code, even when there is a clear 'String' in the code with spaces on either side. I can just remove them by default, or hit `M-n' again. However, I'd like to understand how this is supposed to work, and how I'm either misunderstanding it or using it incorrectly. Can you give me an example where it will definitely give a match? Is there a page somewhere that explains the regexp? Thanks again for the help. |
I've made a mistake checking The bug should be fixed now, thanks for reporting. |
Excellent work! |
Excellent work with ivy, I recently switched back from ido again.
As for this issue: the message "3 chars left" disappears, but the combination doesn't start the git grep process. Typing more chars doesn't help.
The text was updated successfully, but these errors were encountered: