Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mi archivo emacs lisp generado a partir del archivo emacs-init.org (este archivo no se actualiza)
;;(toggle-debug-on-error)
;;(toggle-debug-on-quit) ;; Se activa cuando el usuario presiona C-g
(setf user-full-name "Jorge Araya Navarro"
user-mail-address "elcorreo@deshackra.com")
(setf package-archives (list (quote ("gnu" . "http://elpa.gnu.org/packages/"))
(quote ("marmalade" . "http://marmalade-repo.org/packages/"))
(quote ("melpa" . "http://melpa.milkbox.net/packages/"))
(quote ("org" . "http://orgmode.org/elpa/"))))
(org-babel-do-load-languages
'org-babel-load-languages
'(
(emacs-lisp . t)
(python . t)
)
)
(unless (file-exists-p (expand-file-name "elpa/archives/melpa" user-emacs-directory))
(package-refresh-contents))
(when (not (package-installed-p 'use-package))
(package-install 'use-package))
(require 'use-package)
(load-file (expand-file-name "paquetes.el" user-emacs-directory))
(load-file (expand-file-name "site-packages/golang/company-go.el" user-emacs-directory))
(load-file (expand-file-name "site-packages/erosiond-theme/erosiond-theme.el" user-emacs-directory))
;; carga un agregado para cuando se escriben correos usando mu4e
(load-file (expand-file-name "site-packages/u-vm-color/u-vm-color.el" user-emacs-directory))
(require 'uniquify)
(require 'helm)
(require 'helm-config)
(require 'helm-files)
(require 'helm-grep)
(require 'helm-buffers)
(require 'helm-org)
(require 'htmlize)
(require 'company)
(require 'hlinum)
(require 'fixmee)
(require 'expand-region)
(require 'web-mode)
(require 'epa-file)
(require 'visual-regexp)
(require 'visual-regexp-steroids)
(when (file-exists-p "/usr/share/emacs/site-lisp/go-mode.el")
(require 'go-mode-load))
(require 'company-go)
(require 'org)
(require 'org-page)
(require 'undo-tree)
(require 'dired+)
(require 'muse-mode)
(require 'muse-docbook)
(require 'muse-project)
(defun endless/insert-key (key)
"Ask for a key then insert its description.
Will work on both org-mode and any mode that accepts plain html."
(interactive "kType key sequence: ")
(let* ((is-org-mode (derived-mode-p 'org-mode))
(tag (if is-org-mode
"@@html:<kbd>%s</kbd>@@"
"<kbd>%s</kbd>")))
(if (null (equal key "\r"))
(insert
(format tag (help-key-description key nil)))
(insert (format tag ""))
(forward-char (if is-org-mode -8 -6)))))
;;(load-theme 'monokai t)
;;(setf initial-buffer-choice "*Org Agenda*")
(powerline-center-theme)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(tooltip-mode -1)
(recentf-mode 1)
(savehist-mode 1)
(set-frame-font "SourceCodePro 11")
(add-to-list (quote default-frame-alist) (quote (font . "SourceCodePro-11")))
(fset 'yes-or-no-p 'y-or-n-p)
(global-auto-revert-mode 1)
(column-number-mode 1)
(global-subword-mode 1)
(global-font-lock-mode 1)
(show-paren-mode t)
(delete-selection-mode 1)
(setf
bookmark-default-file (expand-file-name "bookmarks" user-emacs-directory)
bookmark-save-flag 1
inhibit-startup-message t
inhibit-startup-echo-area-message "jorge"
initial-scratch-message nil
line-spacing 1
make-backup-files nil
global-auto-revert-non-file-buffers t
auto-revert-verbose nil
echo-keystrokes 0.1
shift-select-mode nil
byte-compile-warnings '(not nresolved
free-vars
callargs
redefine
obsolete
noruntime
cl-functions
interactive-only)
fill-column 80
blink-matching-paren nil
uniquify-buffer-name-style (quote forward)
recentf-max-saved-items 100
history-length 1000
x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)
enable-recursive-minibuffers t
gc-cons-percentage 0.125
undo-tree-mode-lighter ""
ediff-diff-options "-w"
ediff-split-window-function 'split-window-horizontally
ediff-window-setup-function 'ediff-setup-windows-plain
)
(set-default 'indent-tabs-mode nil)
(set-default 'indicate-empty-lines t)
(setq-default truncate-lines t)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(if
(boundp 'buffer-file-coding-system)
(setq-default buffer-file-coding-system 'utf-8)
(setf default-buffer-file-coding-system 'utf-8))
;;(eval-after-load "yasnippet" '(diminish 'yas/minor-mode))
(eval-after-load "button-lock" '(diminish 'button-lock-mode))
(eval-after-load "org-indent" '(diminish 'org-indent-mode))
(eval-after-load "helm-mode" '(diminish 'helm-mode))
(eval-after-load "fixmee" '(diminish 'fixmee-mode))
(eval-after-load "elpy" '(diminish 'elpy-mode))
(eval-after-load "highlight-indentation" '(diminish 'highlight-indentation-mode))
(eval-after-load "autopair" '(diminish 'autopair-mode))
(eval-after-load "flycheck" '(diminish 'flycheck-mode))
(eval-after-load "flyspell" '(diminish 'flyspell-mode))
(eval-after-load "simple" '(diminish 'auto-fill-function))
(eval-after-load "company" '(diminish 'company-mode))
(eval-after-load "magit" '(diminish 'magit-auto-revert-mode))
(defun smart-beginning-of-line ()
"Move point to first non-whitespace character or beginning-of-line.
Move point to the first non-whitespace character on this line.
If point was already at that position, move point to beginning of line."
(interactive)
(let ((oldpos (point)))
(back-to-indentation)
(and (= oldpos (point))
(beginning-of-line))))
(global-set-key [home] 'smart-beginning-of-line)
(global-set-key (kbd "C-a") 'smart-beginning-of-line)
(setf custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file)
(add-hook (quote after-init-hook)
(lambda ()
(helm-mode 1)
(helm-descbinds-mode)
(projectile-global-mode)
(helm-projectile-on)
(global-flycheck-mode)
;;(auto-indent-global-mode)
(autopair-global-mode)
(global-pretty-mode t)
(global-company-mode)
(global-fixmee-mode 1)
;;(semantic-mode 1)
;;(global-move-dup-mode)
(global-relative-buffers-mode)
;;(global-auto-highlight-symbol-mode)
;; abre la agenda
(org-agenda-list 1)
(delete-other-windows)
))
(global-set-key (kbd "C-ç") 'undo)
(global-set-key (kbd "M-¡") 'text-scale-increase)
(global-set-key (kbd "M-'") 'text-scale-decrease)
(define-key global-map (kbd "M-o") 'other-window)
;; salta a la nueva ventana creada despues de dividir la actual
(global-set-key "\C-x2" (lambda () (interactive)(split-window-vertically) (other-window 1)))
(global-set-key "\C-x3" (lambda () (interactive)(split-window-horizontally) (other-window 1)))
(setf org-footnote-auto-adjust t
org-directory (expand-file-name "~/org")
org-archive-location (concat org-directory "/archivado.org::* Entradas viejas y archivadas")
org-special-ctrl-k t
org-ctrl-k-protect-subtree t ;; al usar C-k, evitamos perder todo el subarbol
org-catch-invisible-edits 'show
org-return-follow-link t
;;org-blank-before-new-entry t
org-startup-indented t
org-startup-folded nil
org-imenu-depth 5
org-log-done 'time
org-clock-persist 'history
org-agenda-files (list (concat org-directory "/cosasporhacer.org")
(concat org-directory "/agenda.org"))
org-default-notes-file (concat org-directory "/diario.org")
org-capture-templates `(("p" "Cosas por hacer" entry (file+headline ,(concat org-directory "/cosasporhacer.org") "Tareas")
"* POR HACER %^{breve descripcion}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("x" "Proyectos de clientes en PeoplePerHour" entry (file+headline ,(concat org-directory "/cosasporhacer.org") "Proyectos en PeoplePerHour")
"* POR HACER %^{Titulo del proyecto}\n%^{cliente}p\n%^{ID}p\nDescripción: %?" :clock-in nil :clock-keep nil :clock-resume nil)
("c" "Calendario" entry (file+headline ,(concat org-directory "/cosasporhacer.org") "Calendario")
"* %^{Nombre del evento}\n SCHEDULED: %:date" :clock-in nil :clock-keep nil :clock-resume nil)
("a" "Cumpleaños y aniversarios" entry (file+headline ,(concat org-directory "/agenda.org") "Cumpleaños y aniversarios")
"* %^{Nombre del cumpleañero o aniversario}\n SCHEDULED: %:date\n %?" :clock-in nil :clock-keep nil :clock-resume nil)
("g" "Algún día/Tal vez" entry (file+headline ,(concat org-directory "/quizas.org") "En 'veremos'")
"* %^{breve descripcion}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("l" "Algún día/Tal vez (Libros)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Libros por leer")
"* Leer %^{titulo del libro} por %^{autor o autores}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("v" "Algún día/Tal vez (Peliculas)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Películas por ver")
"* Ver la pelicula %^{titulo de la pelicula}\n %?\n Added: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("m" "Algún día/Tal vez (Música)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Música por escuchar")
"* Escuchar cierta(s) cancion(es) de %^{artista}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("b" "Algún día/Tal vez (Blogs)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Blogs por leer")
"* Leer [[%:url][%^{titulo de la entrada de blog}]] por %^{autor}\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("z" "Algún día/Tal vez (Por hacer)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Cosas por hacer")
"* %^{breve descripcion de la tarea}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("w" "Algún día/Tal vez (Aprender)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Cosas por aprender")
"* %^{breve descripcion}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
("n" "Algún día/Tal vez (Nuevo proyecto)" entry (file+olp ,(concat org-directory "/quizas.org") "En 'veremos'" "Nuevos proyectos")
"* %^{breve descripcion}\n %?\nAdded: %U" :clock-in nil :clock-keep nil :clock-resume nil)
)
org-todo-keywords '((sequence "POR HACER(p)" "EN PROGRESO(g)" "EN ESPERA(e@/!)" "EN REVISIÓN(r@/!)" "|" "CANCELADO(c@)" "TERMINADO(t!)"))
org-todo-keyword-faces '(
("POR HACER" . (:foreground "black" :background "#ff4500" :weight bold))
("EN PROGRESO" . (:foreground "black" :background "#ffa500" :weight bold))
("EN ESPERA" . (:foreground "black" :background "#0000ff" :weight bold))
("EN REVISIÓN" . (:foreground "black" :background "#ffff00" :weight bold))
("TERMINADO" . (:foreground "black" :background "#32cd32" :weight bold))
("CANCELADO" . (:foreground "black" :background "#8b0000" :weight bold))
)
)
(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda)
(define-key global-map (kbd "C-c c") 'org-capture)
(define-key org-mode-map (kbd "C-¡") 'er/expand-region)
(define-key org-mode-map (kbd "C-c k") #'endless/insert-key)
(org-clock-persistence-insinuate)
;; sacado de http://emacs.stackexchange.com/a/2103/690
(add-to-list 'ispell-skip-region-alist '(":\\(PROPERTIES\\|LOGBOOK\\):" . ":END:"))
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_SRC" . "#\\+END_SRC"))
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_EXAMPLE" . "#\\+END_EXAMPLE"))
(add-hook 'org-mode-hook (lambda ()
(auto-fill-mode -1)
(visual-line-mode)
)
)
(setf op/repository-directory "/home/jorge/Documentos/elblog.deshackra.com"
op/site-domain "http://elblog.deshackra.com/"
op/site-main-title "El blog de Shackra"
op/site-sub-title "«No seas tan abierto de mente o tu cerebro se caerá» ~G.K. Chesterton"
op/personal-github-link "https://github.com/shackra"
op/theme-root-directory (expand-file-name "themes" user-emacs-directory)
op/theme 'shc
)
(defun op/do-publication-all ()
"You could re-publish all org source files. To publish all files use this function"
(op/do-publication t nil nil t)
)
(add-hook 'text-mode-hook
(lambda ()
(turn-on-auto-fill)
(flyspell-mode)
(set (make-local-variable 'fill-column) 110)
))
;; re-une la tecla TAB con el comando para ejecutar la acción persistente
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
;; Hace que la tecla TAB en la terminal funcione nuevamente
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
(define-key isearch-mode-map (kbd "M-i") 'helm-swoop-from-isearch)
;; Lista las acciones disponibles usando C-z en lugar de TAB
(define-key helm-map (kbd "C-z") 'helm-select-action)
(define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward)
(setf
helm-google-suggest-use-curl-p t
helm-scroll-amount 4
helm-quick-update t
helm-idle-delay 0.01
helm-input-idle-delay 0.01
helm-ff-search-library-in-sexp t
helm-split-window-default-side 'other
helm-split-window-in-side-p t
helm-candidate-number-limit 200
helm-M-x-requires-pattern 0
helm-ff-file-name-history-use-recentf t
helm-move-to-line-cycle-in-source t
helm-buffers-fuzzy-matching t
helm-boring-buffer-regexp-list '("\\` "
"\\*helm"
"\\*helm-mode"
"\\*Echo Area"
"\\*Minibuf"
"\\*monky-cmd-process\\*"
"\\*epc con"
"\\*Compile-Log\\*"
"\\*monky-process\\*"
"\\*CEDET CScope\\*"
"\\*Messages\\*"
"\\*Flycheck error"
"\\*Elpy"
"\\*elpy-rpc"
"\\*magit"
"\\*.+(.+)"
"elpa/.+")
helm-boring-file-regexp-list (quote
("\\.git$" "\\.hg$" "\\.svn$" "\\.CVS$"
"\\._darcs$" "\\.la$" "\\.o$" "~$"
"\\.pyc$" "\\.elc$" "TAGS" "\#*\#"
"\\.exe$" "\\.jar$" "\\.img$" "\\.iso$"
"\\.xlsx$" "\\.epub$" "\\.docx$"))
helm-ff-skip-boring-buffers t
helm-truncate-lines t
helm-projectile-sources-list '(helm-source-projectile-files-list
helm-source-projectile-projects))
(add-hook 'helm-goto-line-before-hook 'helm-save-current-pos-to-mark-ring)
(global-set-key (kbd "C-x f") 'helm-recentf)
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
(global-set-key (kbd "C-c i") 'helm-imenu)
(define-key global-map (kbd "C-x C-f") 'helm-find-files)
(define-key global-map (kbd "C-x b") 'helm-buffers-list)
(setf
projectile-completion-system 'helm
projectile-file-exists-remote-cache-expire (* 10 60)
projectile-globally-ignored-files (quote ("TAGS" "\#*\#" "*~" "*.la"
"*.o" "~" "*.pyc" "*.elc" "*.exe"
"*.zip" "*.tar.*" "*.rar" "*.7z"))
projectile-switch-project-action 'helm-projectile-find-file
)
(setf multi-term-buffer-name "terminal "
multi-term-program "/bin/bash"
term-bind-key-alist (list (cons "C-c C-c" 'term-interrupt-subjob)
(cons "C-p" 'previous-line)
(cons "C-n" 'next-line)
(cons "M-f" 'term-send-forward-word)
(cons "M-b" 'term-send-backward-word)
(cons "C-c C-j" 'term-line-mode)
(cons "C-c C-k" 'term-char-mode)
(cons "M-DEL" 'term-send-backward-kill-word)
(cons "M-d" 'term-send-forward-kill-word)
(cons "<C-left>" 'term-send-backward-word)
(cons "<C-right>" 'term-send-forward-word)
(cons "C-r" 'term-send-reverse-search-history)
(cons "M-p" 'term-send-raw-meta)
(cons "M-y" 'term-send-raw-meta)
(cons "C-y" 'term-send-raw)))
(add-hook 'term-mode-hook
(lambda ()
(yas-minor-mode -1)))
(global-set-key [f1] 'multi-term)
(global-set-key [C-next] 'multi-term-next)
(global-set-key [C-prior] 'multi-term-prev)
(setf company-idle-delay 0.3
company-tooltip-limit 20
company-minimum-prefix-length 2
company-echo-delay 0
company-auto-complete nil)
(add-to-list 'company-backends 'company-dabbrev t)
(add-to-list 'company-backends 'company-ispell t)
(add-to-list 'company-backends 'company-files t)
(add-to-list 'company-backends 'company-yasnippet t)
(elpy-enable)
(setf python-indent-guess-indent-offset nil
python-indent 4
python-indent-offset 4)
(add-hook 'python-mode-hook
(lambda ()
(nlinum-mode)
(hlinum-activate)))
(global-set-key (kbd "C-h C-m") 'discover-my-major)
(global-set-key (kbd "C-'") 'er/expand-region)
(define-key global-map (kbd "C-+") 'mc/mark-next-like-this)
(define-key global-map (kbd "M-+") 'mc/mark-previous-like-this)
(define-key global-map (kbd "C-M-+") 'mc/mark-all-like-this)
;; Para diseñadores web, marca la etiqueta de apertura y cierre
;;(define-key sgml-mode-map (kbd "C-'") 'mc/mark-sgml-tag-pair) ;;Symbol's value as variable is void: sgml-mode-map
(setf
flycheck-disabled-checkers '(emacs-lisp-checkdoc) ;; deshabilita el majadero revisor de documentación
flycheck-indication-mode 'right-fringe
)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[gj]sp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) ;; para plantillas de Django.
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) ;; para editar archivos HTML
(when (file-exists-p "/usr/share/emacs/site-lisp/mu4e/")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
(autoload 'mu4e "mu4e" "Mail client based on mu (maildir-utils)." t)
(require 'org-mu4e)
(setf mu4e-view-show-images t)
(global-key-binding (kbd "[f7]") 'mu4e)
(when (fboundp 'imagemagick-register-types)
(imagemagick-register-types))
(setf
;; html2text es un paquete que debe estar instalado en tu sistema
mu4e-confirm-quit nil
mu4e-html2text-command "html2text -width 100 -style pretty -nobs"
mu4e-get-mail-command "offlineimap"
mu4e-maildir "/home/jorge/correo"
mu4e-update-interval 60
mu4e-auto-retrieve-keys t
mu4e-headers-leave-behavior 'apply
mu4e-headers-visible-lines 5
mu4e-hide-index-messages t
message-kill-buffer-on-exit t
mu4e-attachment-dir "~/Descargas"
mu4e-maildir "~/correo" ;; top-level Maildir
mu4e-sent-folder "/principal/INBOX/Sent" ;; folder for sent messages
mu4e-drafts-folder "/principal/INBOX/Drafts" ;; unfinished messages
mu4e-trash-folder "/principal/INBOX/Trash" ;; trashed messages
mu4e-refile-folder "/principal/INBOX/Archives" ;; Mensajes salvados
smtpmail-stream-type 'ssl
smtpmail-smtp-service 465
message-send-mail-function 'smtpmail-send-it
)
(load (expand-file-name "mu4e-conf.secret.gpg" user-emacs-directory) t)
;; funcion para seleccionar la cuenta con la que se va a responder a un email
(defun my-mu4e-set-account ()
"Set the account for composing a message."
(let* ((account
(if mu4e-compose-parent-message
(let ((maildir (mu4e-message-field mu4e-compose-parent-message :maildir)))
(string-match "/\\(.*?\\)/" maildir)
(match-string 1 maildir))
(completing-read (format "Componer correo con la cuenta: (%s) "
(mapconcat #'(lambda (var) (car var))
my-mu4e-account-alist "/"))
(mapcar #'(lambda (var) (car var)) my-mu4e-account-alist)
nil t nil nil (caar my-mu4e-account-alist))))
(account-vars (cdr (assoc account my-mu4e-account-alist))))
(if account-vars
(mapc #'(lambda (var)
(set (car var) (cadr var)))
account-vars)
(error "Cuenta de correo no encontrada"))))
;; y enganchamos la funcion
(add-hook 'mu4e-compose-pre-hook 'my-mu4e-set-account)
)
(defun dired-quit-window-kill-buffer ()
"Además de matar el buffer, cierra la ventana"
(interactive)
(let ((win-curr (selected-window))
(win-other (next-window)))
(select-window win-other)
(kill-this-buffer)
(select-window win-curr)))
(setf dired-dwim-target t)
(define-key ctl-x-map "d" 'dired)
(define-key ctl-x-4-map "d" 'diredp-dired-for-files-other-window)
(define-key dired-mode-map (kbd ".") 'dired-up-directory)
(define-key dired-mode-map (kbd "q") 'dired-quit-window-kill-buffer)
(global-set-key (kbd "C-c SPC") 'ace-jump-mode)
(define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark)
(define-key global-map [C-f12] 'magit-status)
(define-key global-map [f12] 'monky-status)
(setf monky-process-type 'cmdserver)
(sml/setup)
(sml/apply-theme 'respectful)
(add-to-list 'sml/replacer-regexp-list '("^~/coders/" ":Código:") t)
(add-to-list 'sml/replacer-regexp-list '("^:Código:PPH/clientes/" ":PPH:") t)
(define-key global-map (kbd "C-c r") 'vr/replace)
(define-key global-map (kbd "C-c q") 'vr/query-replace)
(define-key global-map (kbd "C-c m") 'vr/mc-mark)
(define-key esc-map (kbd "C-r") 'vr/isearch-backward) ;; C-M-r
(define-key esc-map (kbd "C-s") 'vr/isearch-forward) ;; C-M-s
(add-hook 'prog-mode-hook
(lambda ()
(set (make-local-variable 'fill-column) 79)
(set (make-local-variable 'comment-auto-fill-only-comments) t)
(auto-fill-mode t)
(toggle-truncate-lines)
(highlight-numbers-mode)
(hes-mode)
(highlight-blocks-mode)
;; redefinimos la tecla RET para que inserte un salto de linea y la
;; idente de manera adecuada.
(define-key prog-mode-map (kbd "RET") 'newline-and-indent))
)
(add-hook 'go-mode-hook (lambda ()
(local-set-key (kbd "C-c C-r") 'go-remove-unused-imports)
(local-set-key (kbd "C-c i") 'go-goto-imports)
(local-set-key (kbd "M-.") 'godef-jump)
(set (make-local-variable 'company-backends) '(company-go))
(go-eldoc-setup)
))
;;nada por agregar, aun...
(require 'cmake-project)
(defun maybe-cmake-project-hook ()
(if (file-exists-p "CMakeLists.txt") (cmake-project-mode)))
(defun my-irony-mode-hook ()
(define-key irony-mode-map [remap completion-at-point]
'irony-completion-at-point-async)
(define-key irony-mode-map [remap complete-symbol]
'irony-completion-at-point-async))
(add-hook 'c++-mode-hook
(lambda ()
(irony-mode)
(set (make-local-variable 'company-backends) '(company-c-headers
company-irony
company-yasnippet
))
(maybe-cmake-project-hook)
))
(add-hook 'irony-mode-hook
(lambda ()
(company-irony-setup-begin-commands)
(my-irony-mode-hook)
))
(require 'cmake-mode)
(setq auto-mode-alist
(append
'(("CMakeLists\\.txt\\'" . cmake-mode))
'(("\\.cmake\\'" . cmake-mode))
auto-mode-alist))
(add-hook 'cmake-mode-hook
(lambda ()
(set (make-local-variable 'company-backends) '(company-cmake
company-yasnippet))
))
(add-hook 'muse-mode-hook (lambda ()
(auto-fill-mode -1)
(visual-line-mode)
)
)
(add-hook 'before-save-hook 'py-autopep8-before-save)
(add-hook 'before-save-hook 'web-beautify-html-buffer t t)
(add-hook 'before-save-hook 'gofmt-before-save)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.