(when (maybe-require-package 'ivy)
  (after-load 'ivy
    (setq-default ivy-use-virtual-buffers t
                  ivy-count-format ""
                  projectile-completion-system 'ivy)
    ;; IDO-style directory navigation
    (define-key ivy-minibuffer-map (kbd "C-j") #'ivy-immediate-done)
    (define-key ivy-minibuffer-map (kbd "RET") #'ivy-alt-done)
    (when (maybe-require-package 'diminish)
      (diminish 'ivy-mode)))

  (add-hook 'after-init-hook
            (lambda ()
              (when (bound-and-true-p ido-ubiquitous-mode)
                (ido-ubiquitous-mode -1)
                (ido-mode -1))
              (ivy-mode 1))))


(when (maybe-require-package 'counsel)
  (setq-default counsel-mode-override-describe-bindings t)
  (when (maybe-require-package 'diminish)
    (after-load 'counsel
      (diminish 'counsel-mode)))
  (add-hook 'after-init-hook 'counsel-mode))


;;(when (maybe-require-package 'swiper)
;;  (after-load 'ivy
;;    (define-key ivy-mode-map (kbd "C-s") 'swiper)))



(provide 'init-ivy)

(when (maybe-require-package 'ivy)
  (after-load 'ivy
    (setq-default ivy-use-virtual-buffers t
                  ivy-count-format ""
                  projectile-completion-system 'ivy
                  ivy-initial-inputs-alist
                  '((man . "^")
                    (woman . "^")))
    ;; IDO-style directory navigation
    (define-key ivy-minibuffer-map (kbd "C-j") #'ivy-immediate-done)
    (define-key ivy-minibuffer-map (kbd "RET") #'ivy-alt-done)
    (when (maybe-require-package 'diminish)
      (diminish 'ivy-mode)))

  (add-hook 'after-init-hook
            (lambda ()
              (when (bound-and-true-p ido-ubiquitous-mode)
                (ido-ubiquitous-mode -1)
                (ido-mode -1))
              (ivy-mode 1))))


(when (maybe-require-package 'counsel)
  (setq-default counsel-mode-override-describe-bindings t)
  (when (maybe-require-package 'diminish)
    (after-load 'counsel
      (diminish 'counsel-mode)))
  (add-hook 'after-init-hook 'counsel-mode))


;;(when (maybe-require-package 'swiper)
;;  (after-load 'ivy
;;    (define-key ivy-mode-map (kbd "C-s") 'swiper)))



(provide 'init-ivy)

Remove initial "^" input from most ivy prompts
Remove initial "^" input from most ivy prompts

roxolan/emacs.d,dcorking/emacs.d,cjqw/emacs.d,sgarciac/emacs.d,arthurl/emacs.d,cyjia/emacs.d,me020523/emacs.d,benkha/emacs.d,kongfy/emacs.d,lust4life/emacs.d,emuio/emacs.d,braveoyster/emacs.d,gsmlg/emacs.d,mmqmzk/emacs.d,purcell/emacs.d,blueabysm/emacs.d,blueseason/emacs.d,kindoblue/emacs.d,qianwan/emacs.d,svenyurgensson/emacs.d,krzysz00/emacs.d,baohaojun/emacs.d,fengxl/emacs.d,wegatron/emacs.d