ivy-initial-inputs-alist is a variable that controls the default minibuffer contents when using ivy (which is used by counsel).
The default "^" string means that if you type something immediately after this string only completion candidates that begin with what you typed are shown.
You can remove this default string in counsel-M-x command with:
What you want can be achieved by adding a new source to completion-at-point-functions. This isn't specific to ivy, but ivy makes use of it:
(defun dabbrev-complation-at-point ()
(let* ((abbrev (dabbrev--abbrev-at-point))
(candidates (dabbrev--find-all-expansions abbrev t))
By default (I am not familiar with Spacemacs overrides), Ivy binds C-m/RET to the command ivy-done and C-j to ivy-alt-done. As described in the manual, the difference is that the former ends the completion session with the currently selected candidate, whereas the latter enters a directory in the case of filename completion. See also the manual section on ...
This might be the best solution:
(setq ivy-extra-directories nil)
Not only will you not accidentally dired into ./, it's not even displayed as a candidate. And ../ is redundant too because you can just use the keyboard shortcut for "up one level"
read-file-name has lots of optional parameters. You are supplying default as the value for default-filename. The documentation says that this is the value used if the user exits with the same non-empty string inserted by this function.
What you need to do is provide this non-empty string, which is the value of the parameter initial. So you need
counsel-yank-pop works as desired as of 2017-12-08.
The command now also accepts the same prefix argument as yank-pop which causes the corresponding kill to be preselected during completion.
Finally, counsel-yank-pop improves upon yank-pop in that it does not require the last-command to be a yank. In such cases it just inserts the selected kill at point ...
The dedicated buffers you are talking about in your question are ivy-occur-grep-mode-buffers.
Those are filled by counsel-ag-occur.
Only the default directory and the buffer name containing the search words are needed for counsel-ag-occur.
That information must be present in the links to ivy-occur-grep-mode-buffers.
The following lisp code defines a new org ...
Setting ivy-initial-inputs-alist to an empty string for counsel-M-x specifically can be done via the M-x customize-option RET ivy-initial-inputs-alist RET interface.
Shown here as a lisp-expression
'((counsel-minor . "^+")
(counsel-package . "^+")
(counsel-org-capture . "^")
(counsel-M-x . "")
I've found the solution, (intern (ivy-state-current ivy-last)) will return the symbol of the current ivy result, which I can then pass to describe-function or describe-variable.
(defun counsel-describe-function-or-variable ()
"Display help about the currently selected ivy result.
Assumes the symbol is a function and tries with a variable describe-...
For a regular counsel (that is actually using ivy backend) try to setup smth like:
(setq ivy-re-builders-alist '((swiper . ivy--regex-plus)
(t . ivy--regex-fuzzy)))
It will use fuzzy searching for all ivy/counsel except for swiper.
Also for M-x install smex package. Then counsel-M-x function will use it to provide better ...
Sorry, I haven't really tried this, but can't you just use a let binding instead of the call to setq?
(let ((magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1))
... something like that
I just figured this out myself (using counsel-dired as a model):
(defun my--choose-directory (directory-to-start-in)
"Return a directory chosen by the user. The user will be prompted
to choose a directory starting with `directory-to-start-in'"
(let* ((ivy-read-prompt "Choose directory: ")
What I would want is a function or a package that could display all opened projectile projects with ivy or helm and let me choose a candidate. When the candidate would be selected, the last buffer opened in that project would be opened. It would be basically a counsel-switch-buffer but with projects. If possible the last visited project would display first.
Press C-M-y (ivy-insert-current-full) to yank the current directory on to the end of the current path. This can then be edited as usual and then hitting tab goes back to normal ivy completion.
Thanks to Basil for providing this in the comments to the question.
counsel-locate essentially just calls the system locate command (see man 1 locate).
You can control which executable is called by customising the user option locate-command from the built-in package locate.el.
You can further control the exact command that counsel-locate issues by customising the user option counsel-locate-cmd.
On GNU/Linux, the default ...
counsel-git is calling counsel-git-cands to build the list of files.
counsel-git-cands is running the shell command, which is stored in variable counsel-git-cmd, which has the value "git ls-files -z --full-name --".
So you have two different options:
modify the result of function counsel-git-cands to remove files from the list, you do not want. i....
Check out ivy-faces.el for most of the faces of interest. The face you are asking specifically is called ivy-current-match. You wanna call describe-face and choose customize this face for customization.
I suspect the reason for this is:
Calling counsel-switch-buffer is triggering a window configuration change.
window-configuration-change-hook contains window--adjust-process-windows to "Update process window sizes to match the current window configuration", which calls set-process-window-size for each process in each affected window, which talks ...
I've asked a similar question some years ago, it appears to be the byproduct of a rename: https://github.com/abo-abo/swiper/issues/915#issuecomment-286198927. To quote the relevant part:
Oh yea. By popular demand, swiper 0.7.0 -> ivy 0.8.0. On ELPA, ivy 0.8.0 bundles ivy, swiper and counsel. On MELPA, they are separate.
You can also try C-u M-x project-find-regexp.
It's a part of the project package, built-in in the latest versions of Emacs but also distributed through GNU ELPA.
Be warned though: this calling convention doesn't honor the .gitignore entries (only ignores standard "junk" files and utility directories). So if you have a lot of files in the ...
I'm not sure why you have both (counsel-projectile-mode) and (counsel-projectile-mode nil) in your .emacs file. Have you tried simply adding a hook to start (counsel-projectile-mode) when loading projectile? Delete (or comment out) the lines you currently have for counsel-projectile-mode and try this:
(add-hook 'projectile-mode-hook 'counsel-projectile-mode)...
Adding the following to my .emacs seems to solve the problem:
But I'm a little bit confused, because 41.1 Packaging Basics says that
Whenever Emacs starts up, it automatically calls the function
package-initialize to load installed packages.
Moreover, I had the same version of Emacs on a Linux machine, and I'm using the same ...
I think it has something to do with ivy-prescient. Although, there is ivy-prescient-excluded-commands which contains counsel-ag to prevent the regex generation from being disturbed I have to add
'((swiper . ivy--regex-plus)
(counsel-ag . ivy--regex-plus)
(counsel-rg . ivy--regex-plus)
Latest version of counsel (version 20190522.2133 on MELPA) has counsel-register.
From the documentation:
counsel-register is an interactive, autoloaded function defined in
Interactively choose a register.
This command is not in any keymaps.
counsel-register is unused in ...