Skip to content

Instantly share code, notes, and snippets.

@juliowaissman
Last active January 13, 2020 00:37
Show Gist options
  • Save juliowaissman/77c5a20891cb46413cb60498c5f281e0 to your computer and use it in GitHub Desktop.
Save juliowaissman/77c5a20891cb46413cb60498c5f281e0 to your computer and use it in GitHub Desktop.
Configuración de emacs que estoy usando en la Mac
(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.
'(custom-enabled-themes (quote (wombat)))
'(display-time-mode t)
'(package-selected-packages
(quote
(pc-bufsw perspective projectile org-bullets auctex org-gcal use-package magit elpy)))
'(text-mode-hook (quote (turn-on-flyspell text-mode-hook-identify))))
(custom-set-faces
;; custom-set-faces 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.
)
;; Letra tamaño 16
(set-face-attribute 'default (selected-frame) :height 160)
;; Números mas chiquitos en el modo linum
(eval-after-load "linum"
'(set-face-attribute 'linum nil :height 130))
;; Key modifiers for Mac OS X Emacs.app in spanish MBP keyboard
(global-set-key (kbd "M-1") "|")
(global-set-key (kbd "M-2") "@")
(global-set-key (kbd "M-3") "#")
(global-set-key (kbd "M-º") "\\")
(global-set-key (kbd "M-ç") "}")
(global-set-key (kbd "M-+") "]")
;; El instalador de paquetes
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; Poner en automático el modo IDO (para lo interactivo)
(require 'ido)
(ido-mode t)
(setq ido-separator "\n")
;; El IDE para python que me gusta
(elpy-enable)
;; Agregando un shortcut para magit (GIT en emacs)
(global-set-key (kbd "C-x g") 'magit-status)
;; Usa por default latexmk con C-c C-c en AucTex
(add-hook 'LaTeX-mode-hook (lambda ()
(push
'("latexmk" "latexmk -pdf %s" TeX-run-TeX nil t
:help "Run latexmk on file")
TeX-command-list)))
(add-hook 'TeX-mode-hook '(lambda () (setq TeX-command-default "latexmk")))
;; Modificacones al look de org
(use-package org-bullets
:ensure t
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
;; Modificaciones para usar con org-agenda
(global-set-key (kbd "C-c a") 'org-agenda)
(define-key global-map (kbd "C-c c") 'org-capture)
(setq org-agenda-files (list "~/agenda/gcal.org"
"~/agenda/todo.org"))
(setq org-capture-templates
'(("a" "Appointment" entry (file "~/agenda/gcal.org" )
"* %?\n\n%^T\n\n:PROPERTIES:\n\n:END:\n\n")
("l" "Link" entry (file+headline "~/agenda/links.org" "Links")
"* %? %^L %^g \n%T" :prepend t)
("t" "To Do Item" entry (file+headline "~/agenda/todo.org" "To Do")
"* TODO %?\n%u" :prepend t)
("n" "Note" entry (file+headline "~/agenda/todo.org" "Note space")
"* %?\n%u" :prepend t)
("j" "Journal" entry (file+datetree "~/agenda/journal.org")
"* %?\nEntered on %U\n %i\n %a")))
;;open agenda in current window
(setq org-agenda-window-setup (quote current-window))
(setq org-agenda-custom-commands
'(("c" "Simple agenda view"
((agenda "")
(alltodo "")))
("n" "Notes"
((org-agenda-overriding-header "Note space")
(org-tags-match-list-sublevels t)))))
;; Modificaciones para sincronizar org-gcal
(setq package-check-signature nil)
(use-package org-gcal
:ensure t
:config
(setq org-gcal-client-id "31076050277-289bn8vejv7493gjndstoo43741oaele.apps.googleusercontent.com"
org-gcal-client-secret "HDSeXeQPvw1YSDGMe0-uMOqz"
org-gcal-file-alist '(("[email protected]" . "~/agenda/gcal.org"))))
;; Sincroniza la agenda org con el calendaro de google cada vez que se agregue un evento
(add-hook 'org-agenda-mode-hook (lambda () (org-gcal-sync) ))
;;Abre la agenda en la ventana actual y no la divide
(setq org-agenda-window-setup (quote current-window))
;; Muestra la hora en la barra de status
(display-time-mode 1)
;; Maximiza con <f19>
(global-set-key (kbd "<f19>") 'toggle-frame-fullscreen)
;; Implementa para flyspell el uso de el boton 3 del ratón
(eval-after-load "flyspell"
'(progn
(define-key flyspell-mouse-map [down-mouse-3] #'flyspell-correct-word)
(define-key flyspell-mouse-map [mouse-3] #'undefined)))
;; Activa porjectle en forma general (para el manejo de proyectos)
(projectile-global-mode)
;; Activa perspective en projectile (cada proyecto tiene su propo workspace)
;; Desactivado porque no lo encontré util.
;; (persp-mode)
;; (require 'persp-projectile)
;; Empieza con la pantalla maximizada
(toggle-frame-fullscreen)
;; Utiliza Ctrl-tab para cambiar de buffers con pc-bufsw
(require 'pc-bufsw)
(pc-bufsw-default-keybindings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment