|
@ -59,7 +59,7 @@ |
|
|
(package-install 'all-the-icons)) |
|
|
(package-install 'all-the-icons)) |
|
|
;; Set default font: |
|
|
;; Set default font: |
|
|
(add-to-list 'default-frame-alist |
|
|
(add-to-list 'default-frame-alist |
|
|
'(font . "Source Code Pro-15")) |
|
|
|
|
|
|
|
|
'(font . "Source Code Pro-13")) |
|
|
;;+++++++ |
|
|
;;+++++++ |
|
|
;;auctex: |
|
|
;;auctex: |
|
|
(is-installed 'auctex) |
|
|
(is-installed 'auctex) |
|
@ -78,15 +78,18 @@ |
|
|
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) |
|
|
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) |
|
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) |
|
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) |
|
|
(setq reftex-plug-into-AUCTeX t) |
|
|
(setq reftex-plug-into-AUCTeX t) |
|
|
(setq TeX-view-program-list '(("Evince" "evince --page-index=%(outpage) %o"))) |
|
|
|
|
|
(setq TeX-view-program-selection '((output-pdf "Evince"))) |
|
|
|
|
|
|
|
|
(setq TeX-view-program-selection '((output-pdf "PDF Tools")) |
|
|
|
|
|
TeX-source-correlate-start-server t) |
|
|
;; Update PDF buffers after successful LaTeX runs |
|
|
;; Update PDF buffers after successful LaTeX runs |
|
|
(add-hook 'TeX-after-compilation-finished-functions |
|
|
(add-hook 'TeX-after-compilation-finished-functions |
|
|
#'TeX-revert-document-buffer) |
|
|
#'TeX-revert-document-buffer) |
|
|
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) |
|
|
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)) |
|
|
(add-hook 'pdf-view-mode-hook |
|
|
(add-hook 'pdf-view-mode-hook |
|
|
(lambda () (pdf-tools-enable-minor-modes))) |
|
|
(lambda () (pdf-tools-enable-minor-modes))) |
|
|
(setq TeX-source-correlate-method 'synctex) |
|
|
|
|
|
|
|
|
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode) |
|
|
|
|
|
(setq TeX-source-correlate-start-server t) |
|
|
|
|
|
;(setq TeX-source-correlate-method 'synctex) |
|
|
|
|
|
|
|
|
;;--end---- |
|
|
;;--end---- |
|
|
;;.............. |
|
|
;;.............. |
|
|
;;======== |
|
|
;;======== |
|
@ -100,6 +103,31 @@ |
|
|
(require 'org-ref) |
|
|
(require 'org-ref) |
|
|
(setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) |
|
|
(setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) |
|
|
(setq org-latex-prefer-user-labels t) |
|
|
(setq org-latex-prefer-user-labels t) |
|
|
|
|
|
;;; Crear gráficos con org-mode con ditaa y plantuml |
|
|
|
|
|
(setq org-plantuml-jar-path |
|
|
|
|
|
(expand-file-name "/opt/plantuml.jar")) |
|
|
|
|
|
(setq org-ditaa-jar-path "/usr/bin/ditaa") |
|
|
|
|
|
(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) |
|
|
|
|
|
(latex . t) |
|
|
|
|
|
(python . t) |
|
|
|
|
|
;; (shell . t) |
|
|
|
|
|
(ditaa . t) |
|
|
|
|
|
(plantuml . t) |
|
|
|
|
|
(ipython . t) |
|
|
|
|
|
)) |
|
|
|
|
|
;; Syntax highlight in #+BEGIN_SRC blocks |
|
|
|
|
|
(setq org-src-fontify-natively t) |
|
|
|
|
|
;; Don't prompt before running code in org |
|
|
|
|
|
(setq org-confirm-babel-evaluate nil) |
|
|
|
|
|
;; Fix an incompatibility between the ob-async and ob-ipython packages |
|
|
|
|
|
(setq ob-async-no-async-languages-alist '("ipython")) |
|
|
|
|
|
(require 'ob-ipython) |
|
|
|
|
|
(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images) |
|
|
|
|
|
(is-installed 'org-bullets) |
|
|
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) |
|
|
|
|
|
;(setq org-ditaa-jar-path "/usr/bin/ditaa") |
|
|
|
|
|
;(is-installed 'ditaa) |
|
|
|
|
|
|
|
|
;; ========== |
|
|
;; ========== |
|
|
;; TRMAP |
|
|
;; TRMAP |
|
|
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) |
|
|
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) |
|
@ -122,10 +150,41 @@ |
|
|
(is-installed 'neotree) |
|
|
(is-installed 'neotree) |
|
|
(require 'neotree) |
|
|
(require 'neotree) |
|
|
(global-set-key [f8] 'neotree-toggle) |
|
|
(global-set-key [f8] 'neotree-toggle) |
|
|
|
|
|
|
|
|
|
|
|
;;======= |
|
|
|
|
|
;; Python completion: |
|
|
|
|
|
(is-installed 'anaconda-mode) |
|
|
|
|
|
(add-hook 'python-mode-hook 'anaconda-mode) |
|
|
|
|
|
(add-hook 'python-mode-hook 'anaconda-eldoc-mode) |
|
|
|
|
|
(is-installed 'elpy) |
|
|
|
|
|
(elpy-enable) |
|
|
|
|
|
;(add-hook 'python-mode-hook 'jedi:setup) |
|
|
|
|
|
;(setq jedi:complete-on-dot t) ; optional |
|
|
|
|
|
;(setq jedi:environment-root "/usr/local/bin/python3") |
|
|
|
|
|
;;======= |
|
|
|
|
|
;; Python pyvenv |
|
|
|
|
|
(is-installed 'pyvenv) |
|
|
|
|
|
(pyvenv-mode t) |
|
|
|
|
|
(setenv "WORKON_HOME" "~/.pyvenv/") |
|
|
|
|
|
;;(setq python-shell-interpreter (concat pyvenv-virtual-env "bin/python3")) ;;(setq python-shell-interpreter "/usr/local/bin/python3") |
|
|
|
|
|
;;-+-+-+-+-+-+-+-+-+- |
|
|
|
|
|
;; My functions gmarx |
|
|
|
|
|
;; Python chunk: |
|
|
|
|
|
(defun python-shell-send-chunk () |
|
|
|
|
|
"Eval a region on python console" |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(save-excursion |
|
|
|
|
|
(mark-paragraph) |
|
|
|
|
|
(let ((start (region-beginning)) |
|
|
|
|
|
(end (region-end))) |
|
|
|
|
|
(python-shell-send-region start end)) |
|
|
|
|
|
(keyboard-quit))) |
|
|
|
|
|
;; my keybindings: |
|
|
|
|
|
;; requires that only be active on the pytho-hook |
|
|
|
|
|
(global-set-key (kbd "C-.") 'python-shell-send-chunk) |
|
|
|
|
|
(global-set-key (kbd "C-,") 'python-shell-send-statement) |
|
|
;;==================== |
|
|
;;==================== |
|
|
;; emacs startup config |
|
|
;; emacs startup config |
|
|
(setq inhibit-startup-message nil) ;;inhibit startup |
|
|
|
|
|
|
|
|
(setq inhibit-startup-message t) ;;inhibit startup |
|
|
(global-visual-line-mode t) |
|
|
(global-visual-line-mode t) |
|
|
(tool-bar-mode -1) |
|
|
(tool-bar-mode -1) |
|
|
(menu-bar-mode -1) |
|
|
(menu-bar-mode -1) |
|
@ -136,14 +195,77 @@ |
|
|
(fset 'yes-or-no-p 'y-or-n-p) ;; Ask y/n instead of yes/no |
|
|
(fset 'yes-or-no-p 'y-or-n-p) ;; Ask y/n instead of yes/no |
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode) ;; display line number when programming |
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode) ;; display line number when programming |
|
|
(show-paren-mode +1) ;; show matching parentheses |
|
|
(show-paren-mode +1) ;; show matching parentheses |
|
|
|
|
|
|
|
|
|
|
|
;; 2.6 ace-window |
|
|
|
|
|
(is-installed 'ace-window) |
|
|
|
|
|
(global-set-key (kbd "M-o") 'ace-window) |
|
|
|
|
|
;; 2.7 avy |
|
|
|
|
|
(is-installed 'avy) |
|
|
|
|
|
(avy-setup-default) |
|
|
|
|
|
(global-set-key (kbd "M-g f") 'avy-goto-line) |
|
|
|
|
|
(global-set-key (kbd "M-g w") 'avy-goto-word-1) |
|
|
|
|
|
|
|
|
|
|
|
;; 2.8 multiple-cursors |
|
|
|
|
|
(is-installed 'multiple-cursors) |
|
|
|
|
|
(require 'multiple-cursors) |
|
|
|
|
|
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) |
|
|
|
|
|
(global-set-key (kbd "C->") 'mc/mark-next-like-this) |
|
|
|
|
|
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this) |
|
|
|
|
|
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this) |
|
|
;;--------- |
|
|
;;--------- |
|
|
|
|
|
;;3 language tools |
|
|
|
|
|
;;--------------- |
|
|
|
|
|
;; (is-installed 'langtool) |
|
|
|
|
|
;; (setq langtool-http-server-host "localhost" |
|
|
|
|
|
;; langtool-http-server-port 8010) |
|
|
|
|
|
;; (setq langtool-java-user-arguments '("-Dfile.encoding=UTF-8")) |
|
|
|
|
|
;; (setq langtool-default-language "en-US") |
|
|
|
|
|
;; (global-set-key "\C-x4w" 'langtool-check) |
|
|
|
|
|
;; (global-set-key "\C-x4W" 'langtool-check-done) |
|
|
|
|
|
;; (global-set-key "\C-x4l" 'langtool-switch-default-language) |
|
|
|
|
|
;; (global-set-key "\C-x44" 'langtool-show-message-at-point) |
|
|
|
|
|
;; (global-set-key "\C-x4c" 'langtool-correct-buffer) |
|
|
|
|
|
;; (defun langtool-autoshow-detail-popup (overlays) |
|
|
|
|
|
;; (when (require 'popup nil t) |
|
|
|
|
|
;; ;; Do not interrupt current popup |
|
|
|
|
|
;; (unless (or popup-instances |
|
|
|
|
|
;; ;; suppress popup after type `C-g` . |
|
|
|
|
|
;; (memq last-command '(keyboard-quit))) |
|
|
|
|
|
;; (let ((msg (langtool-details-error-message overlays))) |
|
|
|
|
|
;; (popup-tip msg))))) |
|
|
|
|
|
;; (setq langtool-autoshow-message-function |
|
|
|
|
|
;; 'langtool-autoshow-detail-popup) |
|
|
|
|
|
;;--------------- |
|
|
|
|
|
;;4 Grammarly |
|
|
|
|
|
;; (is-installed 'grammarly) |
|
|
|
|
|
;; (defun test-on-message (data) |
|
|
|
|
|
;; "On message callback with DATA." |
|
|
|
|
|
;; (message "[DATA] %s" data)) |
|
|
|
|
|
;; ;; Set callback for receiving data. |
|
|
|
|
|
;; (add-to-list 'grammarly-on-message-function-list 'test-on-message) |
|
|
|
|
|
;; ;; Send check text request. |
|
|
|
|
|
;; (grammarly-check-text "Hello World") |
|
|
|
|
|
;;------- |
|
|
|
|
|
;;4.1 Grammarly |
|
|
|
|
|
(is-installed 'flycheck-grammarly) |
|
|
|
|
|
(with-eval-after-load 'flycheck |
|
|
|
|
|
(flycheck-grammarly-setup)) |
|
|
|
|
|
(setq flycheck-grammarly-check-time 0.8) |
|
|
|
|
|
;;------ |
|
|
(custom-set-variables |
|
|
(custom-set-variables |
|
|
;; custom-set-variables was added by Custom. |
|
|
;; custom-set-variables was added by Custom. |
|
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
|
;; Your init file should contain only one such instance. |
|
|
;; Your init file should contain only one such instance. |
|
|
;; If there is more than one, they won't work right. |
|
|
;; If there is more than one, they won't work right. |
|
|
|
|
|
'(custom-safe-themes |
|
|
|
|
|
'("613aedadd3b9e2554f39afe760708fc3285bf594f6447822dd29f947f0775d6c" "b0e446b48d03c5053af28908168262c3e5335dcad3317215d9fdeb8bac5bacf9" "e19ac4ef0f028f503b1ccafa7c337021834ce0d1a2bca03fcebc1ef635776bea" "d268b67e0935b9ebc427cad88ded41e875abfcc27abd409726a92e55459e0d01" "745d03d647c4b118f671c49214420639cb3af7152e81f132478ed1c649d4597d" "246a9596178bb806c5f41e5b571546bb6e0f4bd41a9da0df5dfbca7ec6e2250c" "4f1d2476c290eaa5d9ab9d13b60f2c0f1c8fa7703596fa91b235db7f99a9441b" default)) |
|
|
'(package-selected-packages |
|
|
'(package-selected-packages |
|
|
'(docker-compose-mode markdown-mode org-ref doom-modeline all-the-icons doom-themes which-key helm use-package))) |
|
|
|
|
|
|
|
|
'(flycheck-grammarly grammarly org-bullets multiple-cursors ace-window ipython-shell-send ob-ipython elpy ditaa pyvenv anaconda-mode which-key use-package org-ref neotree markdown-mode doom-themes doom-modeline auctex)) |
|
|
|
|
|
'(safe-local-variable-values |
|
|
|
|
|
'((TeX-auto-save . t) |
|
|
|
|
|
(TeX-parse-self . t) |
|
|
|
|
|
(org-attach-use-inheritance . t) |
|
|
|
|
|
(LaTeX-includegraphics-read-file . LaTeX-includegraphics-read-file-relative)))) |
|
|
(custom-set-faces |
|
|
(custom-set-faces |
|
|
;; custom-set-faces was added by Custom. |
|
|
;; custom-set-faces was added by Custom. |
|
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
|