chore(config): Refactor Emacs config for cross-platform compatibility
Add Android/Termux support with `*is-android*` constant and conditional GUI/terminal initialization. Remove maximized frame defaults and custom.el. Replace corfu with corfu-terminal in TTY. Add god-mode to terminal config with line number sync. Update org agenda to use org-ql blocks with super-agenda grouping. Switch solarized-theme to fork. Clean up redundant functions and unify keyboard bindings across environments.
This commit is contained in:
@@ -7,15 +7,21 @@
|
||||
;; 修改mac键位
|
||||
(when *is-mac*
|
||||
(setq mac-command-modifier 'meta)
|
||||
(setq mac-option-modifier 'none))
|
||||
(setq mac-option-modifier 'super)
|
||||
(setq mac-pass-control-to-system nil)
|
||||
(setq mac-pass-command-to-system nil))
|
||||
|
||||
;; god-mode
|
||||
(general-def god-local-mode-map
|
||||
"i" 'god-mode-all
|
||||
"<escape>" 'god-mode-all
|
||||
"[" 'backward-paragraph
|
||||
"]" 'forward-paragraph
|
||||
"." 'repeat)
|
||||
"." 'repeat
|
||||
"y" 'yank
|
||||
"C-c C-<f12>" 'scratch-buffer
|
||||
"z" 'avy-goto-char
|
||||
"'" 'avy-goto-word-1
|
||||
"<f2>" 'open-init-file)
|
||||
|
||||
;; g for gptel
|
||||
(general-def
|
||||
@@ -34,12 +40,12 @@
|
||||
:prefix "C-c u"
|
||||
"l" 'global-tab-line-mode
|
||||
"d" 'disable-theme
|
||||
"r" 'rainbow-mode
|
||||
"R" 'rainbow-mode
|
||||
"b" 'indent-bars-mode
|
||||
"t" 'consult-theme
|
||||
"c" 'my-color-picker
|
||||
"f" 'describe-face
|
||||
"R" 'rainbow-delimiters-mode)
|
||||
"r" 'rainbow-delimiters-mode)
|
||||
|
||||
;; f for find and consult command
|
||||
(general-def
|
||||
@@ -232,7 +238,6 @@
|
||||
(general-def
|
||||
|
||||
;; god-mode
|
||||
"<escape>" 'god-mode-all
|
||||
"M-i" 'god-mode-all
|
||||
|
||||
;; buffer, file, and window
|
||||
@@ -253,16 +258,16 @@
|
||||
"M-c" 'capitalize-dwim
|
||||
"M-u" 'upcase-dwim
|
||||
"M-l" 'downcase-dwim
|
||||
"C-," 'duplicate-and-move-to-next-line
|
||||
"C-," 'crux-duplicate-current-line-or-region
|
||||
"C-k" 'crux-smart-kill-line
|
||||
"C-<backspace>" 'crux-kill-line-backwards
|
||||
"C-o" 'open-line
|
||||
"C-a" 'crux-move-beginning-of-line
|
||||
"M-y" 'consult-yank-from-kill-ring
|
||||
"C-c <backspace>" 'hungry-delete-backward
|
||||
"C-c C-<backspace>" 'hungry-delete-forward
|
||||
"M-P" 'drag-stuff-up
|
||||
"M-N" 'drag-stuff-down
|
||||
"C-M-SPC" 'er/mark-symbol
|
||||
|
||||
;; undo
|
||||
"C-/" 'undo-fu-only-undo
|
||||
|
||||
Reference in New Issue
Block a user