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
|
|
|
|
(global-set-key (kbd "C-S-a") 'mark-whole-buffer) ; Seleccionar todo con CTRL+SHIFT+a.
|
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
|
2023-04-13 08:00:23 +02:00
|
|
|
(global-set-key (kbd "C-S-l") 'sort-lines) ; Ordenar líneas alfabéticamente
|
2023-04-13 10:24:21 +02:00
|
|
|
(global-set-key (kbd "<mouse-3>") 'context-menu-open) ; Ordenar líneas alfabéticamente
|
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
|
|
|
|
(global-set-key (kbd "C-x mh") 'html-mode)
|
|
|
|
(global-set-key (kbd "C-x mj") 'js-mode)
|
|
|
|
(global-set-key (kbd "C-x mp") 'php-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
|
|
|
|
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
|