ivy replaced ido as default executor

This commit is contained in:
Sameer Rahmani 2017-08-21 17:27:26 +01:00
parent 93fc64e873
commit 11abaff474
4 changed files with 25 additions and 10 deletions

View File

@ -13,7 +13,7 @@
;; ABILITIES ;; ABILITIES
;; ========= ;; =========
;; Disable abilities which you don't want. ;; Disable abilities which you don't want.
(disable 'rbenv 'helm 'spell 'linum 'smart-mode-line) (disable 'rbenv 'helm 'spell 'linum 'smart-mode-line 'desktop-mode 'ido)
;; EXTENSIONS ;; EXTENSIONS
;; ========== ;; ==========

View File

@ -35,7 +35,8 @@
(depends-on 'tramp)) (depends-on 'tramp))
(with-ability ivy (with-ability ivy
(depends-on 'ivy)) (depends-on 'ivy)
(depends-on 'counsel))
(with-ability ido (with-ability ido
(depends-on 'ido) (depends-on 'ido)

View File

@ -11,13 +11,20 @@ Repeated invocations toggle between the two most recently open buffers."
(switch-to-buffer (other-buffer (current-buffer) 1))) (switch-to-buffer (other-buffer (current-buffer) 1)))
(defun buffer-match-p (buf) (defun buffer-match-p (buf)
"If BUF name match the favorite buffer regexp."
(string-match-p *favorite-buffer* (buffer-name buf))) (string-match-p *favorite-buffer* (buffer-name buf)))
(defun switch-and-bury (buf)
"Switch to given BUF and bury it as well."
(interactive)
(bury-buffer buf)
(switch-to-buffer buf))
(defun switch-to-buffer-by-regex () (defun switch-to-buffer-by-regex ()
"Switch to buffer which the name match the *favorite-buffer* regex." "Switch to buffer which the name match the *favorite-buffer* regex."
(interactive) (interactive)
(if *favorite-buffer* (if *favorite-buffer*
(switch-to-buffer (switch-and-bury
(car (remove-if-not #'buffer-match-p (buffer-list)))) (car (remove-if-not #'buffer-match-p (buffer-list))))
(eshell))) (eshell)))

View File

@ -79,12 +79,12 @@
(spaceline-compile (spaceline-compile
"ati" "ati"
'( '(
((ati-modified ati-window-numbering ati-buffer-size lxdrive) :face highlight-face :skip-alternate t) ((ati-modified ati-window-numbering ati-buffer-size lxdrive) :face highlight-face :skip-alternate t)
((ati-projectile ati-mode-icon ati-buffer-id) :face default-face) ((ati-projectile ati-mode-icon ati-buffer-id) :face default-face)
((ati-process ati-position ati-region-info) :face highlight-face :separator " | ") ((ati-process ati-position ati-region-info) :face highlight-face :separator " | ")
((ati-vc-icon ati-flycheck-status ati-(point)ackage-updates purpose) :separator " · " :face other-face) ((ati-vc-icon ati-flycheck-status ati-(point)ackage-updates purpose) :separator " · " :face other-face)
;; ((minor-modes) :face default-face) ;; ((minor-modes) :face default-face)
) )
'(((ati-time) :separator " | " :face default-face))) '(((ati-time) :separator " | " :face default-face)))
@ -242,9 +242,16 @@
(ability ivy () (ability ivy ()
"Completion using ivy." "Completion using ivy."
(require 'ivy) (require 'ivy)
(require 'counsel)
(ivy-mode 1) (ivy-mode 1)
(setq ivy-use-virtual-buffers t) (setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
(global-set-key (kbd "<f1> l") 'counsel-find-library)
(global-set-key (kbd "C-c C-r") 'ivy-resume)) (global-set-key (kbd "C-c C-r") 'ivy-resume))
;; Swiper --------------------------------------------------- ;; Swiper ---------------------------------------------------