Swap key-bindings in Dabbrev

This commit is contained in:
Vedang Manerikar 2024-11-17 19:20:46 +05:30
parent 028ceca3e2
commit 166d46c4cb
2 changed files with 24 additions and 16 deletions

View file

@ -1659,22 +1659,26 @@ static, user-defined abbreviations ([[#h:fd84b79a-351e-40f0-b383-bf520d77834b][S
#+end_quote #+end_quote
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-completion.el" #+begin_src emacs-lisp :tangle "unravel-modules/unravel-completion.el"
(use-package dabbrev (use-package dabbrev
:ensure nil :ensure nil
:commands (dabbrev-expand dabbrev-completion) :commands (dabbrev-expand dabbrev-completion)
:config :bind
;;;; `dabbrev' (dynamic word completion (dynamic abbreviations)) ;; Swap the default key-bindings
(setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_") (("M-/" . dabbrev-completion)
(setq dabbrev-abbrev-skip-leading-regexp "[$*/=~']") ("C-M-/" . dabbrev-expand))
(setq dabbrev-backward-only nil) :config
(setq dabbrev-case-distinction 'case-replace) ;;;; `dabbrev' (dynamic word completion (dynamic abbreviations))
(setq dabbrev-case-fold-search nil) (setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_")
(setq dabbrev-case-replace 'case-replace) (setq dabbrev-abbrev-skip-leading-regexp "[$*/=~']")
(setq dabbrev-check-other-buffers t) (setq dabbrev-backward-only nil)
(setq dabbrev-eliminate-newlines t) (setq dabbrev-case-distinction 'case-replace)
(setq dabbrev-upcase-means-case-search t) (setq dabbrev-case-fold-search nil)
(setq dabbrev-ignored-buffer-modes (setq dabbrev-case-replace 'case-replace)
'(archive-mode image-mode docview-mode pdf-view-mode))) (setq dabbrev-check-other-buffers t)
(setq dabbrev-eliminate-newlines t)
(setq dabbrev-upcase-means-case-search t)
(setq dabbrev-ignored-buffer-modes
'(archive-mode image-mode docview-mode pdf-view-mode)))
#+end_src #+end_src
** The =unravel-completion.el= for in-buffer completion popup (~corfu~) ** The =unravel-completion.el= for in-buffer completion popup (~corfu~)

View file

@ -168,6 +168,10 @@
(use-package dabbrev (use-package dabbrev
:ensure nil :ensure nil
:commands (dabbrev-expand dabbrev-completion) :commands (dabbrev-expand dabbrev-completion)
:bind
;; Swap the default key-bindings
(("M-/" . dabbrev-completion)
("C-M-/" . dabbrev-expand))
:config :config
;;;; `dabbrev' (dynamic word completion (dynamic abbreviations)) ;;;; `dabbrev' (dynamic word completion (dynamic abbreviations))
(setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_") (setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_")