|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
;;; My basic configuration Gerardo Marx 20/May/2021 |
|
|
|
;; MacOS version |
|
|
|
;;-------- |
|
|
@ -27,11 +28,13 @@ |
|
|
|
(is-installed 'which-key) |
|
|
|
(require 'which-key) |
|
|
|
(which-key-mode) |
|
|
|
|
|
|
|
;;+++++++++++++ |
|
|
|
;; frame size |
|
|
|
(setq initial-frame-alist '((top . 35)(left . 10) |
|
|
|
(width . 80)(height . 45))) |
|
|
|
;; Opacity |
|
|
|
(set-frame-parameter (selected-frame) 'alpha '(85 . 50)) |
|
|
|
(add-to-list 'default-frame-alist '(alpha . (90 . 50))) |
|
|
|
;;+++++++++++ |
|
|
|
;; Doom-themes, all-the-icons, mode-line and font |
|
|
|
(unless (package-installed-p 'doom-themes) |
|
|
@ -63,8 +66,6 @@ |
|
|
|
;;+++++++ |
|
|
|
;;auctex: |
|
|
|
(is-installed 'auctex) |
|
|
|
;;(is-installed 'pdf-tools);; PDFtools |
|
|
|
;;(pdf-tools-install) |
|
|
|
(setenv "PATH" (concat "/Library/TeX/texbin:" |
|
|
|
(getenv "PATH"))) |
|
|
|
(add-to-list 'exec-path "/Library/TeX/texbin") |
|
|
@ -77,8 +78,7 @@ |
|
|
|
(add-hook 'LaTeX-mode-hook 'flyspell-mode) |
|
|
|
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) |
|
|
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) |
|
|
|
(custom-set-variables |
|
|
|
'(pdf-tools-handle-upgrades nil)) ; Use brew upgrade pdf-tools instead. |
|
|
|
;;Use brew upgrade pdf-tools instead. |
|
|
|
(setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo") |
|
|
|
(pdf-tools-install) |
|
|
|
(setq reftex-plug-into-AUCTeX t) |
|
|
@ -91,9 +91,6 @@ |
|
|
|
(add-hook 'pdf-view-mode-hook |
|
|
|
(lambda () (pdf-tools-enable-minor-modes))) |
|
|
|
(setq TeX-source-correlate-method 'synctex) |
|
|
|
(custom-set-variables '(LaTeX-command "latex -synctex=1")) |
|
|
|
(setq reftex-bibliography-commands '("bibliography" "nobibliography" "addbibresource")) |
|
|
|
|
|
|
|
;;--end---- |
|
|
|
;;++++++++ |
|
|
|
;; emacs startup config |
|
|
@ -109,6 +106,28 @@ |
|
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode) ;; display line number when programming |
|
|
|
(show-paren-mode +1) ;; show matching parentheses |
|
|
|
;;--------- |
|
|
|
;;Dashboard |
|
|
|
(is-installed 'dashboard) |
|
|
|
(require 'dashboard) |
|
|
|
(dashboard-setup-startup-hook) |
|
|
|
;; Set the title |
|
|
|
(setq dashboard-banner-logo-title "Welcome to Emacs Marx") |
|
|
|
;; Set the banner |
|
|
|
(setq dashboard-startup-banner 'logo) |
|
|
|
;; Value can be |
|
|
|
;; 'official which displays the official emacs logo |
|
|
|
;; 'logo which displays an alternative emacs logo |
|
|
|
;; 1, 2 or 3 which displays one of the text banners |
|
|
|
;; "path/to/your/image.gif", "path/to/your/image.png" or "path/to/your/text.txt" which displays whatever gif/image/text you would prefer |
|
|
|
;; Content is not centered by default. To center, set |
|
|
|
(setq dashboard-center-content nil) |
|
|
|
;; To disable shortcut "jump" indicators for each section, set |
|
|
|
(setq dashboard-show-shortcuts nil) |
|
|
|
(setq dashboard-items '((recents . 5) |
|
|
|
(bookmarks . 5) |
|
|
|
(projects . 5) |
|
|
|
(agenda . 5) |
|
|
|
(registers . 5))) |
|
|
|
;;======== |
|
|
|
;;Flyspell |
|
|
|
(setq ispell-program-name "/usr/local/bin/aspell") |
|
|
@ -119,15 +138,39 @@ |
|
|
|
;; ========== |
|
|
|
;; ORG files: |
|
|
|
(is-installed 'org-ref) |
|
|
|
(require 'org-ref) |
|
|
|
(is-installed 'org-ref) |
|
|
|
(setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) |
|
|
|
(setq org-latex-prefer-user-labels t) |
|
|
|
(is-installed 'org-bullets) |
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) |
|
|
|
;;(plist-put org-format-latex-options :scale 1.5) |
|
|
|
;;(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0)) |
|
|
|
; inline images |
|
|
|
;;(setq org-image-actual-width nil) |
|
|
|
(setq shr-max-image-proportion 0.5) |
|
|
|
; source blocks no confirmation to run |
|
|
|
(setq org-confirm-babel-evaluate nil) |
|
|
|
;; languages for source blocks |
|
|
|
(org-babel-do-load-languages |
|
|
|
'org-babel-load-languages |
|
|
|
'((emacs-lisp . t) |
|
|
|
(shell . t) ; in my case /bin/bash |
|
|
|
; (scheme . t) |
|
|
|
(python . t) |
|
|
|
; (ledger . t) |
|
|
|
; (sed . t) |
|
|
|
; (awk . t) |
|
|
|
; (clojure . t) |
|
|
|
)) |
|
|
|
;;keybindings in org-mode |
|
|
|
(define-key org-mode-map (kbd "C-<tab>") 'completion-at-point) |
|
|
|
;; ========== |
|
|
|
;; TRMAP |
|
|
|
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) |
|
|
|
;;========= |
|
|
|
;;Shell |
|
|
|
(setq-default explicit-shell-file-name "/bin/bash") |
|
|
|
(define-key shell-mode-map (kbd "<tab>") 'completion-at-point) |
|
|
|
;; ========= |
|
|
|
;; markdown |
|
|
|
(is-installed 'markdown-mode) |
|
|
@ -152,16 +195,11 @@ |
|
|
|
;; auto-complete |
|
|
|
(is-installed 'auto-complete) |
|
|
|
(ac-config-default) |
|
|
|
|
|
|
|
;;======= |
|
|
|
;; Python completion: |
|
|
|
(is-installed 'anaconda-mode) |
|
|
|
(add-hook 'python-mode-hook 'anaconda-mode) |
|
|
|
(add-hook 'python-mode-hook 'anaconda-eldoc-mode) |
|
|
|
(is-installed 'corfu) |
|
|
|
(corfu-global-mode t) |
|
|
|
|
|
|
|
;(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) |
|
|
@ -169,23 +207,66 @@ |
|
|
|
(setenv "WORKON_HOME" "~/.pyvenv/") |
|
|
|
;(setq python-shell-interpreter (concat pyvenv-virtual-env "bin/python3")) |
|
|
|
;(setq python-shell-interpreter "/usr/local/bin/python3") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;-------- |
|
|
|
;;ace-windows: |
|
|
|
(is-installed 'ace-window) |
|
|
|
(global-set-key (kbd "M-o") 'ace-window) |
|
|
|
;;-------- |
|
|
|
;;avy |
|
|
|
(is-installed 'avy) |
|
|
|
(global-set-key (kbd "C-:") 'avy-goto-char) |
|
|
|
(global-set-key (kbd "M-l") 'avy-goto-line) |
|
|
|
(global-set-key (kbd "C-'") 'avy-goto-char-2) |
|
|
|
(global-set-key (kbd "M-g w") 'avy-goto-word-1) |
|
|
|
;;-------- |
|
|
|
;;multiple-cursors |
|
|
|
(is-installed '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) |
|
|
|
;;-=-=-=-=-=-=-= |
|
|
|
(is-installed 'browse-kill-ring) |
|
|
|
(require 'browse-kill-ring) |
|
|
|
(browse-kill-ring-default-keybindings) |
|
|
|
;;+0+0+0+0+0+0+ |
|
|
|
;; MacOS only: |
|
|
|
(is-installed 'osx-dictionary) |
|
|
|
(global-set-key (kbd "C-c d") 'osx-dictionary-search-word-at-point) ;; Key bindings |
|
|
|
;;+0+0+0+0+0+0+0+ |
|
|
|
;;-+-+-+-+-+-+-+- |
|
|
|
;; My functions gmarx: |
|
|
|
(defun python-shell-send-chunk () |
|
|
|
(interactive) |
|
|
|
(save-excursion |
|
|
|
(mark-paragraph) |
|
|
|
(let ((start (region-beginning)) |
|
|
|
(end (region-end))) |
|
|
|
(python-shell-send-region start end)) |
|
|
|
(keyboard-quit))) |
|
|
|
;; my keybindings: |
|
|
|
(global-set-key (kbd "C-c C-k") 'python-shell-send-chunk) |
|
|
|
;;Pomodoro |
|
|
|
;;(is-installed 'org-pomodoro) |
|
|
|
;;(pomodoro-add-to-mode-line) |
|
|
|
;;========== |
|
|
|
(custom-set-variables |
|
|
|
;; custom-set-variables was added by Custom. |
|
|
|
;; If you edit it by hand, you could mess it up, so be careful. |
|
|
|
;; Your init file should contain only one such instance. |
|
|
|
;; If there is more than one, they won't work right. |
|
|
|
'(LaTeX-command "latex -synctex=1") |
|
|
|
'(custom-safe-themes |
|
|
|
'("0fe24de6d37ea5a7724c56f0bb01efcbb3fe999a6e461ec1392f3c3b105cc5ac" "e1ef2d5b8091f4953fe17b4ca3dd143d476c106e221d92ded38614266cea3c8b" "08a27c4cde8fcbb2869d71fdc9fa47ab7e4d31c27d40d59bf05729c4640ce834" "7a994c16aa550678846e82edc8c9d6a7d39cc6564baaaacc305a3fdc0bd8725f" default)) |
|
|
|
'("4bca89c1004e24981c840d3a32755bf859a6910c65b829d9441814000cf6c3d0" "f2927d7d87e8207fa9a0a003c0f222d45c948845de162c885bf6ad2a255babfd" "8f5a7a9a3c510ef9cbb88e600c0b4c53cdcdb502cfe3eb50040b7e13c6f4e78e" "d74c5485d42ca4b7f3092e50db687600d0e16006d8fa335c69cf4f379dbd0eee" "5b809c3eae60da2af8a8cfba4e9e04b4d608cb49584cb5998f6e4a1c87c057c4" "0fe24de6d37ea5a7724c56f0bb01efcbb3fe999a6e461ec1392f3c3b105cc5ac" "aaa4c36ce00e572784d424554dcc9641c82d1155370770e231e10c649b59a074" "08a27c4cde8fcbb2869d71fdc9fa47ab7e4d31c27d40d59bf05729c4640ce834" "f4876796ef5ee9c82b125a096a590c9891cec31320569fc6ff602ff99ed73dca" "7a994c16aa550678846e82edc8c9d6a7d39cc6564baaaacc305a3fdc0bd8725f" "c4bdbbd52c8e07112d1bfd00fee22bf0f25e727e95623ecb20c4fa098b74c1bd" "e074be1c799b509f52870ee596a5977b519f6d269455b84ed998666cf6fc802a" "4a8d4375d90a7051115db94ed40e9abb2c0766e80e228ecad60e06b3b397acab" "75b8719c741c6d7afa290e0bb394d809f0cc62045b93e1d66cd646907f8e6d43" "e3c64e88fec56f86b49dcdc5a831e96782baf14b09397d4057156b17062a8848" default)) |
|
|
|
'(org-agenda-files |
|
|
|
'("~/ownCloud/org/linux.org" "~/ownCloud/org/phd.org" "~/ownCloud/org/iDesiIng.org" "~/ownCloud/org/index.org")) |
|
|
|
'("~/ownCloud/projects/iProjects.org" "~/ownCloud/projects/postdoctorado/postdoctorado.org" "~/ownCloud/projects/phd/phd.org" "~/ownCloud/org/linux.org" "~/ownCloud/org/iDesiIng.org")) |
|
|
|
'(package-selected-packages |
|
|
|
'(anaconda-mode which-key use-package pyvenv pkg-info org-ref neotree markdown-mode jedi helm-projectile doom-themes doom-modeline docker-compose-mode auctex)) |
|
|
|
'(browse-kill-ring dashboard org-bullets org-pomodoro pomodoro corfu company-anaconda company-jedi anaconda-mode which-key use-package pyvenv pkg-info org-ref neotree markdown-mode jedi helm-projectile doom-themes doom-modeline docker-compose-mode auctex)) |
|
|
|
'(pdf-tools-handle-upgrades nil) |
|
|
|
'(safe-local-variable-values |
|
|
|
'((LaTeX-includegraphics-read-file . LaTeX-includegraphics-read-file-relative) |
|
|
|
'((org-attach-preferred-new-method . ask) |
|
|
|
(display-line-numbers . t) |
|
|
|
(LaTeX-includegraphics-read-file . LaTeX-includegraphics-read-file-relative) |
|
|
|
(org-attach-use-inheritance . t) |
|
|
|
(org-attach-id-dir . /Users/gmarx/ownCLoud/org/phd/) |
|
|
|
(org-attach-id-dir . /Users/gmarx/ownCloud/org/phd/) |
|
|
|