Files
.emacs.d/modules/core/siren-global-keybindings.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

64 lines
1.4 KiB
EmacsLisp

;;; siren-global-keybindings.el --- jimeh's Emacs Siren: Global keybindings. -*- lexical-binding: nil; -*-
;;; Commentary:
;; Basic global keybindings.
;;; Code:
(siren-general-define-key
;; Enable alternative to M-x.
"C-x C-m" 'execute-extended-command
"s-P" 'execute-extended-command
;; Enable dabbrev-expand via custom keybinding.
"C-x M-/" 'dabbrev-expand
;; Easier version of "C-x k" to kill buffer
"C-x C-k" 'kill-buffer
;; Evaluate buffer
"C-c C-e" 'eval-buffer
;; Window switching
"C-x i" 'siren-other-window-reverse
"C-x C-o" 'other-window
"C-x C-i" 'siren-other-window-reverse
;; Window management
"C-x C-SPC" 'balance-windows
"C-x SPC" 'balance-windows
;; Kill-Ring related
"M-Y" 'siren-yank-pop-forwards
;; Align to equal signs
"C-x a =" 'siren-align-region-to-equals
"C-x a {" 'siren-align-region-to-opening-brace
;; align-regexp
"C-c a" 'align-regexp
;; Toggle auto-fill-mode.
"C-c q" 'auto-fill-mode
;; iBuffer
"C-x C-b" 'ibuffer
;; Rename current file and buffer
"C-c r" 'siren-rename-file-and-buffer)
;; macOS specific keybindings
(when (eq system-type 'darwin)
(siren-general-define-key
;; Move to beginning/end of buffer
"s-<up>" 'beginning-of-buffer
"s-<down>" 'end-of-buffer
;; Move to beginning/end of line
"s-<left>" 'beginning-of-line
"s-<right>" 'end-of-line))
(provide 'siren-global-keybindings)
;;; siren-global-keybindings.el ends here