diff options
| author | Jakob L. Kreuze | 2019-01-06 13:48:30 -0500 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-01-06 13:48:30 -0500 |
| commit | 6f1904c4d310a012258ec7302f16c624628a9397 (patch) | |
| tree | 2e0de355191a0a8cb209d1a0d6111c67d3e587ee | |
| parent | 640944afa0e3b7d96d752841a4fe37d8f3f17626 (diff) | |
Replace ido with ivy.
| -rw-r--r-- | jakob.org | 61 |
1 files changed, 24 insertions, 37 deletions
@@ -512,47 +512,26 @@ escaped twice -- once for =battery-format=, and once for =mode-line-format=. text)))) #+END_SRC -* ido +* Ivy -Originally, I was going to try out ivy and see if it was any snappier than ido, -but it turns out that a properly-configured vanilla ido is faster than I'm used -to. It also plays nicely with EXWM/ERC. +As [[https://icosahedron.website/@zge/101330910258980695][suggested by a friend]], I tried out Ivy as a replacement for ido. It was love +at first sight. It's snappy, and works even better than ido after setting +=exwm-workspace-show-all-buffers= and =exwm-layout-show-all-buffers=. -#+BEGIN_SRC elisp -(use-package ido - :after exwm-config - :ensure t - :config - (ido-mode 1) -#+END_SRC - -Fix =ido-buffer-window-other-frame= to play nicely with EXWM. - -#+BEGIN_SRC elisp - (exwm-config-ido) -#+END_SRC - -Cap the number of candidates to make it even snappier, and for the same reason, -don't use the annoying built-in ffap functionality. - -#+BEGIN_SRC elisp - :init - (setq ido-max-prospects 10) - (setq ido-use-filename-at-point nil) -#+END_SRC - -Don't waste time searching for files in recently used directories. +Configure how the =completing-read= is displayed. #+BEGIN_SRC elisp +(use-package ivy :init - (setq ido-auto-merge-work-directories-length -1) + (setq ivy-height 5) + (setq ivy-count-format "") #+END_SRC -Preference of hygene. See [[Filesystem]]. +Enable Ivy globally. #+BEGIN_SRC elisp - :init - (setq ido-save-directory-list-file "~/.cache/emacs/ido.last")) + :config + (ivy-mode 1)) #+END_SRC * Dired @@ -1093,7 +1072,7 @@ member of `IRC-IMPORTANT-CHANNELS'." (minibuffer-message "Not ignoring any channels"))) (defun ignore-channel () - "Use 'ido-completing-read to ask the user for a channel to ignore." + "Use completing-read to ask the user for a channel to ignore." (interactive) (let* ((current-mode (with-current-buffer (current-buffer) major-mode)) (current-channel (if (eq current-mode 'erc-mode) (buffer-name (current-buffer)))) @@ -1102,12 +1081,12 @@ member of `IRC-IMPORTANT-CHANNELS'." (remove-if #'(lambda (chan) (string= chan current-channel)) (list-irc-channels))) (list-irc-channels))) (channels (remove-if #'(lambda (channel) (find channel erc-track-exclude)) channels)) - (buffer (ido-completing-read "Channel: " channels))) + (buffer (completing-read "Channel: " channels))) (push buffer erc-track-exclude) (erc-modified-channels-display))) (defun unignore-channel () - "Use 'ido-completing-read to ask the user for a channel to ignore." + "Use completing-read to ask the user for a channel to ignore." (interactive) (let* ((current-mode (with-current-buffer (current-buffer) major-mode)) (current-channel (if (eq current-mode 'erc-mode) (buffer-name (current-buffer)))) @@ -1116,7 +1095,7 @@ member of `IRC-IMPORTANT-CHANNELS'." (remove-if #'(lambda (chan) (string= chan current-channel)) (list-irc-channels))) (list-irc-channels))) (channels (remove-if-not #'(lambda (channel) (find channel erc-track-exclude)) channels)) - (buffer (ido-completing-read "Channel: " channels))) + (buffer (completing-read "Channel: " channels))) (setq erc-track-exclude (remove-if #'(lambda (channel) (string= channel buffer)) @@ -1251,6 +1230,14 @@ Enable channel tracking. (erc-track-mode 1) #+END_SRC +Move to the prompt when I begin typing, since I've configured the buffer text +preceding it to be read-only. + +#+BEGIN_SRC elisp + :config + (erc-move-to-prompt-enable) +#+END_SRC + Let =erc-fill= handle filling. #+BEGIN_SRC elisp @@ -1371,7 +1358,7 @@ Configuration for using the [[https://wiki.call-cc.org/emacs#builtin-scheme-supp =doc-view= is unbearable for reading PDF's of any considerable size and =pdf-tools= brings a number of significant improvements, so I can justify not -using the built-in solution. Even though I can run MuPDF in an EXWM buffer, the +using the built-in solution. Even though I can run MuPDF in an [[EXWM]] buffer, the integration in terms of searching and viewing attachments that comes with =pdf-tools= makes for a much more pleasant experience. |