Oleh Krehel [Tue, 30 Jun 2015 07:15:47 +0000 (09:15 +0200)]
Make counsel-locate use a process
* counsel.el (counsel-locate-function): Update.
(counsel--async-command): New defun.
(counsel--async-sentinel): New defun.
(counsel-locate): Switch to :action, thus allowing "C-M-n" and `ivy-resume'.
Oleh Krehel [Mon, 29 Jun 2015 08:21:37 +0000 (10:21 +0200)]
Make counsel-el work with "C-M-n" and "C-M-p"
* counsel.el (counsel-el): Use the whole obarray if no initial input is
given. Filter out only function when appropriate.
(counsel-completion-beg): New defvar.
(counsel-completion-end): New defvar.
(counsel--el-action): New defun.
* ivy.el (ivy--reset-state): Set `ivy--full-length' to nil.
Oleh Krehel [Thu, 25 Jun 2015 16:36:28 +0000 (18:36 +0200)]
Allow to recursively match history with "C-r"
* ivy.el (ivy-minibuffer-map): Rebind "C-r" from
`ivy-previous-line-or-history' to `ivy-reverse-i-search'. "C-r"
binding was redundant, since "C-p" does almost the same.
(ivy-read): Separate the functionality that sets the global state based
on `ivy-last'.
(ivy--reset-state): New defun. Move all the global state setup here.
(ivy-reverse-i-search): New command. This is very similar to "C-r" in
bash - allows to match for history elements, instead of just scrolling
through them with "M-p" and "M-n".
Kaushal Modi [Fri, 19 Jun 2015 18:52:33 +0000 (14:52 -0400)]
Fix the case where file name can contain ~
- The fix make opening files like init.el~ now possible. Earlier,
hitting that last ~ char switch the dir to ~/
- This commit will now make that cd to ~/ only if ~ is the first char in
the search term
Oleh Krehel [Fri, 19 Jun 2015 13:53:39 +0000 (15:53 +0200)]
Improve performance for "^" initial input
ivy.el (ivy--filter): There's no need to anchor when the previous regex
is "^" (matches everything). The result will be index 0 anyway, but
without this optimization it can be slow for ~30k candidates.
Oleh Krehel [Fri, 19 Jun 2015 12:34:19 +0000 (14:34 +0200)]
Add better positioning to counsel-git-grep finalizer
counsel.el (counsel-git-grep-action): Use a regex instead of just
splitting the string on ":". Additionally, goto match, not just the line
of the match.
Oleh Krehel [Fri, 19 Jun 2015 11:39:33 +0000 (13:39 +0200)]
"M-i" should not switch directories
ivy.el (ivy-insert-current): When the current candidate is a directory,
just insert its name without the last "/". The user can insert "/" to
switch to that directory if necessary.
Oleh Krehel [Fri, 19 Jun 2015 09:07:07 +0000 (11:07 +0200)]
ivy.el (ivy-kill-line): Add and bind to "C-k"
The only difference to `kill-line' is that it will kill the whole input
when at the end of the minibuffer. In that case, the regular `kill-line'
was extending into the second line of the minibuffer, which is
unacceptable.
Oleh Krehel [Thu, 18 Jun 2015 11:40:44 +0000 (13:40 +0200)]
Put the file instead of partial input on history
* ivy.el (ivy-read): When completing file names, put the whole file name
on history, not just the partial input that lead to that name.
This is important in order for `ivy--cd-maybe' to work.
Oleh Krehel [Thu, 18 Jun 2015 11:32:36 +0000 (13:32 +0200)]
"M-n", "M-p", "M-i" should switch directories when needed
* ivy.el (ivy-previous-history-element):
(ivy-next-history-element):
(ivy-switch-buffer): Call `ivy--cd-maybe'.
(ivy--cd-maybe): New defun. Check if the current input points to a
different directory than `ivy--directory'. If so, `ivy--cd' there.
Alexey Veretennikov [Wed, 17 Jun 2015 22:13:49 +0000 (00:13 +0200)]
Merge remote-tracking branch 'ztree/master'
1) Fixed bug with where the user unable to delete a file
or directory
2) Added hotkey 'H' in ztree-diff to toggle between hide/show
of the ignored files (i.e. starting with .dot)
3) Ignored files do not affect the directory status anymore.
4) Since the new hotkey is added, the version number is increased.
Oleh Krehel [Tue, 16 Jun 2015 09:42:46 +0000 (11:42 +0200)]
ivy-hydra.el: Improve for hydra not installed
* ivy-hydra.el (hydra): No error on require.
(package-installed-p): Enable recursive minibuffers.
(hydra-ivy): Use ASCII char instead of Unicode, since the char width may
cause misalignment.
Oleh Krehel [Tue, 16 Jun 2015 07:43:15 +0000 (09:43 +0200)]
swiper.el (swiper-query-replace): Don't miss the first
* swiper.el (swiper-query-replace): Since the point is always after the
matching thing in swiper, it's necessary to move it before it in order
for `perform-replace' not to skip it.
Oleh Krehel [Tue, 16 Jun 2015 07:38:49 +0000 (09:38 +0200)]
Require TRAMP in time
* ivy.el (ivy-alt-done): Require tramp before use. Store `ivy-last'
before calling `ivy-read', since each `ivy-read' overwrites
`ivy-last', and this one overwrites `counsel-find-file' action.