forked from FG42/FG42
ivy replaced ido as default executor
This commit is contained in:
parent
93fc64e873
commit
11abaff474
|
@ -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
|
||||||
;; ==========
|
;; ==========
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)))
|
||||||
|
|
||||||
|
|
|
@ -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 ---------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue