fedora-csb-system-manager
 1;;; config-keybindings.el --- -*- lexical-binding: t -*-
 2;;; Commentary:
 3;;; Key binding specific configuration
 4;;; Code:
 5
 6;; Disable C-x C-n to avoid the disabled command buffer
 7(unbind-key "C-x C-n" global-map)
 8
 9;; Remap dynamic-abbrev to hippie-expand
10;; See https://www.masteringemacs.org/article/text-expansion-hippie-expand
11(global-set-key [remap dabbrev-expand] 'hippie-expand)
12
13(use-package vde-simple
14  :demand t
15  :preface
16  (dolist (key '("C-M-<SPC>" "M-<SPC>"))
17    (global-unset-key (kbd key)))
18  :bind
19  (("M-<SPC> e" . dired-jump)
20   ("M-<SPC> x" . execute-extended-command)
21   ("M-<SPC> :" . eval-expression)
22   ("M-<SPC> <SPC>" . (lambda()(interactive)
23			(let ((consult-buffer-filter))
24			  (add-to-list 'consult-buffer-filter "\\*")
25			  (call-interactively 'consult-buffer))))
26   ("M-<SPC> f f" . project-find-file)
27   ("M-<SPC> f o" . ffap)
28   ("M-<SPC> f q" . read-only-mode)
29   ("M-<SPC> f r" . consult-recent-file)
30   ("M-<SPC> q q" . save-buffers-kill-terminal)))
31
32;; TODO add general configuration here
33;; (use-package general
34;;   :config
35;;   (dolist (key '("C-M-<SPC>" "M-<SPC>"))
36;;     (global-unset-key (kbd key)))
37;;   (general-create-definer general-leader :prefix "M-<SPC>")
38;;   (general-def "C-M-<SPC>" 'cycle-spacing)
39;; 
40;;   (general-leader
41;;     "z"   #'(repeat :which-key "Repeat")
42;;     "u"   #'(universal-argument :which-key "Universal argument")
43;;     "e"   #'(dired-jump :which-key "Dired")
44;;     "x"   #'(execute-extended-command :which-key "M-x")
45;;     "f"   '(:ignore t :which-key "File")
46;;     "SPC" #'((lambda()(interactive)
47;;                (let ((consult-buffer-filter))
48;;                  (add-to-list 'consult-buffer-filter "\\*")
49;;                  (call-interactively 'consult-buffer))) :wk "Switch to Buffer")
50;;     ":"   #'(eval-expression :wk "Eval expression")
51;;     "ff"  #'(project-find-file :which-key "Find in Project")
52;;     "fo"  #'(ffap :which-key "Find with context")
53;;     "fq"  #'(read-only-mode :which-key "Toggle Read Only")
54;;     "fr"  #'(consult-recent-file :which-key "Recent File")
55;;     "q"   #'(:ignore t :wk "Quit")
56;;     "qq"  #'(save-buffers-kill-terminal :wk "Quit Emacs")
57;;    ))
58
59;; 
60(provide 'config-keybindings)
61;;; config-keybindings.el ends here