Files
confi-emacs-actual/configs/init-keys.el
kj dabaf86f28 Big re-write :)
I reordered the code in a more clean an organized way. Also this improves a lot
the emacs startup time again, bucause after some updates it becomes a bit slow
with the old configuration, so i did it again in a new way.
2025-07-20 13:18:05 -03:00

45 lines
1.8 KiB
EmacsLisp

;;; init-keys.el --- Archivo de configuración de atajos -*- lexical-binding: t -*-
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;; Aquí se configuran los atajos de teclas generales.
;; Los atajos de teclas relacionados con paquetes en
;; específico estarán en el archivo donde se esté
;; configurando dicho paquete o dentro del paquete
;; mismo, para aquellos que vengan con atajos ya
;; configurados desde su instalación.
;;; Code:
(global-set-key (kbd "C-x C-z") nil) ; Unbind C-x C-z (don't minimize)
(global-set-key (kbd "C-z") 'undo) ; Unbind C-z y hacerlo funcionar para deshacer cambios
(global-set-key (kbd "C-S-z") 'undo-redo) ; Rehacer cambios con C-S-z
(global-set-key (kbd "C-S-c")
'comment-or-uncomment-region-or-line) ; Comentar/descomentar línea o selección
(global-set-key (kbd "C-<f11>") 'toggle-frame-maximized) ; Maximizar / restaurar
(global-set-key (kbd "C-S-d") 'duplicate-current-line) ; Duplicar línea
(global-set-key (kbd "<mouse-3>") 'context-menu-open) ; Abrir menú contextal al hacer clic derecho
;; Cambios rápidos de major modes
(global-set-key (kbd "C-x m") nil) ; Unbind mail on C-x m
(global-set-key (kbd "C-x mh") 'mhtml-mode)
(global-set-key (kbd "C-x mj") 'js-mode)
(global-set-key (kbd "C-x mp") 'php-ts-mode)
(global-set-key (kbd "C-x mw") 'web-mode)
;; Cambiar de ventana
(global-set-key (kbd "C-S-o") 'other-window)
;; Saltar entre párrafos
(define-key global-map "\M-[" 'backward-paragraph)
(define-key global-map "\M-]" 'forward-paragraph)
;; Deactivar el abrir *messages* al cliquear en el minibuffer
(define-key minibuffer-inactive-mode-map [mouse-1] #'ignore)
(provide 'init-keys)
;;; init-keys.el ends here