|
@ -1,15 +1,27 @@ |
|
|
;;; My basic configuration Gerardo Marx 20/May/2021 |
|
|
;;; My basic configuration Gerardo Marx 20/May/2021 |
|
|
|
|
|
;; MacOS version |
|
|
;;-------- |
|
|
;;-------- |
|
|
;; Melpa repository: |
|
|
;; Melpa repository: |
|
|
(require 'package) |
|
|
(require 'package) |
|
|
(add-to-list 'package-archives |
|
|
(add-to-list 'package-archives |
|
|
'("melpa" . "https://melpa.org/packages/")t) |
|
|
'("melpa" . "https://melpa.org/packages/")t) |
|
|
(package-initialize) |
|
|
(package-initialize) |
|
|
|
|
|
;;+++++++++++++ |
|
|
|
|
|
;;function to check installed packages: |
|
|
|
|
|
(defun is-installed (pack) |
|
|
|
|
|
"Check if a package is istalled" |
|
|
|
|
|
(unless (package-installed-p pack) |
|
|
|
|
|
(package-refresh-contents) |
|
|
|
|
|
(package-install pack))) |
|
|
;;++++++++++++++++ |
|
|
;;++++++++++++++++ |
|
|
;; use-package |
|
|
;; use-package |
|
|
(unless (package-installed-p 'use-package) |
|
|
|
|
|
(package-refresh-contents) |
|
|
|
|
|
(package-install 'use-package)) |
|
|
|
|
|
|
|
|
(is-installed 'use-package) |
|
|
|
|
|
(is-installed 'helm) |
|
|
|
|
|
(require 'helm-config) |
|
|
|
|
|
(global-set-key (kbd "M-x") 'helm-M-x) |
|
|
|
|
|
(global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks) |
|
|
|
|
|
(global-set-key (kbd "C-x C-f") #'helm-find-files) |
|
|
|
|
|
(helm-mode 1) |
|
|
;;+++++++++++++ |
|
|
;;+++++++++++++ |
|
|
;; frame size |
|
|
;; frame size |
|
|
(setq initial-frame-alist '((top . 0)(left . 0) |
|
|
(setq initial-frame-alist '((top . 0)(left . 0) |
|
@ -44,30 +56,48 @@ |
|
|
'(font . "Source Code Pro-24")) |
|
|
'(font . "Source Code Pro-24")) |
|
|
;;+++++++ |
|
|
;;+++++++ |
|
|
;;auctex: |
|
|
;;auctex: |
|
|
|
|
|
(setenv "PATH" (concat "/Library/TeX/texbin:" |
|
|
|
|
|
(getenv "PATH"))) |
|
|
|
|
|
(add-to-list 'exec-path "/Library/TeX/texbin") |
|
|
(setq TeX-auto-save t) |
|
|
(setq TeX-auto-save t) |
|
|
(setq TeX-parse-self t) |
|
|
(setq TeX-parse-self t) |
|
|
(setq-default TeX-master nil) |
|
|
(setq-default TeX-master nil) |
|
|
;;--end---- |
|
|
;;--end---- |
|
|
;;++++++++ |
|
|
;;++++++++ |
|
|
;; emacs startup config |
|
|
;; emacs startup config |
|
|
(setq inhibit-startup-message t) ;;inhibit startup |
|
|
|
|
|
(tool-bar-mode -1) |
|
|
|
|
|
(menu-bar-mode -1) |
|
|
|
|
|
(global-hl-line-mode +1) ;; highlith current line |
|
|
|
|
|
(delete-selection-mode +1) ;; deletes selected text and replace it |
|
|
|
|
|
(scroll-bar-mode -1) |
|
|
|
|
|
(setq ns-right-alternate-modifier nil) ;; right option macos key enable |
|
|
|
|
|
(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 |
|
|
|
|
|
(show-paren-mode +1) ;; show matching parentheses |
|
|
|
|
|
|
|
|
(setq inhibit-startup-message t) ;;inhibit startup |
|
|
|
|
|
(global-visual-line-mode t) |
|
|
|
|
|
(tool-bar-mode -1) |
|
|
|
|
|
(menu-bar-mode -1) |
|
|
|
|
|
(global-hl-line-mode +1) ;; highlith current line |
|
|
|
|
|
(delete-selection-mode +1) ;; deletes selected text and replace it |
|
|
|
|
|
(scroll-bar-mode -1) |
|
|
|
|
|
(setq ns-right-alternate-modifier nil) ;; right option macos key enable |
|
|
|
|
|
(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 |
|
|
|
|
|
(show-paren-mode +1) ;; show matching parentheses |
|
|
|
|
|
;;--------- |
|
|
|
|
|
;;======== |
|
|
|
|
|
;;Flyspell |
|
|
|
|
|
(setq ispell-program-name "/usr/local/bin/aspell") |
|
|
|
|
|
;(setq ispell-aspell-data-dir "/usr/local/Cellar/ispell/3.4.04/lib/ispell/") |
|
|
|
|
|
;(setq ispell-aspell-dict-dir ispell-aspell-data-dir) |
|
|
|
|
|
(dolist (hook '(text-mode-hook)) |
|
|
|
|
|
(add-hook hook (lambda () (flyspell-mode 1)))) |
|
|
|
|
|
;; ORG files: |
|
|
|
|
|
(is-installed 'org-ref) |
|
|
|
|
|
(require 'org-ref) |
|
|
|
|
|
(setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) |
|
|
|
|
|
(setq org-latex-prefer-user-labels t) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(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 |
|
|
|
|
|
(quote |
|
|
|
|
|
("08a27c4cde8fcbb2869d71fdc9fa47ab7e4d31c27d40d59bf05729c4640ce834" default)))) |
|
|
|
|
|
|
|
|
) |
|
|
(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. |
|
|