Change C-z binds to C-c and remove leader

This commit is contained in:
Case Duckworth 2021-05-27 12:52:12 -05:00
parent 08285aabb9
commit 0acf0a28d7
2 changed files with 19 additions and 37 deletions

46
init.el
View File

@ -35,17 +35,7 @@
(let ((recipe (cadr sexp)))
(if (consp recipe)
(car recipe)
recipe))))
(setup-define :leader
(lambda (key command)
`(progn
(autoload #',command (symbol-name setup-name))
(define-key acdw/leader
,(if (stringp key) (kbd key) key)
#',command)))
:documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map."
:repeatable t))
recipe)))))
;;;; `no-littering'
(setup (:straight no-littering)
@ -145,7 +135,7 @@
(setup debugger
(:hook visual-line-mode)
(:leader "d" toggle-debug-on-error))
(:global "C-c d" toggle-debug-on-error))
(setup dired
(setq-default dired-recursive-copies 'always
@ -276,10 +266,12 @@
("tilde.chat"
"#meta" "#team" "#gemini"
"#bread" ; how could I've forgotten!?
"#politics" "#bungame"))
"#politics" "#bungame"
"#backgammon"))
erc-button-url-regexp browse-url-button-regexp
(append erc-common-server-suffixes) '("tilde.chat\\'" . "~")
(append erc-common-server-suffixes) '("libera.chat\\'" . "LC")
erc-common-server-suffixes '(("oftc.net\\'" . "OFTC")
("tilde.chat\\'" . "~")
("libera.chat\\'" . "LC"))
erc-header-line-face-method
#'erc/update-header-line-show-disconnected
erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE"
@ -326,9 +318,10 @@
(interactive)
(if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*")))
(eshell-life-is-too-much)
(eshell)))
(with-message "Starting eshell"
(eshell))))
(:leader "s" eshell-pop-or-quit)
(:global "C-c s" eshell-pop-or-quit)
(add-hook 'eshell-mode-hook
(defun eshell-mode@setup ()
@ -408,7 +401,7 @@
(:option gnus-home-directory (acdw/dir "gnus" t)
gnus-directory (acdw/dir "News" t)
gnus-init-file (expand-file-name "gnus.el" user-emacs-directory))
(:leader "m" gnus))
(:global "C-c m" gnus))
(setup ibuffer
(:option ibuffer-saved-filter-groups
@ -742,8 +735,8 @@
;; Remap C-h to DEL -- <f1> can be the "help" key
(define-key key-translation-map [?\C-h] [?\C-?])
(:leader "C-c" save-buffers-kill-emacs
"t" acdw/insert-iso-date))
(:global "C-c t" acdw/insert-iso-date
"C-z" nil))
;;; Packages
@ -813,10 +806,11 @@ if ripgrep is installed, otherwise `consult-grep'."
;; Bindings
(:global
;; C-c bindings (`mode-specific-map')
"C-c h" consult-history
"C-c m" consult-mode-command
"C-c b" consult-bookmark
"C-c k" consult-kmacro
;; I don't use any of these right now.
;; "C-c h" consult-history
;; "C-c m" consult-mode-command
;; "C-c b" consult-bookmark
;; "C-c k" consult-kmacro
;; C-x bindings (`ctl-x-map')
"C-x M-:" consult-complex-command
"C-x b" consult-buffer
@ -890,8 +884,6 @@ if ripgrep is installed, otherwise `consult-grep'."
elpher-certificate-directory (acdw/dir "elpher/")
elpher-gemini-max-fill-width fill-column)
(:leader "e" elpher-bookmarks)
(:bind "n" elpher-next-link
"p" elpher-prev-link
"o" elpher-follow-current-link
@ -956,7 +948,7 @@ if ripgrep is installed, otherwise `consult-grep'."
(:file-match "\\.lua\\'"))
(setup (:straight magit)
(:leader "g" magit-status)
(:global "C-c g" magit-status)
(defun magit-display-buffer-same-window (buffer)
"Display BUFFER in the selected window like God intended."

View File

@ -475,16 +475,6 @@ Then, build `browse-url-button-regexp' with the new protocol."
(setq-default browse-url-button-regexp (acdw/build-button-url-regexp)))
;;; Keymaps
(defvar acdw/leader
(let ((map (make-sparse-keymap))
(c-z (global-key-binding "\C-z")))
(global-set-key "\C-z" map)
(define-key map "\C-z" c-z)
map))
;;; Minor modes