Compare commits

...

2 commits

Author SHA1 Message Date
Benson Chu
aadb9ea399 I want mail aliases in my commit message buffers 2025-08-08 15:03:36 -05:00
Benson Chu
acfd8f5e72 I think I finally figured out the terminal key stuff 2025-08-08 15:03:16 -05:00
4 changed files with 28 additions and 13 deletions

View file

@ -1038,6 +1038,6 @@
#+end_src
* Terminal compatibility
#+begin_src emacs-lisp
(global-set-key (kbd "M-[ emacs-C-SPC") #'set-mark-command)
(global-set-key (kbd "M-[ emacs-C-/") #'undo)
(when (null window-system)
(require 'term-compat))
#+end_src

View file

@ -139,11 +139,9 @@
(setq projectile-require-project-root t)
(setq projectile-indexing-method 'hybrid)
(setq projectile-auto-update-cache nil)
(if (and (not (daemonp))
(null window-system))
(global-set-key (kbd "C-c M-[ emacs-C-.") 'projectile-command-map)
(global-set-key (kbd "C-c C-.") 'projectile-command-map)
(global-set-key (kbd "C-c M-[ emacs-C-.") 'projectile-command-map)))
(global-set-key (kbd "C-c C-.") 'projectile-command-map)
(global-set-key (kbd "C-c M-[ emacs-C-.") 'projectile-command-map))
:config
(projectile-mode)
(add-to-list 'projectile-globally-ignored-directories

View file

@ -24,16 +24,22 @@
;;; Code:
(global-set-key (kbd "M-[ emacs-C-SPC") #'set-mark-command)
(global-set-key (kbd "M-[ emacs-M-SPC") #'cycle-spacing)
(global-set-key (kbd "M-[ emacs-C-/") #'undo)
(require 'term/xterm)
(xterm--init-modify-other-keys)
(xterm-mouse-mode 1)
;; (global-set-key (kbd "M-[ emacs-C-SPC") #'set-mark-command)
;; (global-set-key (kbd "M-[ emacs-M-SPC") #'cycle-spacing)
;; (global-set-key (kbd "M-[ emacs-C-/") #'undo)
(global-set-key (kbd "M-[ emacs-C-<backspace>") #'backward-kill-word)
(with-eval-after-load 'org
(define-key org-mode-map (kbd "C-c M-[ emacs-C-,") #'org-insert-structure-template)
(define-key org-mode-map (kbd "M-[ emacs-C-<return>") #'org-insert-heading-respect-content)
;; (define-key org-mode-map (kbd "C-c M-[ emacs-C-,") #'org-insert-structure-template)
;; (define-key org-mode-map (kbd "M-[ emacs-C-<return>") #'org-insert-heading-respect-content)
(define-key org-mode-map (kbd "M-[ emacs-M-S-<return>") #'org-insert-todo-heading)
(define-key org-mode-map (kbd "M-[ emacs-C-S-<return>") #'org-insert-todo-heading-respect-content))
;; (define-key org-mode-map (kbd "M-[ emacs-C-S-<return>") #'org-insert-todo-heading-respect-content)
)
(with-eval-after-load 'vterm
(define-key vterm-mode-map (kbd "M-[ emacs-C-<backspace>")

View file

@ -226,5 +226,16 @@
(when my-ec/enable-mail
(require 'work-mail))
(defun always-expand-mail-abbrevs-in-commit-buffer (orig)
(or with-editor-mode
(funcall orig)))
(add-hook 'with-editor-mode-hook
#'mail-abbrevs-setup)
(advice-add #'mail-abbrev-in-expansion-header-p
:around
#'always-expand-mail-abbrevs-in-commit-buffer)
(provide 'work-config)
;;; work-config.el ends here