Created
February 14, 2012 00:17
-
-
Save mad-p/1821807 to your computer and use it in GitHub Desktop.
TAB to update anything candidates without delay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun anything-update-or-select-action () | |
"Immediately update anything candidates without delay. | |
If invoked twice in a row, does anything-select-action" | |
(interactive) | |
(if (eq last-command 'anything-update-or-select-action) | |
(anything-select-action) | |
(anything-check-new-input (minibuffer-contents)))) | |
(mapc #'(lambda (sym) | |
(let ((map (and (boundp sym) (symbol-value sym)))) | |
(and map | |
(mapc #'(lambda (key) | |
(if (eq (lookup-key map key) 'anything-select-action) | |
(define-key map key 'anything-update-or-select-action))) | |
(list "\C-i" (kbd "<tab>")))))) | |
'(anything-map anything-c-bookmark-map anything-c-buffer-map | |
anything-c-etags-map anything-c-grep-map anything-c-pdfgrep-map | |
anything-c-read-file-map anything-c-ucs-map | |
anything-esh-on-file-map anything-eval-expression-map | |
anything-find-files-map anything-generic-files-map)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment