Created
September 3, 2019 18:56
-
-
Save tavoaqp-zz/05fd9448106a5a299558a0a8d7c3c2a3 to your computer and use it in GitHub Desktop.
Latest Emacs config!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'package) | |
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) | |
(not (gnutls-available-p)))) | |
(proto (if no-ssl "http" "https"))) | |
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired | |
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) | |
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) | |
(when (< emacs-major-version 24) | |
;; For important compatibility libraries like cl-lib | |
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/"))))) | |
(package-initialize) | |
(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-safe-themes | |
(quote | |
("0e8bac1e87493f6954faf5a62e1356ec9365bd5c33398af3e83cfdf662ad955f" "8bd04f477a44ad2c1bc33522e939026ca0a8839b6a24aeeaee242c6a2a3b2a09" "b59d7adea7873d58160d368d42828e7ac670340f11f36f67fa8071dbf957236a" "b9e9ba5aeedcc5ba8be99f1cc9301f6679912910ff92fdf7980929c2fc83ab4d" "41c8c11f649ba2832347fe16fe85cf66dafe5213ff4d659182e25378f9cfc183" "59e82a683db7129c0142b4b5a35dbbeaf8e01a4b81588f8c163bd255b76f4d21" "89f545ddc104836b27167696db89b371f23893d5b2f038d43383d877ee678d3d" "ba913d12adb68e9dadf1f43e6afa8e46c4822bb96a289d5bf1204344064f041e" "f11e219c9d043cbd5f4b2e01713c2c24a948a98bed48828dc670bd64ae771aa1" "8dc7f4a05c53572d03f161d82158728618fb306636ddeec4cce204578432a06d" "ab98c7f7a58add58293ac67bec05ae163b5d3f35cddf18753b2b073c3fcd8841" "c9b89349d269af4ac5d832759df2f142ae50b0bbbabcce9c0dd53f79008443c9" "de1f10725856538a8c373b3a314d41b450b8eba21d653c4a4498d52bb801ecd2" "02199888a97767d7779269a39ba2e641d77661b31b3b8dd494b1a7250d1c8dc1" "43b219a31db8fddfdc8fdbfdbd97e3d64c09c1c9fdd5dff83f3ffc2ddb8f0ba0" "4b19d61c560a93ef90767abe513c11f236caec2864617d718aa366618133704c" "e7b49145d311e86da34a32a7e1f73497fa365110a813d2ecd8105eaa551969da" "174502267725776b47bdd2d220f035cae2c00c818765b138fea376b2cdc15eb6" "3e83abe75cebf5621e34ce1cbe6e12e4d80766bed0755033febed5794d0c69bf" "2642a1b7f53b9bb34c7f1e032d2098c852811ec2881eec2dc8cc07be004e45a0" "c3e6b52caa77cb09c049d3c973798bc64b5c43cc437d449eacf35b3e776bf85c" "70f5a47eb08fe7a4ccb88e2550d377ce085fedce81cf30c56e3077f95a2909f2" "5a0eee1070a4fc64268f008a4c7abfda32d912118e080e18c3c865ef864d1bea" "73c69e346ec1cb3d1508c2447f6518a6e582851792a8c0e57a22d6b9948071b4" "2a7beed4f24b15f77160118320123d699282cbf196e0089f113245d4b729ba5d" "bf798e9e8ff00d4bf2512597f36e5a135ce48e477ce88a0764cfb5d8104e8163" "c9ddf33b383e74dac7690255dd2c3dfa1961a8e8a1d20e401c6572febef61045" "36ca8f60565af20ef4f30783aa16a26d96c02df7b4e54e9900a5138fb33808da" "27b97024320d223cbe0eb73104f2be8fcc55bd2c299723fc61d20057f313b51c" "2540689fd0bc5d74c4682764ff6c94057ba8061a98be5dd21116bf7bf301acfb" "da538070dddb68d64ef6743271a26efd47fbc17b52cc6526d932b9793f92b718" "0cd56f8cd78d12fc6ead32915e1c4963ba2039890700458c13e12038ec40f6f5" "84d2f9eeb3f82d619ca4bfffe5f157282f4779732f48a5ac1484d94d5ff5b279" "bc75dfb513af404a26260b3420d1f3e4131df752c19ab2984a7c85def9a2917e" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default))) | |
'(ivy-mode nil) | |
'(org-agenda-files (quote ("~/git/projects.org" "~/git/projects.org"))) | |
'(package-selected-packages | |
(quote | |
(dashboard snazzy-theme restclient restclient-helm nimbus-theme counsel aurora-config-mode swiper swiper-helm magit-gh-pulls google-this org-beautify-theme org-bullets org-dashboard org-pomodoro org-projectile org-projectile-helm org spotify sublimity playerctl helm-spotify-plus helm-spotify darcula-theme cyberpunk-theme creamsody-theme constant-theme clues-theme calmer-forest-theme busybee-theme bubbleberry-theme brutalist-theme borland-blue-theme blackboard-theme birds-of-paradise-plus-theme badwolf-theme badger-theme autumn-light-theme atom-dark-theme apropospriate-theme anti-zenburn-theme ample-zen-theme ample-theme ahungry-theme afternoon-theme telephone-line expand-region ess ess-R-data-view ess-smart-equals ess-smart-underscore ess-view smart-mode-line-powerline-theme smart-mode-line-atom-one-dark-theme smart-mode-line airline-themes micgoline powerline tabbar neotree all-the-icons-dired dynamic-fonts fontawesome ace-jump-mode csv zel slack helm helm-ag-r helm-git all-the-icons dired-sidebar exec-path-from-shell encourage-mode evil pandoc-mode pandoc markdown-preview-mode markdown-mode+ use-package-chords use-package melancholy-theme helm-mt jenkins butler imenu-anywhere smartscan buffer-flip emr markdown-mode helm-codesearch helm-ag helm-projectile jedi indent-tools elpy ein go-mode pomidor academic-phrases projectile-speedbar multi-term ng2-mode angular-mode ac-html-angular handoff golden-ratio go grizzl magit-gitflow magit dockerfile-mode docker-compose-mode docker auctex ag ensime scala-mode projectile sourcerer-theme))) | |
'(tabbar-background-color "black") | |
'(tabbar-separator (quote (0.5))) | |
'(tabbar-use-images nil)) | |
(require 'smart-mode-line) | |
(setq sml/theme 'powerline) | |
(sml/setup) | |
(load-theme 'snazzy t) | |
;;(add-to-list 'load-path "/home/gtorres/git/ESS/lisp") | |
;;(load "ess-site") | |
(setq-default left-margin-width 5 right-margin-width 5) | |
(projectile-global-mode) | |
(projectile-mode +1) | |
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map) | |
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) | |
(setq projectile-completion-system 'grizzl) | |
(require 'multi-term) | |
(setq multi-term-program "/bin/bash") | |
;;(require 'projectile-speedbar) | |
(require 'pomidor) | |
(setq pomidor-sound-tick nil | |
pomidor-sound-tack nil) | |
(require 'helm-projectile) | |
(helm-projectile-on) | |
(autoload 'ctags-update "ctags-update" "update TAGS using ctags" t) | |
(global-set-key "\C-cE" 'ctags-update) | |
(eval-when-compile | |
(require 'use-package)) | |
(use-package use-package-chords | |
:config (key-chord-mode 1)) | |
(use-package buffer-flip | |
:ensure t | |
:chords ((";." . buffer-flip) ("çl" . buffer-flip)) | |
:bind (:map buffer-flip-map | |
( "." . buffer-flip-forward) | |
( "l" . buffer-flip-forward) | |
( "*" . buffer-flip-backward) | |
( "C-g" . buffer-flip-abort))) | |
(global-set-key (kbd "M-i") #'helm-imenu-anywhere) | |
(require 'multi-term) | |
(setq multi-term-program "/bin/bash") | |
(require 'helm-mt) | |
(global-set-key (kbd "C-x t") 'helm-mt) | |
(helm-mt/reroute-terminal-functions t) | |
(menu-bar-mode -1) | |
(tool-bar-mode -1) | |
(global-set-key (kbd "C-x g") 'magit-status) | |
(use-package encourage-mode | |
:ensure t | |
:config | |
;; Activate encourage-mode | |
(encourage-mode t)) | |
(use-package dired-sidebar | |
:bind (("C-x C-n" . dired-sidebar-toggle-sidebar)) | |
:ensure t | |
:commands (dired-sidebar-toggle-sidebar) | |
:init | |
(add-hook 'dired-sidebar-mode-hook | |
(lambda () | |
(unless (file-remote-p default-directory) | |
(auto-revert-mode)))) | |
:config | |
(push 'toggle-window-split dired-sidebar-toggle-hidden-commands) | |
(push 'rotate-windows dired-sidebar-toggle-hidden-commands) | |
(setq dired-sidebar-subtree-line-prefix "__") | |
(setq dired-sidebar-theme 'vscode) | |
(setq dired-sidebar-use-term-integration t) | |
(setq dired-sidebar-use-custom-font t)) | |
(use-package all-the-icons) | |
(use-package zel | |
:ensure t | |
:demand t | |
:bind (("C-x C-r" . zel-find-file-frecent)) | |
:config (zel-install)) | |
;; (use-package vscode-icon | |
;; :ensure t | |
;; :commands (vscode-icon-for-file)) | |
;; (setq vscode-icon-size 16) | |
;; | |
;; ace jump mode major function | |
;; | |
(add-to-list 'load-path "/full/path/where/ace-jump-mode.el/in/") | |
(autoload | |
'ace-jump-mode | |
"ace-jump-mode" | |
"Emacs quick move minor mode" | |
t) | |
(defun xah-copy-line-or-region () | |
"Copy current line, or text selection. | |
When `universal-argument' is called first, copy whole buffer (but respect `narrow-to-region')." | |
(interactive) | |
(let (p1 p2) | |
(if (null current-prefix-arg) | |
(progn (if (use-region-p) | |
(progn (setq p1 (region-beginning)) | |
(setq p2 (region-end))) | |
(progn (setq p1 (line-beginning-position)) | |
(setq p2 (line-end-position))))) | |
(progn (setq p1 (point-min)) | |
(setq p2 (point-max)))) | |
(kill-ring-save p1 p2)) | |
(message "Copied region") | |
) | |
(defun mark-whole-line () | |
"Combinition of C-a, mark, C-e" | |
(interactive) | |
(move-beginning-of-line nil) | |
(set-mark-command nil) | |
(move-end-of-line nil) | |
(copy-region-as-kill nil) | |
) | |
(key-chord-define-global "-3" 'ace-jump-char-mode) | |
(key-chord-define-global "-1" 'ace-jump-word-mode) | |
(key-chord-define-global "-2" 'ace-jump-line-mode) | |
(key-chord-define-global "-e" 'helm-projectile-switch-project) | |
(key-chord-define-global "-w" 'helm-projectile-find-file) | |
(key-chord-define-global "-q" 'helm-projectile-switch-to-buffer) | |
(key-chord-define-global "-r" 'switch-to-buffer) | |
(key-chord-define-global "-a" 'projectile-dired) | |
(key-chord-define-global "-s" 'save-buffer) | |
(key-chord-define-global "-d" 'kill-buffer) | |
(key-chord-define-global "-f" 'switch-to-buffer) | |
(key-chord-define-global "-z" 'buffer-flip) | |
(key-chord-define-global "-c" 'xah-copy-line-or-region) | |
(key-chord-define-global "-v" 'yank) | |
(key-chord-define-global "-x" 'magit-status) | |
(key-chord-define-global "-r" 'replace-string) | |
;; you can select the key you prefer to | |
(define-key global-map (kbd "C-s-<f11>") "\C-p") | |
(define-key global-map (kbd "C-s-_") "\C-n") | |
(define-key global-map (kbd "C-s-+") 'scroll-up-command) | |
(define-key global-map (kbd "C-s-<f12>") 'scroll-down-command) | |
(define-key global-map (kbd "C-s--") 'left-word) | |
(define-key global-map (kbd "C-s-=") 'right-word) | |
(define-key global-map (kbd "C-s-9") 'backward-char) | |
(define-key global-map (kbd "C-s-0") 'forward-char) | |
(define-key global-map (kbd "C-{") "\C-p") | |
(define-key global-map (kbd "C-}") "\C-n") | |
(define-key global-map (kbd "s-}") 'scroll-up-command) | |
(define-key global-map (kbd "s-{") 'scroll-down-command) | |
(define-key global-map (kbd "M-ç") 'left-word) | |
(define-key global-map (kbd "M-]") 'right-word) | |
(define-key global-map (kbd "C-M-ç") 'backward-char) | |
(define-key global-map (kbd "C-M-]") 'forward-char) | |
(global-set-key (kbd "C-S-s") 'isearch-forward-symbol-at-point) | |
(global-set-key (kbd "M-9") 'kill-whole-line) | |
(require 'dynamic-fonts) | |
(dynamic-fonts-setup) | |
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) | |
(require 'neotree) | |
(global-set-key [f8] 'neotree-toggle) | |
(setq neo-theme (if (display-graphic-p) 'icons 'arrow)) | |
;; (require 'powerline) | |
;; Tabbar | |
(require 'tabbar) | |
(customize-set-variable 'tabbar-background-color "black") | |
(customize-set-variable 'tabbar-separator '(0.5)) | |
(customize-set-variable 'tabbar-use-images nil) | |
(set-face-attribute | |
'tabbar-default nil | |
:background "gray20" | |
:foreground "black" | |
:distant-foreground "black" | |
:box '(:line-width 1 :color "black" :style nil)) | |
(set-face-attribute | |
'tabbar-unselected nil | |
:background "black" | |
:foreground "gray80" | |
:box '(:line-width 5 :color "gray80" :style nil)) | |
(set-face-attribute | |
'tabbar-modified nil | |
:foreground "#cc7474" | |
:box nil | |
:inherit 'tabbar-unselected) | |
(set-face-attribute | |
'tabbar-selected nil | |
:background "black" | |
:foreground "#dbf5b1" | |
:box '(:line-width 5 :color "#dbf5b1" :style nil)) | |
(set-face-attribute | |
'tabbar-selected-modified nil | |
:inherit 'tabbar-selected | |
:foreground "GoldenRod2" | |
:box nil) | |
(set-face-attribute | |
'tabbar-separator nil | |
:background "gray20" | |
:height 0.6) | |
(set-face-attribute | |
'tabbar-button nil | |
:box '(:line-width 1 :color "gray20" :style nil) | |
) | |
;; Change padding of the tabs | |
;; we also need to set separator to avoid overlapping tabs by highlighted tabs | |
;; adding spaces | |
(defun tabbar-buffer-tab-label (tab) | |
"Return a label for TAB. | |
That is, a string used to represent it on the tab bar." | |
(let ((label (if tabbar--buffer-show-groups | |
(format "[%s] " (tabbar-tab-tabset tab)) | |
(format "%s " (tabbar-tab-value tab))))) | |
;; Unless the tab bar auto scrolls to keep the selected tab | |
;; visible, shorten the tab label to keep as many tabs as possible | |
;; in the visible area of the tab bar. | |
(if tabbar-auto-scroll-flag | |
label | |
(tabbar-shorten | |
label (max 1 (/ (window-width) | |
(length (tabbar-view | |
(tabbar-current-tabset))))))))) | |
;; ;; (require 'powerline) | |
;; ;; (defvar my/tabbar-height 20) | |
;; ;; (defvar my/tabbar-left (powerline-wave-right 'tabbar-default nil my/tabbar-height)) | |
;; ;; (defvar my/tabbar-right (powerline-wave-left nil 'tabbar-default my/tabbar-height)) | |
;; ;; (defun my/tabbar-tab-label-function (tab) | |
;; ;; (powerline-render (list my/tabbar-left | |
;; ;; (format " %s " (car tab)) | |
;; ;; my/tabbar-right))) | |
;; ;; (setq tabbar-tab-label-function #'my/tabbar-tab-label-function) | |
(tabbar-mode 1) | |
(global-set-key [M-left] 'tabbar-backward-tab) | |
(global-set-key [M-right] 'tabbar-forward-tab) | |
;; ;; | |
;; ;; (require 'micgoline) | |
;; ;;(require 'smart-mode-line) | |
;; ;;(setq sml/theme 'powerline) | |
;; ;;(sml/setup) | |
;; ;; (require 'telephone-line) | |
;; ;; (setq telephone-line-subseparator-faces '()) | |
;; ;; (setq telephone-line-height 24 | |
;; ;; telephone-line-evil-use-short-tag t) | |
;; ;; (telephone-line-mode 1) | |
;; ;; (require 'powerline) | |
;; ;; (powerline-default-theme) | |
;; ;; (require 'spaceline-config) | |
;; ;; (spaceline-spacemacs-theme) | |
;; ;; (require 'airline-themes) | |
;; ;; (load-theme 'airline-light) | |
;;(require 'ess-view) | |
(require 'expand-region) | |
(global-set-key (kbd "C-=") 'er/expand-region) | |
(require 'sublimity) | |
(require 'sublimity-attractive) | |
(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. | |
) | |
(require 'sublimity) | |
(sublimity-mode 1) | |
(require 'org) | |
(define-key global-map "\C-cl" 'org-store-link) | |
(define-key global-map "\C-ca" 'org-agenda) | |
(setq org-log-done t) | |
(require 'org-bullets) | |
(add-hook 'org-mode-hook 'org-bullets-mode) | |
(require 'org-dashboard) | |
(require 'org-pomodoro) | |
(require 'org-projectile) | |
(setq org-projectile-projects-file | |
"~/git/projects.org") | |
(push (org-projectile-project-todo-entry) org-capture-templates) | |
(setq org-agenda-files (append org-agenda-files (org-projectile-todo-files))) | |
(global-set-key (kbd "C-c c") 'org-capture) | |
(global-set-key (kbd "C-c n p") 'org-projectile-project-todo-completing-read) | |
(require 'org-projectile-helm) | |
(google-this-mode 1) | |
(require 'ivy) | |
(require 'swiper) | |
(require 'counsel) | |
(ivy-mode 1) | |
(setq ivy-use-virtual-buffers t) | |
(setq enable-recursive-minibuffers t) | |
(global-set-key "\C-s" 'swiper) | |
(global-set-key (kbd "M-x") 'counsel-M-x) | |
(global-set-key (kbd "C-x C-f") 'counsel-find-file) | |
(setq org-todo-keywords | |
'((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE"))) | |
(require 'dashboard) | |
(dashboard-setup-startup-hook) | |
;; Or if you use use-package | |
(use-package dashboard | |
:ensure t | |
:config | |
(dashboard-setup-startup-hook)) | |
;; Set the title | |
(setq dashboard-banner-logo-title "Hola Papá! Vamos a trabajar!") | |
;; Set the banner | |
(setq dashboard-startup-banner "/home/gtorres/Imagens/pepito_emacs2.png") | |
;; 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.png" which displays whatever image you would prefer | |
;; Content is not centered by default. To center, set | |
(setq dashboard-center-content t) | |
(setq dashboard-items '((recents . 5) | |
(projects . 5) | |
(agenda . 5))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment