summaryrefslogtreecommitdiff
path: root/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'init.org')
-rw-r--r--init.org65
1 files changed, 26 insertions, 39 deletions
diff --git a/init.org b/init.org
index 2873ef0..01a81aa 100644
--- a/init.org
+++ b/init.org
@@ -757,57 +757,44 @@ TODO: here’s the rest of my shell configuration:
(global-set-key (kbd "C-c m") 'magit-status)
#+END_SRC
-* Smex and Ido
+* Smex and Ivy
:PROPERTIES:
-:header-args: :noweb-ref ido
+:header-args: :noweb-ref ivy :noweb yes
:END:
#+BEGIN_SRC elisp
-(require 'ido-vertical-mode)
-(ido-mode 1)
-(ido-vertical-mode 1)
-(setq ido-vertical-define-keys 'C-n-and-C-p-only)
-(setq ido-cr+-max-items 50000)
-;; hit ~ to go straight to the home directory in ido mode
-(add-hook 'ido-setup-hook
- (lambda ()
- ;; Go straight home
- (define-key ido-file-completion-map
- (kbd "~")
- (lambda ()
- (interactive)
- (if (looking-back "/")
- (insert "~/")
- (call-interactively 'self-insert-command))))))
-
-;; Use ido everywhere
-(require 'ido-ubiquitous)
-(ido-ubiquitous-mode 1)
-(fset 'yes-or-no-p 'y-or-n-p)
+(require 'ivy)
+(ivy-mode 1)
+(setq ivy-use-virtual-buffers t)
+(setq enable-recursive-minibuffers t)
+(global-set-key "\C-s" 'swiper)
+(global-set-key (kbd "C-c C-r") 'ivy-resume)
+(global-set-key (kbd "M-x") 'counsel-M-x)
+(global-set-key (kbd "<menu>") 'counsel-M-x)
+(global-set-key (kbd "C-x C-f") 'counsel-find-file)
+(global-set-key (kbd "C-h f") 'counsel-describe-function)
+(global-set-key (kbd "C-h v") 'counsel-describe-variable)
+(global-set-key (kbd "C-c u") 'counsel-unicode-char)
+(global-set-key (kbd "C-c g") 'counsel-git)
+(global-set-key (kbd "C-c j") 'counsel-git-grep)
+(global-set-key (kbd "C-c k") 'counsel-ag)
+(global-set-key (kbd "C-x l") 'counsel-locate)
+(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
;; open file at point with C-x C-f
-(setq ido-use-filename-at-point 'guess)
-#+END_SRC
-
-Smex is a very nice replacement for the builtin =M-x= feature. It gives me fuzzy matching and lists recently and most frequently used commands first.
-
-#+BEGIN_SRC elisp
-(require 'smex)
-(smex-initialize)
+;(setq ido-use-filename-at-point 'guess)
#+END_SRC
Here are some key bindings to use Smex features.
#+BEGIN_SRC elisp :noweb-ref smex-keys
-(global-set-key (kbd "M-x") 'smex)
-(global-set-key (kbd "M-X") 'smex-major-mode-commands)
-(global-set-key (kbd "<menu>") 'smex)
-(global-set-key (kbd "S-<menu>") 'smex-major-mode-commands)
+;(global-set-key (kbd "M-X") 'smex-major-mode-commands)
+;(global-set-key (kbd "S-<menu>") 'smex-major-mode-commands)
#+END_SRC
-#+BEGIN_SRC elisp :noweb-ref ido-lazy
-(with-eval-after-load "ido"
- <<ido>>
+#+BEGIN_SRC elisp :noweb-ref ivy-lazy
+(with-eval-after-load "ivy"
+ <<ivy>>
)
<<smex-keys>>
#+END_SRC
@@ -1813,8 +1800,8 @@ Having defined named code blocks in the sections above we can finally put them a
<<scheme>>
<<god>>
<<email-lazy>>
-<<ido-lazy>>
<<exwm>>
+<<ivy-lazy>>
<<completion-lazy>>
<<pretty-symbols>>
<<resize-dynamically>>