2022-03-30 01:21:13 +02:00
;;; base-keys.el --- Archivo de configuración de atajos
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;; Aquí se configuran los atajos globales.
;; Es posible que haya otros, ya que muchos se configuran
;; directamente en los paquetes/extensiones y dependen de los mismos.
;;; 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-03-30 01:21:13 +02:00
2022-04-13 06:44:58 +02:00
( global-set-key ( kbd " C-x c c " )
'comment-or-uncomment-region ) ; Comentar/descomentar en lote
2022-03-30 01:21:13 +02:00
( global-set-key ( kbd " C-<f6> " ) 'create-tags ) ; Generar o Regeneral el archivo TAGS
( global-set-key ( kbd " C-<f11> " ) 'toggle-frame-maximized ) ; Maximizar / restaurar
( global-set-key ( kbd " C-c a " ) 'org-agenda ) ; Abrir la agenda.
( global-set-key ( kbd " C-c c " ) 'org-capture ) ; Abrir la crear una entrada.
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 )
;; Vterm
( global-set-key ( kbd " C-x tt " ) 'multi-vterm-dedicated-toggle )
( global-set-key ( kbd " C-x tf " ) 'multi-vterm )
( global-set-key ( kbd " C-x tp " ) 'multi-vterm-project )
;; Atajos de windmove
2022-05-18 09:07:54 +02:00
( global-set-key ( kbd " C-x <left> " ) 'windmove-left )
( global-set-key ( kbd " C-x <right> " ) 'windmove-right )
( global-set-key ( kbd " C-x <up> " ) 'windmove-up )
( global-set-key ( kbd " C-x <down> " ) 'windmove-down )
2022-04-13 06:44:58 +02:00
2022-04-21 19:45:31 +02:00
;; Atajos para reemplazar (los por fedecto no van bien para el teclado en español)
( global-set-key ( kbd " C-x / " ) 'query-replace-regexp )
( global-set-key ( kbd " M-/ " ) 'query-replace )
2022-05-04 05:24:33 +02:00
;; Atajo para origami-mode
( global-set-key ( kbd " C-<tab> " ) 'origami-toggle-node )
2022-05-07 20:20:41 +02:00
( global-set-key ( kbd " C-<iso-lefttab> " ) 'origami-toggle-all-nodes )
2022-05-04 05:24:33 +02:00
;; Atajo para counsel-proyectile
( global-set-key ( kbd " C-x p " ) 'counsel-projectile )
2022-05-04 05:55:00 +02:00
;; Atajos de Ivy
( global-set-key ( kbd " C-x s " ) 'swiper )
( global-set-key ( kbd " C-x C-r " ) 'ivy-resume )
( global-set-key ( kbd " C-x b " ) 'ivy-switch-buffer )
( global-set-key ( kbd " C-x C-b " ) 'ivy-switch-buffer )
( define-key ivy-minibuffer-map ( kbd " TAB " ) 'ivy-partial )
( define-key ivy-minibuffer-map ( kbd " <escape> " ) 'minibuffer-keyboard-quit )
;; Atajos projectile
( global-set-key ( kbd " C-c p " ) 'projectile-command-map )
;; Atajos counsel
( global-set-key ( kbd " M-x " ) 'counsel-M-x )
( global-set-key ( kbd " C-x C-f " ) 'counsel-find-file )
( global-set-key ( kbd " M-y " ) 'counsel-yank-pop )
( define-key company-active-map ( kbd " <tab> " ) 'company-indent-or-complete-common ) ; autocompletar con tab como se haría en bash-competition en la terminal de linux
( define-key company-active-map ( kbd " <escape> " ) 'company-abort ) ; cerrar las sugerencias de autocompletado precionando escape.
2022-05-06 02:04:23 +02:00
;; Atajos org-roam
( global-set-key ( kbd " C-c r i " ) 'org-roam-node-insert )
( global-set-key ( kbd " C-c r f " ) 'org-roam-node-find )
( global-set-key ( kbd " C-c r t " ) 'org-roam-buffer-toggle )
2022-05-09 01:00:49 +02:00
;; Meta atajos (atajos de atajos)
2022-05-09 01:06:23 +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-03-30 01:21:13 +02:00
( provide 'base-keys )
;;; base-keys.el ends here