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,11 +1659,15 @@ 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)
: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_")
(setq dabbrev-abbrev-skip-leading-regexp "[$*/=~']") (setq dabbrev-abbrev-skip-leading-regexp "[$*/=~']")
(setq dabbrev-backward-only nil) (setq dabbrev-backward-only nil)

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_")