My emacs configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. ;; Added by Package.el. This must come before configurations of
  2. ;; installed packages. Don't delete this line. If you don't want it,
  3. ;; just comment it out by adding a semicolon to the start of the line.
  4. ;; You may delete these explanatory comments.
  5. ;; (package-initialize)
  6. ;; Set up package.el to work with MELPA
  7. (require 'package)
  8. (add-to-list 'package-archives
  9. '("melpa" . "https://melpa.org/packages/"))
  10. (package-initialize)
  11. ;;(package-refresh-contents)
  12. ;;--------------
  13. ;; Packages Gerardo Marx/Jul/2020:
  14. ;; Enable Evil
  15. ;; (require 'evil)
  16. ;; (evil-mode 1)
  17. ;; Projectile configuration:
  18. (projectile-mode +1)
  19. (define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
  20. (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
  21. (projectile-global-mode)
  22. (setq projectile-completion-system 'helm)
  23. (helm-projectile-on)
  24. ;; Helm
  25. (require 'helm-config)
  26. (global-set-key (kbd "M-x") #'helm-M-x)
  27. (global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks)
  28. (global-set-key (kbd "C-x C-f") #'helm-find-files)
  29. (helm-mode 1)
  30. ;; auto-complete
  31. (ac-config-default)
  32. ;; pdlatex:
  33. (setq latex-run-command "pdflatex")
  34. (setenv "PATH" (concat "/Library/TeX/texbin" (getenv "PATH")))
  35. (setq exec-path (append '("/Library/TeX/texbin") exec-path))
  36. ;; ------
  37. (setq-default TeX-master nil)
  38. ;; Use pdf-tools to open PDF files
  39. (setq TeX-view-program-selection '((output-pdf "PDF Tools"))
  40. TeX-source-correlate-start-server t)
  41. ;; Update PDF buffers after successful LaTeX runs
  42. (add-hook 'TeX-after-compilation-finished-functions
  43. #'TeX-revert-document-buffer)
  44. ;;--------------------
  45. (custom-set-variables
  46. ;; custom-set-variables was added by Custom.
  47. ;; If you edit it by hand, you could mess it up, so be careful.
  48. ;; Your init file should contain only one such instance.
  49. ;; If there is more than one, they won't work right.
  50. )
  51. (custom-set-faces
  52. ;; custom-set-faces was added by Custom.
  53. ;; If you edit it by hand, you could mess it up, so be careful.
  54. ;; Your init file should contain only one such instance.
  55. ;; If there is more than one, they won't work right.
  56. )
  57. ;; My basic configuration Gerardo Marx 15/Jul/2020
  58. ;; Set default font:
  59. (add-to-list 'default-frame-alist
  60. '(font . "Source Code Pro-20"))
  61. ;; line numbers:
  62. ;;(when (version<= "26.0.50" emacs-version )
  63. ;; (global-display-line-numbers-mode))
  64. ;; toolbar
  65. (tool-bar-mode -1)
  66. ;; windmove:
  67. (windmove-default-keybindings 'meta)
  68. ;;-------
  69. ;;Python:
  70. (require 'virtualenvwrapper)
  71. (venv-initialize-interactive-shells) ;; if you want interactive shell support
  72. (venv-initialize-eshell) ;; if you want eshell support
  73. ;; note that setting `venv-location` is not necessary if you
  74. ;; use the default location (`~/.virtualenvs`), or if the
  75. ;; the environment variable `WORKON_HOME` points to the right place
  76. (setq venv-location "~/.virtualenvs")
  77. ;; jedi python autocompletition for emacs:
  78. (add-hook 'python-mode-hook 'jedi:setup)
  79. (setq jedi:complete-on-dot t) ; optional
  80. ;;---------
  81. ;; magit:
  82. (global-set-key (kbd "C-x g") 'magit-status)
  83. ;; theme changer:
  84. ;; (setq calendar-location-name "Mexico, MX")
  85. ;; (setq calendar-latitude 23.63)
  86. ;; (setq calendar-longitude 102.55)
  87. ;; (require 'theme-changer)
  88. ;; (change-theme 'tango 'misterioso)
  89. ;; -----------------
  90. ;; org agenda and capture
  91. (global-set-key (kbd "C-c l") 'org-store-link)
  92. (global-set-key (kbd "C-c a") 'org-agenda)
  93. (global-set-key (kbd "C-c c") 'org-capture)
  94. (org-babel-do-load-languages
  95. 'org-babel-load-languages
  96. '((python . t)))
  97. ;; ispell
  98. (setq ispell-program-name "/usr/local/bin/aspell")