diff --git a/TODO.md b/TODO.md index ef5a7d7..cd628a9 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,6 @@ - replace smex with https://github.com/DarwinAwardWinner/amx - try to marry amx and marginalia somehow - try https://github.com/oantolin/embark -- check out other vertico extensions - play with embark: https://karthinks.com/software/fifteen-ways-to-use-embark/ - FIXME: orglist mode: not more able to jump word wise with M- +- FIXME: how to get rid of IDO? diff --git a/init.el b/init.el index ada6e43..4fa0b90 100644 --- a/init.el +++ b/init.el @@ -156,7 +156,7 @@ (require 'init-ibuffer) (require 'init-printing) -;; (require 'init-completion) +(require 'init-completion) (require 'init-smarter-than-emacs) (require 'init-marginalia) (require 'init-ui) diff --git a/lisp/init-completion.el b/lisp/init-completion.el index 5bf6ca3..ca89d61 100644 --- a/lisp/init-completion.el +++ b/lisp/init-completion.el @@ -8,7 +8,7 @@ ;; Hint: Use C-f during file selection to switch to regular find-file ;; Basic config -(ido-mode t) +;; (ido-mode t) (ido-everywhere nil) (use-package ido-completing-read+) @@ -85,7 +85,8 @@ (progn (ido-set-current-directory "/ssh:") (ido-reread-directory)) - (call-interactively 'self-insert-command)))))) + (call-interactively 'self-insert-command)))) + (define-key ido-file-completion-map (kbd "C-.") 'embark-act))) ;; by howardism: [re]open non-writable file with sudo (defadvice ido-find-file (after find-file-sudo activate) diff --git a/lisp/init-ibuffer.el b/lisp/init-ibuffer.el index ff1285b..c88908f 100644 --- a/lisp/init-ibuffer.el +++ b/lisp/init-ibuffer.el @@ -96,7 +96,7 @@ ;; Modify the default ibuffer-formats (setq ibuffer-formats '((mark modified read-only " " - (name 20 40 :left :elide) + (name 30 60 :left :elide) " " (size-h 9 -1 :right) " " diff --git a/lisp/init-recentfiles.el b/lisp/init-recentfiles.el index 1cb7761..f44fb01 100644 --- a/lisp/init-recentfiles.el +++ b/lisp/init-recentfiles.el @@ -33,7 +33,7 @@ (when file (find-file file)))) - (global-set-key (kbd "C-x C-r") 'recentf-ido-find-file) ; open recent files, same as M-x rf + (global-set-key (kbd "C-x C-r") 'recentf-ido-find-file) ;; open recent files, same as M-x rf ;; now if I incidentally closed a buffer, I can re-open it, thanks to ;; recent-files diff --git a/lisp/init-smarter-than-emacs.el b/lisp/init-smarter-than-emacs.el index 0cfa17f..e8094c1 100644 --- a/lisp/init-smarter-than-emacs.el +++ b/lisp/init-smarter-than-emacs.el @@ -23,7 +23,7 @@ ;; (setq vertico-resize t) ;; Optionally enable cycling for `vertico-next' and `vertico-previous'. - ;; (setq vertico-cycle t) + (setq vertico-cycle t) :config @@ -39,18 +39,34 @@ via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]" :bind (:map vertico-map ("~" . tvd-vertico-jump-home) - ("RET" . #'vertico-directory-enter))) + ("RET" . #'vertico-directory-enter) + ;; experimental, pressing tab on a match doesn't + ;; complete it but show the next match, that way I avoid + ;; being completed into nonsense matches + ("TAB" . #'vertico-next))) +(use-package orderless + :init + ;; Configure a custom style dispatcher (see the Consult wiki) + ;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch) + ;; orderless-component-separator #'orderless-escapable-split-on-space) + (setq completion-styles '(substring orderless basic) + orderless-matching-styles '(orderless-prefixes) + completion-category-defaults nil + completion-category-overrides '((file (styles partial-completion))))) + + + (use-package embark :ensure t :bind (("C-." . embark-act) ;; pick some comfortable binding - ("C-," . embark-dwim) ;; good alternative: M-. - ) ;; alternative for `describe-bindings' + ("C-," . embark-dwim)) ;; good alternative: M-. + :init @@ -72,7 +88,9 @@ via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]" -;;; *** Smarter Search + + + ;; test, replace isearch-forward-regexp first only. ;; dir: ivy/ @@ -82,17 +100,6 @@ via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]" (global-set-key "\C-s" 'swiper)) -(use-package orderless - :init - ;; Configure a custom style dispatcher (see the Consult wiki) - ;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch) - ;; orderless-component-separator #'orderless-escapable-split-on-space) - (setq completion-styles '(orderless basic) - completion-category-defaults nil - completion-category-overrides '((file (styles partial-completion)))) - - ) - (provide 'init-smarter-than-emacs) ;;; init-smarter-than-emacs ends here