Move from Helm to Ivy/Counsel
This commit is contained in:
parent
ed7d5591b6
commit
e6dcae995b
@ -1025,22 +1025,6 @@ EDiff and Org-mode files don’t play nice together…
|
||||
(activate-mark))
|
||||
#+END_SRC
|
||||
|
||||
** Make the slash (~/~) key act like ~C-j~ in some Helm views
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun gpolonkai/helm-ff-slash-dir-complete ()
|
||||
"Make forward slash (/) do completion in helm."
|
||||
(interactive)
|
||||
(if (and (or
|
||||
(equal "magit-status" (assoc-default 'name (helm-get-current-source)))
|
||||
(equal "Find Files" (assoc-default 'name (helm-get-current-source)))
|
||||
(equal "helm-mode-insert-file" (assoc-default 'name (helm-get-current-source))))
|
||||
(stringp (helm-get-selection))
|
||||
(file-directory-p (helm-get-selection)))
|
||||
(helm-execute-persistent-action)
|
||||
(insert "/")))
|
||||
#+END_SRC
|
||||
|
||||
** Turn the cursor to purple if Yasnippet’s TAB function would fire
|
||||
|
||||
Taken from [[http://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua’s config]].
|
||||
@ -2347,7 +2331,7 @@ accompanying function will be added to ~mu4e-view-mode-hook~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package mu4e
|
||||
:after helm
|
||||
:after ivy
|
||||
:ensure nil
|
||||
:config
|
||||
(require 'org-mu4e)
|
||||
@ -2401,7 +2385,7 @@ accompanying function will be added to ~mu4e-view-mode-hook~.
|
||||
(mu4e-refile-folder . "/Private/Drafts"))))
|
||||
org-mu4e-link-query-in-headers-mode nil)
|
||||
:custom
|
||||
(mu4e-completing-read-function 'helm-comp-read)
|
||||
(mu4e-completing-read-function ivy-completing-read)
|
||||
(mu4e-context-policy 'pick-first)
|
||||
(mu4e-confirm-quit nil)
|
||||
(mail-user-agent 'sendmail-user-agent)
|
||||
@ -3185,123 +3169,120 @@ See previous versions of the current file.
|
||||
(require 'company-web-html))
|
||||
#+END_SRC
|
||||
|
||||
* Helm & Co.
|
||||
* Ivy & Co.
|
||||
|
||||
** Helm
|
||||
** Ivy & Counsel
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm
|
||||
:init
|
||||
(require 'helm-config)
|
||||
:custom
|
||||
(helm-M-x-fuzzy-match t)
|
||||
(helm-buffers-fuzzy-matching t)
|
||||
(helm-recentf-fuzzy-match t)
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ivy
|
||||
:config
|
||||
(helm-mode t)
|
||||
:bind
|
||||
(("M-x" . helm-M-x)
|
||||
:map ctl-x-map
|
||||
("C-f" . helm-find-files)
|
||||
("b" . helm-mini)
|
||||
:map helm-map
|
||||
("/" . gpolonkai/helm-ff-slash-dir-complete)))
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** GNU Globals with Helm
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun gpolonkai/enable-helm-gtags-mode ()
|
||||
(helm-gtags-mode t))
|
||||
|
||||
(use-package helm-gtags
|
||||
(ivy-mode 1)
|
||||
:custom
|
||||
(helm-gtags-auto-update t)
|
||||
(helm-gtags-ignore-case t)
|
||||
(helm-gtags-path-style 'relative)
|
||||
:hook
|
||||
(c-mode . gpolonkai/enable-helm-gtags-mode)
|
||||
(ivy-use-virtual-buffers t)
|
||||
(ivy-count-format "(%d/%d) ")
|
||||
(ivy-use-selectable-prompt t))
|
||||
(use-package counsel
|
||||
:config
|
||||
(counsel-mode)
|
||||
:bind
|
||||
(:map helm-gtags-mode-map
|
||||
("M-t" . helm-gtags-find-tag)
|
||||
("M-r" . helm-gtags-find-rtag)
|
||||
("M-s" . helm-gtags-find-symbol)
|
||||
("M-g M-p" . helm-gtags-parse-file)
|
||||
("C-c <" . helm-gtags-previous-history)
|
||||
("C-c >" . helm-gtags-next-history)
|
||||
("M-," . helm-gtags-pop-stack)))
|
||||
#+END_SRC
|
||||
(:map company-mode-map
|
||||
("C-c j" . counsel-company)
|
||||
:map company-active-map
|
||||
("C-c j" . counsel-company)))
|
||||
#+end_src
|
||||
|
||||
** Ag with Helm
|
||||
** GNU Globals with Counsel
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-ag
|
||||
#+begin_src emacs-lisp
|
||||
(defun gpolonkai/enable-counsel-gtags-mode ()
|
||||
(counsel-gtags-mode t))
|
||||
|
||||
(use-package counsel-gtags
|
||||
:custom
|
||||
(counsel-gtags-auto-update t)
|
||||
(counsel-gtags-path-style 'relative)
|
||||
:hook
|
||||
(c-mode . gpolonkai/enable-counsel-gtags-mode)
|
||||
:bind
|
||||
(:map counsel-gtags-mode-map
|
||||
("M-t" . counsel-gtags-find-definition)
|
||||
("M-r" . counsel-gtags-find-reference)
|
||||
("M-s" . counsel-gtags-find-symbol)
|
||||
("C-c <" . counsel-gtags-go-backward)
|
||||
("C-c >" . counsel-gtags-go-forward)))
|
||||
#+end_src
|
||||
|
||||
** Ag with Counsel
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel-ag-popup
|
||||
:bind
|
||||
(:map gpolonkai/pers-map
|
||||
("s" . helm-do-ag)))
|
||||
#+END_SRC
|
||||
("s" . counsel-ag-popup)))
|
||||
#+end_src
|
||||
|
||||
** Projectile with Helm
|
||||
** Projectile with Counsel
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-projectile
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel-projectile
|
||||
:custom
|
||||
(projectile-completion-system 'helm)
|
||||
(projectile-completion-system 'ivy)
|
||||
:config
|
||||
(helm-projectile-on))
|
||||
#+END_SRC
|
||||
(counsel-projectile-mode))
|
||||
#+end_src
|
||||
|
||||
** FlySpell with Helm
|
||||
** FlySpell with Ace
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-flyspell
|
||||
:demand
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ace-flyspell
|
||||
:bind
|
||||
(:map flyspell-mode-map
|
||||
("C-M-i" . helm-flyspell-correct)))
|
||||
#+END_SRC
|
||||
("C-M-i" . ace-flyspell-correct-word)))
|
||||
#+end_src
|
||||
|
||||
** C Yasnippets with Helm
|
||||
** C Yasnippets with Ivy
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-c-yasnippet
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ivy-yasnippet
|
||||
:after
|
||||
yasnippet
|
||||
:demand t
|
||||
:custom
|
||||
(helm-yas-space-match-any-greedy t)
|
||||
:bind
|
||||
(("C-c y" . helm-yas-complete)))
|
||||
#+END_SRC
|
||||
(("C-c y" . ivy-yasnippet)))
|
||||
#+end_src
|
||||
|
||||
** PyDoc with Helm
|
||||
** PyDoc with Counsel
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-pydoc)
|
||||
#+END_SRC
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel-pydoc)
|
||||
#+end_src
|
||||
|
||||
** BibTex with Helm
|
||||
** BibTex with Ivy
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-bibtex
|
||||
First, set up ~bibtex-completion~:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package bibtex-completion
|
||||
:after
|
||||
org
|
||||
:custom
|
||||
(bibtex-completion-bibliography (expand-file-name "references.bib" org-directory))
|
||||
(bibtex-completion-library-path (expand-file-name "bibtex-pdfs" org-directory))
|
||||
(bibtex-completion-pdf-open-function 'org-open-file)
|
||||
:config
|
||||
(setq bibtex-completion-notes-path (expand-file-name
|
||||
(convert-standard-filename "bibliography/helm-bibtex-notes")
|
||||
(bibtex-completion-notes-path (expand-file-name
|
||||
(convert-standard-filename "bibliography/ivy-bibtex-notes")
|
||||
org-directory)))
|
||||
#+END_SRC
|
||||
#+end_src
|
||||
|
||||
** Access passwords in pass using Helm
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ivy-bibtex
|
||||
:after bibtex-completion)
|
||||
#+end_src
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package helm-pass)
|
||||
#+END_SRC
|
||||
** Access passwords in pass using Ivy
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ivy-pass)
|
||||
#+end_src
|
||||
|
||||
* Mode specific ~use-package~ calls
|
||||
|
||||
@ -3637,6 +3618,8 @@ With the new Transient package it will be easier. I just don’t know how to us
|
||||
("M-k" . gpolonkai/undo-buffer-kill)
|
||||
("C-b" . bury-buffer)
|
||||
("/" . repeat)
|
||||
("C-f" . counsel-find-file)
|
||||
("b" . counsel-switch-buffer)
|
||||
:map isearch-mode-map
|
||||
("<C-return>" . isearch-exit-other-end)
|
||||
("<S-return>" . isearch-exit-mark-match)
|
||||
|
@ -26,6 +26,7 @@
|
||||
'(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt))
|
||||
'(package-selected-packages
|
||||
'(a
|
||||
ace-flyspell
|
||||
ace-mc
|
||||
ace-window
|
||||
achievements
|
||||
@ -54,6 +55,11 @@
|
||||
company-restclient
|
||||
company-shell
|
||||
company-web
|
||||
counsel
|
||||
counsel-ag-popup
|
||||
counsel-gtags
|
||||
counsel-projectile
|
||||
counsel-pydoc
|
||||
csharp-mode
|
||||
csv-mode
|
||||
dash
|
||||
@ -112,25 +118,18 @@
|
||||
goto-last-change
|
||||
graphql
|
||||
graphql-mode
|
||||
helm
|
||||
helm-ag
|
||||
helm-bibtex
|
||||
helm-c-yasnippet
|
||||
helm-chrome
|
||||
helm-core
|
||||
helm-flyspell
|
||||
helm-gtags
|
||||
helm-mu
|
||||
helm-pass
|
||||
helm-projectile
|
||||
helm-pydoc
|
||||
helm-unicode
|
||||
hl-todo
|
||||
hungarian-holidays
|
||||
hungry-delete
|
||||
hyde
|
||||
id-manager
|
||||
identica-mode
|
||||
ivy
|
||||
ivy-bibtex
|
||||
ivy-pass
|
||||
ivy-yasnippet
|
||||
jinja2-mode
|
||||
js2-mode
|
||||
json-mode
|
||||
|
Loading…
Reference in New Issue
Block a user