diff --git a/config-min.org b/config-min.org index b7edfc7..68f03da 100644 --- a/config-min.org +++ b/config-min.org @@ -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 diff --git a/config-programming.org b/config-programming.org index 0598d19..9596d87 100644 --- a/config-programming.org +++ b/config-programming.org @@ -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 diff --git a/lisp/term-compat.el b/lisp/term-compat.el index f861b8e..67a5a68 100644 --- a/lisp/term-compat.el +++ b/lisp/term-compat.el @@ -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-") #'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-") #'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-") #'org-insert-heading-respect-content) (define-key org-mode-map (kbd "M-[ emacs-M-S-") #'org-insert-todo-heading) - (define-key org-mode-map (kbd "M-[ emacs-C-S-") #'org-insert-todo-heading-respect-content)) + ;; (define-key org-mode-map (kbd "M-[ emacs-C-S-") #'org-insert-todo-heading-respect-content) + ) (with-eval-after-load 'vterm (define-key vterm-mode-map (kbd "M-[ emacs-C-")