Compare commits
13 Commits
080de58176
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d8743e599 | |||
| 7da76add0f | |||
| 6aaaa9fbc4 | |||
| 01aa0f57e2 | |||
| 87c4b759c8 | |||
| b5384bf0cb | |||
| da8320681f | |||
| 297ed25c9b | |||
| de3c81ec7e | |||
| 42445780fb | |||
| cb438235f6 | |||
| 5b20814020 | |||
| d8dfe9b956 |
+2
-1
@@ -1,4 +1,5 @@
|
||||
*
|
||||
/*
|
||||
!.gitignore
|
||||
!init.el
|
||||
!/themes/*
|
||||
!/modulos/
|
||||
|
||||
@@ -34,66 +34,18 @@
|
||||
(straight-use-package 'swiper)
|
||||
(straight-use-package 'ace-window)
|
||||
(straight-use-package 'magit)
|
||||
(straight-use-package 'auctex)
|
||||
(straight-use-package 'company-auctex)
|
||||
(straight-use-package 'company-reftex)
|
||||
(straight-use-package 'reftex)
|
||||
(straight-use-package 'cdlatex)
|
||||
(straight-use-package 'latex-extra)
|
||||
(straight-use-package 'hydra)
|
||||
(straight-use-package 'org)
|
||||
;;(straight-use-package 'org-ref)
|
||||
(straight-use-package 'org-ac)
|
||||
(straight-use-package 'ess)
|
||||
;(straight-use-package 'org-plus-contrib)
|
||||
|
||||
|
||||
;; (use-package ox-odt
|
||||
;; :straight (org-mode-ox-odt
|
||||
;; :host github
|
||||
;; :repo "kjambunathan/org-mode-ox-odt"
|
||||
;; :nonrecursive t
|
||||
;; :files ("lisp/ox-odt.el"
|
||||
;; "etc"
|
||||
;; "docs"
|
||||
;; "contrib/odt/LibreOffice")))
|
||||
|
||||
;(straight-use-package 'capf)
|
||||
;(straight-use-package 'capf) ;; ??
|
||||
|
||||
(straight-use-package 'yaml-mode)
|
||||
|
||||
;;(straight-use-package 'tramp)
|
||||
(straight-use-package 'sudo-edit)
|
||||
|
||||
(use-package company-org-block
|
||||
:straight t
|
||||
:custom
|
||||
(company-org-block-edit-style 'auto) ;; 'auto, 'prompt, or 'inline
|
||||
:hook ((org-mode . (lambda ()
|
||||
(setq-local company-backends '(company-org-block))
|
||||
(company-mode +1)))))
|
||||
|
||||
;;(straigth-use-package 'helm)
|
||||
|
||||
;; Hydras
|
||||
|
||||
(defhydra hydra-zoom (global-map "<f2>")
|
||||
"zoom"
|
||||
("+" text-scale-increase "in")
|
||||
("-" text-scale-decrease "out"))
|
||||
|
||||
;;(defhydra hydra-org-navegacion (org-mode-map "C-c")
|
||||
(defhydra hydra-org-navegacion ()
|
||||
"Navega adelante y atrás entre encabezados"
|
||||
("<down>" org-next-visible-heading "Siguiente")
|
||||
("<up>" org-previous-visible-heading "Anterior")
|
||||
("<next>" org-forward-heading-same-level "Adelante")
|
||||
("<prior>" org-backward-heading-same-level "Atrás")
|
||||
("q" nil "quit")
|
||||
)
|
||||
(define-key org-mode-map (kbd "C-c m") 'hydra-org-navegacion/body)
|
||||
|
||||
;; (straight-use-package 'org-plus-contrib)
|
||||
|
||||
;; (require 'package)
|
||||
;; (package-initialize)
|
||||
|
||||
@@ -122,6 +74,7 @@
|
||||
(global-set-key (kbd "C-c C-r") 'ivy-resume)
|
||||
(global-set-key (kbd "<f6>") 'ivy-resume)
|
||||
(global-set-key (kbd "M-x") 'counsel-M-x)
|
||||
(global-set-key (kbd "M-y") 'counsel-yank-pop)
|
||||
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
||||
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
|
||||
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
|
||||
@@ -154,7 +107,6 @@
|
||||
;; ace window
|
||||
(global-set-key (kbd "M-o") 'ace-window)
|
||||
|
||||
;;
|
||||
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
|
||||
(defun unfill-paragraph (&optional region)
|
||||
"Takes a multi-line paragraph and makes it into a single line of text."
|
||||
@@ -166,57 +118,3 @@
|
||||
|
||||
;; Handy key definition
|
||||
(define-key global-map "\M-Q" 'unfill-paragraph)
|
||||
|
||||
|
||||
;; org-mode
|
||||
(setq org-support-shift-select 't)
|
||||
;; active Babel languages
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((R . t)
|
||||
(latex - t)
|
||||
(emacs-lisp . t)
|
||||
(python . t)
|
||||
(org . t)
|
||||
(shell . t)
|
||||
))
|
||||
|
||||
;; No pide confirmación al ejecutar código
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
|
||||
;; Muestra imágenes en el buffer de org
|
||||
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
|
||||
(add-hook 'org-mode-hook 'org-display-inline-images)
|
||||
|
||||
;; establece latexmk para la compilación
|
||||
(setq org-latex-pdf-process (list "latexmk -f -pdf %f"))
|
||||
|
||||
;; Carga lo necesario para exportar a beamer
|
||||
(require 'ox-beamer)
|
||||
;; Carga lo necesario para exportar a markdown
|
||||
(require 'ox-md nil t)
|
||||
;; Ajusta automáticamente la imagen al alcho (casi)
|
||||
(setq org-image-actual-width nil)
|
||||
|
||||
;; activa orc-ac (autocompletado automático)
|
||||
;; https://github.com/aki2o/org-ac
|
||||
;;(org-ac/config-default)
|
||||
|
||||
; Latex
|
||||
|
||||
;; Inicializa el soporte para company en auctex automáticamente
|
||||
;; (require 'company-auctex) ;; cargado antes con straight
|
||||
(add-hook 'LaTeX-mode-hook (lambda ()(company-mode 1)))
|
||||
(company-auctex-init)
|
||||
|
||||
;; Activa el parser automático, para que funcione C-c C-a
|
||||
(setq TeX-parse-self t) ; Enable parse on load.
|
||||
(setq TeX-auto-save t) ; Enable parse on save.
|
||||
;; RefTeX
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
|
||||
(setq reftex-plug-into-AUCTeX t) ; Conectar a AUC TeX con RefTeX
|
||||
;; CDLaTeX
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-cdlatex) ; with AUCTeX LaTeX mode
|
||||
;; latex-extra
|
||||
(add-hook 'LaTeX-mode-hook #'latex-extra-mode)
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
(straight-use-package 'hydra)
|
||||
|
||||
;; Hydras
|
||||
|
||||
(defhydra hydra-zoom (global-map "<f2>")
|
||||
"zoom"
|
||||
("+" text-scale-increase "in")
|
||||
("-" text-scale-decrease "out"))
|
||||
|
||||
;; Esta debería ir en la configuración de org
|
||||
(defhydra hydra-org-navegacion ()
|
||||
"Navega adelante y atrás entre encabezados"
|
||||
("<down>" org-next-visible-heading "Siguiente")
|
||||
("<up>" org-previous-visible-heading "Anterior")
|
||||
("<next>" org-forward-heading-same-level "Adelante")
|
||||
("<prior>" org-backward-heading-same-level "Atrás")
|
||||
("q" nil "quit")
|
||||
)
|
||||
(define-key org-mode-map (kbd "C-c m") 'hydra-org-navegacion/body)
|
||||
|
||||
|
||||
;; Esta es de cosecha propia a partir de https://github.com/ramnes/move-border
|
||||
(defhydra hydra-resize-window ()
|
||||
"Cambia el tamaño de las ventanas"
|
||||
("<down>" move-border-down "Baja borde")
|
||||
("<up>" move-border-up "Sube borde")
|
||||
("<left>" move-border-left "Mueve izda.")
|
||||
("<right>" move-border-right "Mueve dcha.")
|
||||
("q" nil "Salir")
|
||||
)
|
||||
|
||||
(global-set-key (kbd "C-M-m") 'hydra-resize-window/body)
|
||||
|
||||
;; https://github.com/abo-abo/hydra/wiki/Dired
|
||||
(defhydra hydra-dired (:hint nil :color pink)
|
||||
"
|
||||
_+_ mkdir _v_iew _m_ark _(_ details _i_nsert-subdir wdired
|
||||
_C_opy _O_ view other _U_nmark all _)_ omit-mode _$_ hide-subdir C-x C-q : edit
|
||||
_D_elete _o_pen other _u_nmark _l_ redisplay _w_ kill-subdir C-c C-c : commit
|
||||
_R_ename _M_ chmod _t_oggle _g_ revert buf _e_ ediff C-c ESC : abort
|
||||
_Y_ rel symlink _G_ chgrp _E_xtension mark _s_ort _=_ pdiff
|
||||
_S_ymlink ^ ^ _F_ind marked _._ toggle hydra \\ flyspell
|
||||
_r_sync ^ ^ ^ ^ ^ ^ _?_ summary
|
||||
_z_ compress-file _A_ find regexp
|
||||
_Z_ compress _Q_ repl regexp
|
||||
|
||||
T - tag prefix
|
||||
"
|
||||
("\\" dired-do-ispell)
|
||||
("(" dired-hide-details-mode)
|
||||
(")" dired-omit-mode)
|
||||
("+" dired-create-directory)
|
||||
("=" diredp-ediff) ;; smart diff
|
||||
("?" dired-summary)
|
||||
("$" diredp-hide-subdir-nomove)
|
||||
("A" dired-do-find-regexp)
|
||||
("C" dired-do-copy) ;; Copy all marked files
|
||||
("D" dired-do-delete)
|
||||
("E" dired-mark-extension)
|
||||
("e" dired-ediff-files)
|
||||
("F" dired-do-find-marked-files)
|
||||
("G" dired-do-chgrp)
|
||||
("g" revert-buffer) ;; read all directories again (refresh)
|
||||
("i" dired-maybe-insert-subdir)
|
||||
("l" dired-do-redisplay) ;; relist the marked or singel directory
|
||||
("M" dired-do-chmod)
|
||||
("m" dired-mark)
|
||||
("O" dired-display-file)
|
||||
("o" dired-find-file-other-window)
|
||||
("Q" dired-do-find-regexp-and-replace)
|
||||
("R" dired-do-rename)
|
||||
("r" dired-do-rsynch)
|
||||
("S" dired-do-symlink)
|
||||
("s" dired-sort-toggle-or-edit)
|
||||
("t" dired-toggle-marks)
|
||||
("U" dired-unmark-all-marks)
|
||||
("u" dired-unmark)
|
||||
("v" dired-view-file) ;; q to exit, s to search, = gets line #
|
||||
("w" dired-kill-subdir)
|
||||
("Y" dired-do-relsymlink)
|
||||
("z" diredp-compress-this-file)
|
||||
("Z" dired-do-compress)
|
||||
("q" nil)
|
||||
("." nil :color blue))
|
||||
|
||||
;; Hook para que se ejecute al cargar dired
|
||||
;; https://stackoverflow.com/questions/30989838/symbols-value-as-variable-is-void-dired-mode-map
|
||||
(eval-after-load "dired" '(progn
|
||||
(define-key dired-mode-map "." 'hydra-dired/body)))
|
||||
@@ -0,0 +1,26 @@
|
||||
; Latex
|
||||
|
||||
(straight-use-package 'auctex)
|
||||
(straight-use-package 'company-auctex)
|
||||
(straight-use-package 'company-reftex)
|
||||
(straight-use-package 'reftex)
|
||||
(straight-use-package 'cdlatex)
|
||||
(straight-use-package 'latex-extra)
|
||||
|
||||
|
||||
;; Inicializa el soporte para company en auctex automáticamente
|
||||
;; (require 'company-auctex) ;; cargado antes con straight
|
||||
(add-hook 'LaTeX-mode-hook (lambda ()(company-mode 1)))
|
||||
(company-auctex-init)
|
||||
|
||||
;; Activa el parser automático, para que funcione C-c C-a
|
||||
(setq TeX-parse-self t) ; Enable parse on load.
|
||||
(setq TeX-auto-save t) ; Enable parse on save.
|
||||
;; RefTeX
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
|
||||
(setq reftex-plug-into-AUCTeX t) ; Conectar a AUC TeX con RefTeX
|
||||
;; CDLaTeX
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-cdlatex) ; with AUCTeX LaTeX mode
|
||||
;; latex-extra
|
||||
(add-hook 'LaTeX-mode-hook #'latex-extra-mode)
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
;;; move-border.el --- Move border to resize windows
|
||||
;; Copyright (C) Unknown
|
||||
|
||||
;; Author: Unknown
|
||||
;; Maintainer: Guillaume Gelin <contact@ramnes.eu>
|
||||
;; Created 5 sep 2008
|
||||
;; Keywords: window border
|
||||
;; Homepage: https://github.com/ramnes/move-border
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Add commands to move border
|
||||
;; instead of using the built-in
|
||||
;; window resizing functions
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defun xor (b1 b2)
|
||||
(or (and b1 b2)
|
||||
(and (not b1) (not b2))))
|
||||
|
||||
(defun move-border-left-or-right (arg dir)
|
||||
"General function covering move-border-left and move-border-right. If DIR is
|
||||
t, then move left, otherwise move right."
|
||||
(interactive)
|
||||
(if (null arg) (setq arg 3))
|
||||
(let ((left-edge (nth 0 (window-edges))))
|
||||
(if (xor (= left-edge 0) dir)
|
||||
(shrink-window arg t)
|
||||
(enlarge-window arg t))))
|
||||
|
||||
(defun move-border-up-or-down (arg dir)
|
||||
"General function covering move-border-up and move-border-down. If DIR is
|
||||
t, then move up, otherwise move down."
|
||||
(interactive)
|
||||
(if (null arg) (setq arg 3))
|
||||
(let ((top-edge (nth 1 (window-edges))))
|
||||
(if (xor (= top-edge 0) dir)
|
||||
(shrink-window arg nil)
|
||||
(enlarge-window arg nil))))
|
||||
|
||||
(defun move-border-left (arg)
|
||||
(interactive "P")
|
||||
(move-border-left-or-right arg t))
|
||||
|
||||
(defun move-border-right (arg)
|
||||
(interactive "P")
|
||||
(move-border-left-or-right arg nil))
|
||||
|
||||
(defun move-border-up (arg)
|
||||
(interactive "P")
|
||||
(move-border-up-or-down arg t))
|
||||
|
||||
(defun move-border-down (arg)
|
||||
(interactive "P")
|
||||
(move-border-up-or-down arg nil))
|
||||
|
||||
(provide 'move-border)
|
||||
|
||||
;;; move-border.el ends here
|
||||
@@ -0,0 +1,68 @@
|
||||
;; Configuración de org-mode
|
||||
|
||||
(straight-use-package 'org)
|
||||
(straight-use-package 'org-ref)
|
||||
(straight-use-package 'org-ac)
|
||||
|
||||
;(straight-use-package 'org-plus-contrib) ;; ??
|
||||
|
||||
;; Revisar qué hace este paquete
|
||||
(use-package company-org-block
|
||||
:straight t
|
||||
:custom
|
||||
(company-org-block-edit-style 'auto) ;; 'auto, 'prompt, or 'inline
|
||||
:hook ((org-mode . (lambda ()
|
||||
(setq-local company-backends '(company-org-block))
|
||||
(company-mode +1)))))
|
||||
|
||||
;; (straight-use-package 'org-plus-contrib)
|
||||
|
||||
;; org-mode
|
||||
(setq org-support-shift-select 't)
|
||||
;; active Babel languages
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((R . t)
|
||||
(latex - t)
|
||||
(emacs-lisp . t)
|
||||
(python . t)
|
||||
(org . t)
|
||||
(shell . t)
|
||||
))
|
||||
|
||||
;; No pide confirmación al ejecutar código
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
|
||||
;; Muestra imágenes en el buffer de org
|
||||
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
|
||||
(add-hook 'org-mode-hook 'org-display-inline-images)
|
||||
|
||||
;; establece latexmk para la compilación
|
||||
;;(setq org-latex-pdf-process (list "latexmk -f -pdf %f")) ;; pdflatex
|
||||
(setq org-latex-pdf-process '("latexmk %f -output-directory=%o -%latex")) ;; xelatex/lualatex
|
||||
|
||||
;; Carga lo necesario para exportar a beamer
|
||||
(require 'ox-beamer)
|
||||
;; Carga lo necesario para exportar a markdown
|
||||
(require 'ox-md nil t)
|
||||
;; Ajusta automáticamente la imagen al alcho (casi)
|
||||
(setq org-image-actual-width nil)
|
||||
|
||||
;; activa orc-ac (autocompletado automático)
|
||||
;; https://github.com/aki2o/org-ac
|
||||
;;(org-ac/config-default) ;; desactivado porque funciona regular
|
||||
|
||||
;; Este es un «exporter» mejorado, pero con esta configuración no
|
||||
;; cargaba. Lá única forma de hacerlo funcionar era clonar el
|
||||
;; repositorio en otro sitio y compilarlo con un make. Mirar la
|
||||
;; documentación de carga en ese caso.
|
||||
|
||||
;; (use-package ox-odt
|
||||
;; :straight (org-mode-ox-odt
|
||||
;; :host github
|
||||
;; :repo "kjambunathan/org-mode-ox-odt"
|
||||
;; :nonrecursive t
|
||||
;; :files ("lisp/ox-odt.el"
|
||||
;; "etc"
|
||||
;; "docs"
|
||||
;; "contrib/odt/LibreOffice")))
|
||||
Reference in New Issue
Block a user