Created
April 3, 2018 15:17
-
-
Save nbw/ab0fae7173666c6b411373a9d9ab2aff to your computer and use it in GitHub Desktop.
my emacs file
This file contains hidden or 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
;; MELPA | |
(require 'package) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) | |
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) | |
(setq package-enable-at-startup nil) | |
(package-initialize) | |
;; This is only needed once, near the top of the file | |
(eval-when-compile | |
;; Following line is not needed if use-package.el is in ~/.emacs.d | |
(add-to-list 'load-path "<path where use-package is installed>") | |
(require 'use-package)) | |
(use-package evil | |
:ensure t | |
:config | |
(evil-mode 1) | |
) | |
(use-package evil-surround | |
:ensure t | |
:config | |
(global-evil-surround-mode)) | |
(use-package evil-commentary | |
:ensure t | |
:config | |
(evil-commentary-mode)) | |
(use-package evil-leader | |
:ensure t | |
:config | |
(global-evil-leader-mode)) | |
;; Theme | |
(use-package color-theme-sanityinc-tomorrow | |
:ensure t | |
) | |
;; Markdown Mode | |
(use-package markdown-mode | |
:ensure t) | |
;; Elixir Mode | |
(use-package elixir-mode | |
:ensure t) | |
;; Projectile | |
(use-package projectile | |
:ensure t | |
:defer t | |
:config | |
(projectile-global-mode)) | |
;; Helm | |
(use-package helm | |
:ensure t | |
:config | |
(helm-mode 1) | |
(setq helm-autoresize-mode t) | |
(global-set-key (kbd "C-x C-f") #'helm-find-files) | |
(global-set-key (kbd "M-x") #'helm-M-x) | |
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to do persistent action | |
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal | |
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z | |
) | |
;; Helm Projectile | |
(use-package helm-projectile | |
:bind (("C-S-P" . helm-projectile-switch-project)) | |
:map evil-normal-state-map | |
("C-p" . helm-projectile-find-file)) | |
:ensure t | |
) | |
;; Magit for git | |
(use-package magit | |
:ensure t) | |
;; NeoTree File Viewer | |
(use-package neotree | |
:ensure t | |
) | |
;; Remove the toolbar | |
(tool-bar-mode -1) | |
;; Remove Scroll bars | |
(scroll-bar-mode -1) | |
;; Display line numbers | |
(global-linum-mode t) | |
(setq linum-format "%d ") | |
;; Ctags | |
(setq path-to-ctags "/usr/local/bin/ctags") | |
;; invoke it via ‘m-x create-tags’ | |
(defun create-tags (dir-name) | |
"Create tags file." | |
(interactive "DDirectory: ") | |
(shell-command | |
(format "%s -f TAGS -e -R %s" path-to-ctags (directory-file-name dir-name))) | |
) | |
(defun config-file () | |
(interactive) | |
(find-file "~/.emacs") | |
) | |
;; Magit key bindings | |
(global-set-key (kbd "C-x g") 'magit-status) | |
;; Neotree config | |
(setq neo-theme 'ascii) | |
(global-set-key (kbd "C-x t") 'neotree-toggle) | |
;; Neotree Evil Mode Config | |
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) | |
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look) | |
(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) | |
(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) | |
;; Set font | |
(add-to-list 'default-frame-alist '(font . "Monaco" )) | |
(set-face-attribute 'default t :font "Monaco" ) | |
;; Word wrap | |
(setq-default truncate-lines 1) | |
;; Fullscreen Mode | |
(custom-set-variables | |
'(initial-frame-alist (quote ((fullscreen . maximized))))) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(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. | |
'(ansi-color-faces-vector | |
[default bold shadow italic underline bold bold-italic bold]) | |
'(ansi-color-names-vector | |
["#eee8d5" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#839496"]) | |
'(beacon-color "#cc6666") | |
'(compilation-message-face (quote default)) | |
'(cua-global-mark-cursor-color "#2aa198") | |
'(cua-normal-cursor-color "#657b83") | |
'(cua-overwrite-cursor-color "#b58900") | |
'(cua-read-only-cursor-color "#859900") | |
'(custom-enabled-themes (quote (sanityinc-tomorrow-night))) | |
'(custom-safe-themes | |
(quote | |
("732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default))) | |
'(fci-rule-color "#eee8d5") | |
'(flycheck-color-mode-line-face-to-color (quote mode-line-buffer-id)) | |
'(frame-background-mode (quote dark)) | |
'(highlight-changes-colors (quote ("#d33682" "#6c71c4"))) | |
'(highlight-symbol-colors | |
(--map | |
(solarized-color-blend it "#fdf6e3" 0.25) | |
(quote | |
("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2")))) | |
'(highlight-symbol-foreground-color "#586e75") | |
'(highlight-tail-colors | |
(quote | |
(("#eee8d5" . 0) | |
("#B4C342" . 20) | |
("#69CABF" . 30) | |
("#69B7F0" . 50) | |
("#DEB542" . 60) | |
("#F2804F" . 70) | |
("#F771AC" . 85) | |
("#eee8d5" . 100)))) | |
'(hl-bg-colors | |
(quote | |
("#DEB542" "#F2804F" "#FF6E64" "#F771AC" "#9EA0E5" "#69B7F0" "#69CABF" "#B4C342"))) | |
'(hl-fg-colors | |
(quote | |
("#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3"))) | |
'(hl-sexp-background-color "#1c1f26") | |
'(magit-diff-use-overlays nil) | |
'(package-selected-packages | |
(quote | |
(evil-leader solarized-theme material-theme markdown-mode use-package ## projectile elixir-mode evil color-theme-sanityinc-tomorrow))) | |
'(pos-tip-background-color "#eee8d5") | |
'(pos-tip-foreground-color "#586e75") | |
'(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#eee8d5" 0.2)) | |
'(term-default-bg-color "#fdf6e3") | |
'(term-default-fg-color "#657b83") | |
'(vc-annotate-background nil) | |
'(vc-annotate-color-map | |
(quote | |
((20 . "#dc322f") | |
(40 . "#c85d17") | |
(60 . "#be730b") | |
(80 . "#b58900") | |
(100 . "#a58e00") | |
(120 . "#9d9100") | |
(140 . "#959300") | |
(160 . "#8d9600") | |
(180 . "#859900") | |
(200 . "#669b32") | |
(220 . "#579d4c") | |
(240 . "#489e65") | |
(260 . "#399f7e") | |
(280 . "#2aa198") | |
(300 . "#2898af") | |
(320 . "#2793ba") | |
(340 . "#268fc6") | |
(360 . "#268bd2")))) | |
'(vc-annotate-very-old-color nil) | |
'(weechat-color-list | |
(quote | |
(unspecified "#fdf6e3" "#eee8d5" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#657b83" "#839496")))) | |
(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. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment