2022-11-19 04:33:22 +01:00
|
|
|
;;; init-keys.el --- Archivo de configuración de atajos -*- lexical-binding: t -*-
|
2022-03-30 01:21:13 +02:00
|
|
|
|
|
|
|
;; Author: kj <webmaster@outcontrol.net>
|
|
|
|
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
2023-04-14 18:39:19 +02:00
|
|
|
;; 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.
|
2022-03-30 01:21:13 +02:00
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(global-set-key (kbd "C-x C-z") nil) ; Unbind C-x C-z (don't minimize)
|
2022-04-13 06:44:58 +02:00
|
|
|
(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
|
2022-06-28 05:52:52 +02:00
|
|
|
(global-set-key (kbd "C-S-c")
|
|
|
|
'comment-or-uncomment-region-or-line) ; Comentar/descomentar línea o selección
|
2022-03-30 01:21:13 +02:00
|
|
|
(global-set-key (kbd "C-<f11>") 'toggle-frame-maximized) ; Maximizar / restaurar
|
2022-06-28 05:52:52 +02:00
|
|
|
(global-set-key (kbd "C-S-d") 'duplicate-current-line) ; Duplicar línea
|
2024-05-09 17:57:36 +02:00
|
|
|
(global-set-key (kbd "<mouse-3>") 'context-menu-open) ; Abrir menú contextal al hacer clic derecho
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-04-13 06:44:58 +02:00
|
|
|
;; Cambios rápidos de major modes
|
|
|
|
(global-set-key (kbd "C-x m") nil) ; Unbind mail on C-x m
|
2024-03-29 19:27:55 +01:00
|
|
|
(global-set-key (kbd "C-x mh") 'mhtml-mode)
|
2022-04-13 06:44:58 +02:00
|
|
|
(global-set-key (kbd "C-x mj") 'js-mode)
|
2024-07-02 17:55:47 +02:00
|
|
|
(global-set-key (kbd "C-x mp") 'php-ts-mode)
|
2022-05-27 18:22:02 +02:00
|
|
|
(global-set-key (kbd "C-x mr") 'rust-mode)
|
2022-08-11 18:16:02 +02:00
|
|
|
(global-set-key (kbd "C-x mw") 'web-mode)
|
2022-04-13 06:44:58 +02:00
|
|
|
|
2023-06-23 12:16:53 +02:00
|
|
|
;; Cambiar de ventana
|
2023-06-23 12:07:48 +02:00
|
|
|
(global-set-key (kbd "C-S-o") 'other-window)
|
2022-04-13 06:44:58 +02:00
|
|
|
|
2024-04-27 06:22:10 +02:00
|
|
|
;; Saltar entre párrafos
|
|
|
|
(define-key global-map "\M-p" 'backward-paragraph)
|
|
|
|
(define-key global-map "\M-n" 'forward-paragraph)
|
|
|
|
|
2022-05-09 01:00:49 +02:00
|
|
|
;; Meta atajos (atajos de atajos)
|
2022-06-28 05:52:52 +02:00
|
|
|
;;(global-set-key (kbd "C-c l d") "\C-a\C- \C-n\M-w\C-y") ; Duplicar línea
|
2022-05-09 01:00:49 +02:00
|
|
|
|
2022-07-11 03:57:05 +02:00
|
|
|
;; Deactivar el abrir *messages* al cliquear en el minibuffer
|
|
|
|
(define-key minibuffer-inactive-mode-map [mouse-1] #'ignore)
|
|
|
|
|
2022-11-19 04:33:22 +01:00
|
|
|
(provide 'init-keys)
|
|
|
|
;;; init-keys.el ends here
|