├── .gitignore ├── .mc-lists.el ├── LICENSE ├── README.org ├── custom.el └── init.el /.gitignore: -------------------------------------------------------------------------------- 1 | *.elc 2 | *~ 3 | .#* 4 | .DS_Store 5 | .ido.last 6 | .python-environments 7 | .saved-places 8 | README.el 9 | abbrev_defs 10 | ac-comphist.dat 11 | bookmarks 12 | ede-projects.el 13 | elpa/ 14 | ensime/ 15 | eshell/ 16 | games/ 17 | ido.last 18 | image-dired/ 19 | irony/ 20 | recentf 21 | semanticdb/ 22 | smex-items 23 | snippets/ 24 | srecode-map.el 25 | tramp 26 | url/ -------------------------------------------------------------------------------- /.mc-lists.el: -------------------------------------------------------------------------------- 1 | ;; This file is automatically generated by the multiple-cursors extension. 2 | ;; It keeps track of your preferences for running commands with multiple cursors. 3 | 4 | (setq mc/cmds-to-run-for-all 5 | '( 6 | LaTeX-babel-insert-hyphen 7 | TeX-insert-backslash 8 | autopair-insert-opening 9 | autopair-insert-or-skip-quote 10 | autopair-skip-close-maybe 11 | backward-sexp 12 | c-electric-brace 13 | c-electric-colon 14 | c-electric-delete-forward 15 | c-electric-lt-gt 16 | c-electric-paren 17 | c-electric-pound 18 | c-electric-semi&comma 19 | c-electric-slash 20 | c-electric-star 21 | c-indent-line-or-region 22 | comint-delchar-or-maybe-eof 23 | delete-indentation 24 | delete-pair 25 | dired-toggle-read-only 26 | eval-last-sexp 27 | fill-paragraph 28 | forward-sexp 29 | go-mode-insert-and-indent 30 | haskell-indentation-delete-backward-char 31 | haskell-indentation-delete-char 32 | indent-for-tab-command 33 | kill-region 34 | kill-sexp 35 | mark-sexp 36 | next-error 37 | nxml-electric-slash 38 | org-delete-char 39 | org-end-of-line 40 | org-force-self-insert 41 | org-kill-line 42 | org-self-insert-command 43 | paredit-backward 44 | paredit-backward-kill-word 45 | paredit-doublequote 46 | paredit-forward 47 | paredit-forward-delete 48 | paredit-forward-kill-word 49 | paredit-kill 50 | paredit-open-round 51 | query-replace 52 | sgml-slash 53 | sp--self-insert-command 54 | wdired-finish-edit 55 | yas-expand 56 | )) 57 | 58 | (setq mc/cmds-to-run-once 59 | '( 60 | )) 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Manu Goyal 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: Manu's Emacs Configuration 2 | #+AUTHOR: Manu Goyal 3 | #+EMAIL: manu.goyal2013@gmail.com 4 | #+OPTIONS: num:nil ^:nil 5 | 6 | This file includes custom settings for various Emacs features and makes use of 7 | numerous third-party packages to add functionality to Emacs. Although this file 8 | contains most of the important customization, there is some initial set-up in 9 | [[file:init.el][init.el]], and some additional package-specific variable settings in [[file:custom.el][custom.el]]. 10 | 11 | * General 12 | Here we have general editing and system settings. 13 | ** Bind Key 14 | We use the bind-key package, which provides useful functions for 15 | creating personal keybindings 16 | #+begin_src emacs-lisp 17 | (use-package bind-key 18 | :ensure t) 19 | #+end_src 20 | ** VC 21 | Disable version control when we're in TRAMP 22 | #+begin_src emacs-lisp 23 | (setq vc-ignore-dir-regexp 24 | (format "\\(%s\\)\\|\\(%s\\)" 25 | vc-ignore-dir-regexp 26 | tramp-file-name-regexp)) 27 | 28 | #+end_src 29 | ** Mac OSX Key Bindings 30 | We set the command key to meta and the alt key to super 31 | #+begin_src emacs-lisp 32 | (setq ns-alternate-modifier 'super) 33 | (setq ns-command-modifier 'meta) 34 | #+end_src 35 | ** TRAMP 36 | TRAMP settings 37 | #+begin_src emacs-lisp 38 | ;; There are a lot of settings we want to enable only if we are or are not 39 | ;; visiting a TRAMP file, so we provide a helper method to check if we're in a 40 | ;; tramp file. 41 | (defun is-current-file-tramp () 42 | (tramp-tramp-file-p (buffer-file-name (current-buffer)))) 43 | 44 | (add-hook 45 | 'find-file-hook 46 | (lambda () (if (is-current-file-tramp) (setq-local make-backup-files nil)))) 47 | #+end_src 48 | ** File Backups 49 | We store backups in a temporary folder. 50 | #+begin_src emacs-lisp 51 | ;; Backup file settings 52 | (setq 53 | backup-by-copying t ; don't clobber symlinks 54 | delete-old-versions t 55 | kept-new-versions 6 56 | kept-old-versions 2 57 | version-control t) ; use versioned backups 58 | ;; Save by default in ~/.saves folder 59 | (push (cons "." "~/.saves") backup-directory-alist) 60 | #+end_src 61 | ** File Position Persistence 62 | We save the cursor position at visited files in between sessions, except if 63 | we're in a TRAMP buffer. 64 | #+begin_src emacs-lisp 65 | (use-package saveplace 66 | :ensure t 67 | :init 68 | (progn 69 | (setq-default save-place t) 70 | (setq save-place-file "~/.emacs.d/.saved-places") 71 | ) 72 | :config 73 | (setq save-place-ignore-files-regexp 74 | (format "\\(%s\\)\\|\\(%s\\)" 75 | save-place-ignore-files-regexp 76 | tramp-file-name-regexp)) 77 | ) 78 | #+end_src 79 | ** camelCase Navigation 80 | We want to navigate camelCase words as separate words. 81 | #+begin_src emacs-lisp 82 | (use-package subword 83 | :diminish subword-mode 84 | :init 85 | (global-subword-mode) 86 | ) 87 | #+end_src 88 | ** Parentheses 89 | Most of the automatic parentheses management libraries in emacs are either 90 | overkill or buggy, so we just add a bare minimum few key-bindings and 91 | settings 92 | #+begin_src emacs-lisp 93 | ;; Add a key-binding to delete matching pairs 94 | (bind-key "M-D" 'delete-pair) 95 | ;; Show matching parentheses 96 | (add-hook 'prog-mode-hook 'show-paren-mode) 97 | #+end_src 98 | ** Jumping Around Buffers 99 | We use ace-jump mode, which highlights all occurences of a 100 | character you enter in the current buffer and lets you immediately 101 | jump to the place you want. 102 | #+begin_src emacs-lisp 103 | (use-package ace-jump-mode 104 | :ensure t 105 | :demand 106 | :bind ("C-c c" . ace-jump-char-mode)) 107 | #+end_src 108 | ** Multiple Cursors 109 | We use the multiple-cursors package, which provides multiple cursors editing 110 | similar to what you would find in SublimeText. 111 | #+begin_src emacs-lisp 112 | (use-package multiple-cursors 113 | :ensure t 114 | :bind ("C-S-C C-S-C" . mc/edit-lines) 115 | ) 116 | #+end_src 117 | ** Completion in an ELISP Minibffer 118 | #+begin_src emacs-lisp 119 | (bind-key "TAB" 'completion-at-point read-expression-map) 120 | #+end_src 121 | ** Spell Checking 122 | We use flyspell. 123 | #+begin_src emacs-lisp 124 | (use-package flyspell 125 | :ensure t 126 | :defer t 127 | :init 128 | (progn 129 | (add-hook 'prog-mode-hook 'flyspell-prog-mode) 130 | (add-hook 'text-mode-hook 'flyspell-mode) 131 | ) 132 | :config 133 | ;; Sets flyspell correction to use two-finger mouse click 134 | (define-key flyspell-mouse-map [down-mouse-3] #'flyspell-correct-word) 135 | ) 136 | #+end_src 137 | ** Window and Frame Navigation 138 | We define keybindings for navigating to different windows and frames. We copy 139 | the windmove-default-keybindings and framemove-default-keybindings functions 140 | and modify them to use my-keys-minor-mode-map. 141 | #+begin_src emacs-lisp 142 | (use-package windmove 143 | :ensure t 144 | :bind (("S-" . windmove-left) 145 | ("S-" . windmove-right) 146 | ("S-" . windmove-up) 147 | ("S-" . windmove-down) 148 | ) 149 | ) 150 | 151 | (use-package framemove 152 | :ensure t 153 | :bind (("C-S-" . fm-left-frame) 154 | ("C-S-" . fm-right-frame) 155 | ("C-S-" . fm-up-frame) 156 | ("C-S-" . fm-down-frame) 157 | ) 158 | ) 159 | #+end_src 160 | ** UTF-8 Encoding 161 | We set everything to UTF-8 encoding. 162 | #+begin_src emacs-lisp 163 | (set-terminal-coding-system 'utf-8) 164 | (set-keyboard-coding-system 'utf-8) 165 | (set-selection-coding-system 'utf-8) 166 | (setq current-language-environment "UTF-8") 167 | (prefer-coding-system 'utf-8) 168 | (setenv "LC_CTYPE" "UTF-8") 169 | #+end_src 170 | ** Blinking Cursor 171 | We don't want the cursor to blink. 172 | #+begin_src emacs-lisp 173 | (blink-cursor-mode -1) 174 | #+end_src 175 | ** Column numbers 176 | We want to see the column number we're at on each line. 177 | #+begin_src emacs-lisp 178 | (setq column-number-mode t) 179 | #+end_src 180 | ** Undo/Redo 181 | By default, emacs doesn't have an actual redo function. The way you redo an 182 | edit is by undoing a previous undo. This can quickly get confusing when 183 | you're not exactly sure how much you want to undo or redo, so we use undo 184 | tree, which provides an actual redo function for emacs and maintains all edit 185 | history by keeping a tree of undos and redos. 186 | #+begin_src emacs-lisp 187 | (use-package undo-tree 188 | :ensure t 189 | :diminish undo-tree-mode 190 | :init 191 | (global-undo-tree-mode) 192 | ) 193 | #+end_src 194 | ** Turn off All Menus and Tool Bars and Whizbangs 195 | We don't need that stuff. 196 | #+begin_src emacs-lisp 197 | (setq inhibit-startup-screen t) 198 | (menu-bar-mode -1) 199 | (scroll-bar-mode -1) 200 | (tool-bar-mode -1) 201 | #+end_src 202 | ** No Tabs 203 | We disable indenting with tabs. 204 | #+begin_src emacs-lisp 205 | (setq-default indent-tabs-mode nil) 206 | #+end_src 207 | ** Navigating sentences 208 | We put one space after sentences, so we want emacs to recognize these 209 | sentences for navigation and editing. 210 | #+begin_src emacs-lisp 211 | (setq sentence-end-double-space nil) 212 | #+end_src 213 | ** Case-sensitivity in searches 214 | By default, we want case sensitivity in searches and replaces to be smart. 215 | That is, if your search doesn't use capital letters, emacs will ignore case. 216 | If it does, emacs will be case-sensitive. 217 | #+begin_src emacs-lisp 218 | (setq-default case-fold-search t) 219 | #+end_src 220 | ** Whitespace mode 221 | Turn on whitespace mode, which helps track down and clean up bad 222 | whitespace in code. Additional settings for whitespace mode can be 223 | found in custom.el. 224 | #+begin_src emacs-lisp 225 | (use-package whitespace 226 | :ensure t 227 | :diminish whitespace-mode 228 | :init 229 | (add-hook 'prog-mode-hook 'whitespace-mode) 230 | ) 231 | #+end_src 232 | ** Git 233 | We use magit 234 | #+begin_src emacs-lisp 235 | (use-package magit 236 | :ensure t 237 | :init 238 | (bind-key "C-c m" 'magit-status) 239 | ) 240 | 241 | ;; For vc-git-grep 242 | (require 'vc-git) 243 | #+end_src 244 | ** Buffer menu 245 | We use ibuffer, which is better than the default buffer menu 246 | #+begin_src emacs-lisp 247 | (bind-key "C-x C-b" 'ibuffer) 248 | #+end_src 249 | ** Wgrep 250 | Wgrep mode turns the grep buffer into an editable buffer, so you can make 251 | changes to the results of a grep query and then save them across files. 252 | #+begin_src emacs-lisp 253 | (use-package wgrep 254 | :ensure t 255 | :init 256 | (require 'wgrep) 257 | ) 258 | #+end_src 259 | ** Find file in project 260 | Create a binding for finding a file in a large project 261 | #+begin_src emacs-lisp 262 | ;; find-file-in-project-by-selected is better than plain old 263 | ;; find-file-in-project, because it lets you narrow down the list of candidates 264 | ;; with a keyword before giving you the interactive menu. This is much faster 265 | ;; than starting with the interactive menu for large projects. 266 | (use-package find-file-in-project 267 | :ensure t 268 | :init 269 | (bind-key "C-c f" 'find-file-in-project-by-selected) 270 | ) 271 | #+end_src 272 | * Languages 273 | Here we have programming-language-related settings 274 | ** Company mode 275 | Company is a generic auto-completion framework. It allows you to 276 | define backends that source completions from different sources, so 277 | you can have language-specific completions 278 | #+begin_src emacs-lisp 279 | (use-package company 280 | :ensure t 281 | :config 282 | (progn 283 | ;; Enable company mode in every programming mode 284 | (add-hook 'prog-mode-hook 'company-mode) 285 | ;; Set my own default company backends 286 | (setq-default 287 | company-backends 288 | '( 289 | company-nxml 290 | company-css 291 | company-cmake 292 | company-files 293 | company-dabbrev-code 294 | company-keywords 295 | company-dabbrev 296 | company-elisp 297 | )) 298 | ) 299 | ) 300 | #+end_src 301 | ** Real-Time Syntax Checking 302 | We use flycheck to check syntax and style in code. flycheck will 303 | run language-specific code checkers based on the file type and 304 | highlight problems. 305 | #+begin_src emacs-lisp 306 | (use-package flycheck 307 | :ensure t 308 | :init 309 | (progn 310 | ;; Enable flycheck mode as long as we're not in TRAMP 311 | (add-hook 312 | 'prog-mode-hook 313 | (lambda () (if (not (is-current-file-tramp)) (flycheck-mode 1)))) 314 | ) 315 | ) 316 | #+end_src 317 | ** C/C++ 318 | Rtags provides completion and symbol navigation for specific code-bases 319 | #+begin_src emacs-lisp 320 | ;; Use rtags for navigation 321 | (use-package rtags 322 | :ensure t 323 | :config 324 | (progn 325 | ;; Start rtags upon entering a C/C++ file 326 | (add-hook 327 | 'c-mode-common-hook 328 | (lambda () (if (not (is-current-file-tramp)) 329 | (rtags-start-process-unless-running)))) 330 | (add-hook 331 | 'c++-mode-common-hook 332 | (lambda () (if (not (is-current-file-tramp)) 333 | (rtags-start-process-unless-running)))) 334 | ;; Flycheck setup 335 | (require 'flycheck-rtags) 336 | (defun my-flycheck-rtags-setup () 337 | (flycheck-select-checker 'rtags) 338 | ;; RTags creates more accurate overlays. 339 | (setq-local flycheck-highlighting-mode nil) 340 | (setq-local flycheck-check-syntax-automatically nil)) 341 | ;; c-mode-common-hook is also called by c++-mode 342 | (add-hook 'c-mode-common-hook #'my-flycheck-rtags-setup) 343 | ;; Keybindings 344 | (rtags-enable-standard-keybindings c-mode-base-map "\C-cr") 345 | ) 346 | ) 347 | ;; Use irony for completion 348 | (use-package irony 349 | :ensure t 350 | :config 351 | (progn 352 | (add-hook 353 | 'c-mode-common-hook 354 | (lambda () (if (not (is-current-file-tramp)) (irony-mode)))) 355 | (add-hook 356 | 'c++-mode-common-hook 357 | (lambda () (if (not (is-current-file-tramp)) (irony-mode)))) 358 | (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) 359 | (use-package company-irony 360 | :ensure t 361 | :config 362 | (push 'company-irony company-backends) 363 | ) 364 | ) 365 | ) 366 | #+end_src 367 | ** Python 368 | We use elpy 369 | #+begin_src emacs-lisp 370 | (use-package elpy 371 | :ensure t 372 | :config 373 | (progn 374 | (elpy-enable) 375 | (elpy-use-ipython) 376 | ;; Fixes the weird prompt in new IPython versions 377 | (setq python-shell-interpreter "ipython" 378 | python-shell-interpreter-args "--simple-prompt -i") 379 | ) 380 | ) 381 | #+end_src 382 | ** LaTeX 383 | #+begin_src emacs-lisp 384 | ;; Auctex 385 | (use-package auctex 386 | :ensure t 387 | :mode ("\\.tex\\'" . latex-mode) 388 | :commands (latex-mode LaTeX-mode plain-tex-mode) 389 | :init 390 | (progn 391 | (add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) 392 | (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) 393 | (add-hook 'LaTeX-mode-hook #'flyspell-mode) 394 | (add-hook 'LaTeX-mode-hook #'turn-on-reftex) 395 | (setq TeX-auto-save t 396 | TeX-parse-self t 397 | TeX-save-query nil 398 | TeX-PDF-mode t) 399 | )) 400 | 401 | ;; Use company-auctex 402 | (use-package company-auctex 403 | :ensure t 404 | :config 405 | (company-auctex-init) 406 | ) 407 | #+end_src 408 | ** HTML/XML/Javascript 409 | #+begin_src emacs-lisp 410 | (use-package web-mode 411 | :ensure t 412 | :config 413 | (progn 414 | ;; Enable web mode in the following modes 415 | (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) 416 | (add-to-list 'auto-mode-alist '("\\.js?\\'" . web-mode)) 417 | (add-to-list 'auto-mode-alist '("\\.jsx?\\'" . web-mode)) 418 | ;; Set the content type to "jsx" for the following file extensions 419 | (setq web-mode-content-types-alist 420 | '(("jsx" . "\\.js[x]?\\'"))) 421 | ) 422 | ) 423 | #+end_src 424 | ** Go 425 | #+begin_src emacs-lisp 426 | (use-package go-mode 427 | :ensure t 428 | :mode "\\.go" 429 | ) 430 | 431 | (use-package company-go 432 | :ensure t 433 | :config 434 | (push 'company-go company-backends) 435 | ) 436 | #+end_src 437 | ** SQL 438 | #+begin_src emacs-lisp 439 | (use-package sql 440 | :ensure t 441 | :mode ("\\.sql" . sql-mode) 442 | ) 443 | (setq sql-mysql-login-params (quote (user server port password))) 444 | #+end_src 445 | ** OCaml 446 | #+begin_src emacs-lisp 447 | (if (file-exists-p (expand-file-name "~/.opam")) 448 | (progn 449 | ;; Setup environment variables using opam 450 | (dolist (var (car (read-from-string 451 | (shell-command-to-string "opam config env --sexp")))) 452 | (setenv (car var) (cadr var))) 453 | 454 | ;; Update the emacs path 455 | (setq exec-path (append (parse-colon-path (getenv "PATH")) 456 | (list exec-directory))) 457 | 458 | ;; Update the emacs load path 459 | (add-to-list 'load-path 460 | (expand-file-name "../../share/emacs/site-lisp" 461 | (getenv "OCAML_TOPLEVEL_PATH"))) 462 | ;; utop 463 | (use-package utop 464 | :ensure t 465 | :config 466 | (autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t) 467 | ) 468 | 469 | ;; ocp-indent 470 | (require 'ocp-indent) 471 | ;; merlin 472 | (require 'merlin) 473 | (add-hook 'tuareg-mode-hook 'merlin-mode t) 474 | (setq merlin-command 'opam) 475 | (push 'merlin-company-backend company-backends) 476 | )) 477 | 478 | #+end_src 479 | ** CSS 480 | #+begin_src emacs-lisp 481 | (use-package rainbow-mode 482 | :ensure t 483 | :init 484 | (add-hook 'css-mode-hook 'rainbow-mode) 485 | ) 486 | #+end_src 487 | ** Haskell 488 | #+begin_src emacs-lisp 489 | (use-package haskell-mode 490 | :ensure t 491 | :mode "\\.hs" 492 | :config 493 | (progn 494 | ;; Turn on haskell-mode features automatically 495 | (add-hook 'haskell-mode-hook 'haskell-indentation-mode) 496 | (add-hook 'haskell-mode-hook 'interactive-haskell-mode) 497 | (add-hook 'haskell-mode-hook 'haskell-decl-scan-mode) 498 | (add-hook 'haskell-mode-hook 'haskell-doc-mode) 499 | ) 500 | ) 501 | #+end_src 502 | ** Bison 503 | #+begin_src emacs-lisp 504 | (use-package bison-mode 505 | :ensure t 506 | :mode "\\.y" 507 | ) 508 | #+end_src 509 | ** Erlang 510 | #+begin_src emacs-lisp 511 | (use-package erlang 512 | :ensure t 513 | ) 514 | #+end_src 515 | ** YAML 516 | #+begin_src emacs-lisp 517 | (use-package yaml-mode 518 | :config 519 | (require 'yaml-mode)) 520 | #+end_src 521 | ** Perl6 522 | #+begin_src emacs-lisp 523 | (use-package perl6-mode 524 | :ensure t 525 | :defer t 526 | ) 527 | #+end_src 528 | ** Rust 529 | #+begin_src emacs-lisp 530 | (use-package rust-mode 531 | :ensure t 532 | ) 533 | 534 | (use-package cargo 535 | :ensure t 536 | :config 537 | (add-hook 'rust-mode-hook 'cargo-minor-mode) 538 | ) 539 | 540 | (use-package racer 541 | :ensure t 542 | :config 543 | (progn 544 | (add-hook 'rust-mode-hook #'racer-mode) 545 | (add-hook 'racer-mode-hook #'eldoc-mode) 546 | (add-hook 'racer-mode-hook #'company-mode) 547 | ) 548 | ) 549 | 550 | (use-package flycheck-rust 551 | :ensure t 552 | :config 553 | (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) 554 | ) 555 | #+end_src 556 | -------------------------------------------------------------------------------- /custom.el: -------------------------------------------------------------------------------- 1 | (custom-set-variables 2 | ;; custom-set-variables was added by Custom. 3 | ;; If you edit it by hand, you could mess it up, so be careful. 4 | ;; Your init file should contain only one such instance. 5 | ;; If there is more than one, they won't work right. 6 | '(TeX-view-program-list (quote (("open" "open %o")))) 7 | '(TeX-view-program-selection 8 | (quote 9 | (((output-dvi style-pstricks) 10 | "dvips and gv") 11 | (output-dvi "xdvi") 12 | (output-pdf "open") 13 | (output-html "xdg-open")))) 14 | '(ac-modes 15 | (quote 16 | (emacs-lisp-mode lisp-mode lisp-interaction-mode slime-repl-mode c-mode cc-mode c++-mode java-mode malabar-mode clojure-mode clojurescript-mode scala-mode scheme-mode ocaml-mode tuareg-mode coq-mode haskell-mode agda-mode agda2-mode perl-mode cperl-mode python-mode ruby-mode lua-mode ecmascript-mode javascript-mode js-mode js2-mode php-mode css-mode makefile-mode sh-mode fortran-mode f90-mode ada-mode xml-mode sgml-mode ts-mode sclang-mode go-mode scss-mode less-css-mode web-mode))) 17 | '(ansi-color-names-vector 18 | ["#2e3436" "#a40000" "#4e9a06" "#c4a000" "#204a87" "#5c3566" "#729fcf" "#eeeeec"]) 19 | '(ansi-term-color-vector 20 | [unspecified "#f7f7f7" "#7c7c7c" "#8e8e8e" "#a0a0a0" "#686868" "#747474" "#686868" "#464646"]) 21 | '(c-default-style 22 | (quote 23 | ((c-mode . "k&r") 24 | (c++-mode . "stroustrup") 25 | (awk-mode . "awk")))) 26 | '(company-idle-delay 0.1) 27 | '(compilation-message-face (quote default)) 28 | '(cua-global-mark-cursor-color "#2aa198") 29 | '(cua-normal-cursor-color "#657b83") 30 | '(cua-overwrite-cursor-color "#b58900") 31 | '(cua-read-only-cursor-color "#859900") 32 | '(custom-safe-themes 33 | (quote 34 | ("12670281275ea7c1b42d0a548a584e23b9c4e1d2dabb747fd5e2d692bcd0d39b" "8cf1002c7f805360115700144c0031b9cfa4d03edc6a0f38718cef7b7cabe382" "95a6ac1b01dcaed4175946b581461e16e1b909d354ada79770c0821e491067c6" "b06aaf5cefc4043ba018ca497a9414141341cb5a2152db84a9a80020d35644d1" "3dafeadb813a33031848dfebfa0928e37e7a3c18efefa10f3e9f48d1993598d3" "6a9606327ecca6e772fba6ef46137d129e6d1888dcfc65d0b9b27a7a00a4af20" "e80932ca56b0f109f8545576531d3fc79487ca35a9a9693b62bf30d6d08c9aaf" "ecbb4a94a854400f249b0966fa74ac47d63e1d6a15a85ac05a1ecc8612ddd9d9" "9dae95cdbed1505d45322ef8b5aa90ccb6cb59e0ff26fef0b8f411dfc416c552" "3b819bba57a676edf6e4881bd38c777f96d1aa3b3b5bc21d8266fa5b0d0f1ebf" "146d24de1bb61ddfa64062c29b5ff57065552a7c4019bee5d869e938782dfc2a" "405fda54905200f202dd2e6ccbf94c1b7cc1312671894bc8eca7e6ec9e8a41a2" "9bac44c2b4dfbb723906b8c491ec06801feb57aa60448d047dbfdbd1a8650897" "e53cc4144192bb4e4ed10a3fa3e7442cae4c3d231df8822f6c02f1220a0d259a" "41b6698b5f9ab241ad6c30aea8c9f53d539e23ad4e3963abff4b57c0f8bf6730" "de2c46ed1752b0d0423cde9b6401062b67a6a1300c068d5d7f67725adc6c3afb" "1affe85e8ae2667fb571fc8331e1e12840746dae5c46112d5abb0c3a973f5f5a" "60f04e478dedc16397353fb9f33f0d895ea3dab4f581307fbf0aa2f07e658a40" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default))) 35 | '(dired-dwim-target t) 36 | '(dired-omit-files "^\\.") 37 | '(dired-recursive-copies (quote always)) 38 | '(dired-recursive-deletes (quote top)) 39 | '(dired-use-ls-dired (quote unspecified)) 40 | '(eclimd-default-workspace "~/Documents/workspace") 41 | '(ediff-split-window-function (quote split-window-horizontally)) 42 | '(fci-rule-color "#49483E") 43 | '(fill-column 80) 44 | '(flycheck-checker-error-threshold 1000) 45 | '(flycheck-disabled-checkers (quote (emacs-lisp-checkdoc))) 46 | '(godoc-command "godoc") 47 | '(godoc-use-completing-read t) 48 | '(highlight-changes-colors (quote ("#FD5FF0" "#AE81FF"))) 49 | '(highlight-symbol-colors 50 | (--map 51 | (solarized-color-blend it "#fdf6e3" 0.25) 52 | (quote 53 | ("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2")))) 54 | '(highlight-symbol-foreground-color "#586e75") 55 | '(highlight-tail-colors 56 | (quote 57 | (("#49483E" . 0) 58 | ("#67930F" . 20) 59 | ("#349B8D" . 30) 60 | ("#21889B" . 50) 61 | ("#968B26" . 60) 62 | ("#A45E0A" . 70) 63 | ("#A41F99" . 85) 64 | ("#49483E" . 100)))) 65 | '(hl-bg-colors 66 | (quote 67 | ("#DEB542" "#F2804F" "#FF6E64" "#F771AC" "#9EA0E5" "#69B7F0" "#69CABF" "#B4C342"))) 68 | '(hl-fg-colors 69 | (quote 70 | ("#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3"))) 71 | '(magit-diff-use-overlays nil) 72 | '(nrepl-message-colors 73 | (quote 74 | ("#dc322f" "#cb4b16" "#b58900" "#546E00" "#B4C342" "#00629D" "#2aa198" "#d33682" "#6c71c4"))) 75 | '(package-selected-packages 76 | (quote 77 | (company-auctex 78 | (progn t elisp--witness--lisp) 79 | (progn t elisp--witness--lisp) 80 | zenburn-theme yasnippet wrap-region wgrep-ag websocket web-mode utop use-package undo-tree tuareg sql-indent sml-mode smartparens scss-mode request rainbow-mode pyvenv python-environment popup paredit multiple-cursors markdown-mode magit-tramp magit-push-remote less-css-mode json-mode js2-mode iedit highlight-indentation helm-ag haskell-mode go-mode fuzzy framemove flycheck find-file-in-project exec-path-from-shell epc dired-sort-menu dired+ company-go company-c-headers company-anaconda cider bison-mode auctex ag ace-jump-mode))) 81 | '(pos-tip-background-color "#eee8d5") 82 | '(pos-tip-foreground-color "#586e75") 83 | '(safe-local-variable-values (quote ((whitespace-line-column . 100)))) 84 | '(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#eee8d5" 0.2)) 85 | '(syslog-debug-face 86 | (quote 87 | ((t :background unspecified :foreground "#A1EFE4" :weight bold)))) 88 | '(syslog-error-face 89 | (quote 90 | ((t :background unspecified :foreground "#F92672" :weight bold)))) 91 | '(syslog-hour-face (quote ((t :background unspecified :foreground "#A6E22E")))) 92 | '(syslog-info-face 93 | (quote 94 | ((t :background unspecified :foreground "#66D9EF" :weight bold)))) 95 | '(syslog-ip-face (quote ((t :background unspecified :foreground "#E6DB74")))) 96 | '(syslog-su-face (quote ((t :background unspecified :foreground "#FD5FF0")))) 97 | '(syslog-warn-face 98 | (quote 99 | ((t :background unspecified :foreground "#FD971F" :weight bold)))) 100 | '(term-buffer-maximum-size 0) 101 | '(term-default-bg-color "#fdf6e3") 102 | '(term-default-fg-color "#657b83") 103 | '(vc-annotate-background nil) 104 | '(vc-annotate-background-mode nil) 105 | '(vc-annotate-color-map 106 | (quote 107 | ((20 . "#F92672") 108 | (40 . "#CF4F1F") 109 | (60 . "#C26C0F") 110 | (80 . "#E6DB74") 111 | (100 . "#AB8C00") 112 | (120 . "#A18F00") 113 | (140 . "#989200") 114 | (160 . "#8E9500") 115 | (180 . "#A6E22E") 116 | (200 . "#729A1E") 117 | (220 . "#609C3C") 118 | (240 . "#4E9D5B") 119 | (260 . "#3C9F79") 120 | (280 . "#A1EFE4") 121 | (300 . "#299BA6") 122 | (320 . "#2896B5") 123 | (340 . "#2790C3") 124 | (360 . "#66D9EF")))) 125 | '(vc-annotate-very-old-color nil) 126 | '(weechat-color-list 127 | (quote 128 | (unspecified "#272822" "#49483E" "#A20C41" "#F92672" "#67930F" "#A6E22E" "#968B26" "#E6DB74" "#21889B" "#66D9EF" "#A41F99" "#FD5FF0" "#349B8D" "#A1EFE4" "#F8F8F2" "#F8F8F0"))) 129 | '(whitespace-line-column nil) 130 | '(whitespace-style 131 | (quote 132 | (face trailing space-before-tab empty space-after-tab))) 133 | '(xterm-color-names 134 | ["#eee8d5" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#073642"]) 135 | '(xterm-color-names-bright 136 | ["#fdf6e3" "#cb4b16" "#93a1a1" "#839496" "#657b83" "#6c71c4" "#586e75" "#002b36"])) 137 | (custom-set-faces 138 | ;; custom-set-faces was added by Custom. 139 | ;; If you edit it by hand, you could mess it up, so be careful. 140 | ;; Your init file should contain only one such instance. 141 | ;; If there is more than one, they won't work right. 142 | ) 143 | -------------------------------------------------------------------------------- /init.el: -------------------------------------------------------------------------------- 1 | ;;; init.el --- Where all the magic begins 2 | ;; 3 | ;;; Commentary: 4 | ;; This file loads both org-mode and org-babel. It then loads the rest of our 5 | ;; Emacs initialization from Emacs Lisp embedded in literate Org-mode files. 6 | ;; 7 | ;;; Code: 8 | 9 | ;; Sets the locations of the .emacs.d directory and other variables 10 | (defconst base-dir (file-name-directory (or (buffer-file-name) load-file-name))) 11 | (defconst downloads-dir (concat base-dir "downloads/")) 12 | (defconst configuration-file (concat base-dir "README.org")) 13 | 14 | ;; Sets up package 15 | (require 'package) 16 | (setq package-archives 17 | '(("gnu" . "http://elpa.gnu.org/packages/") 18 | ("melpa" . "http://melpa.milkbox.net/packages/") 19 | ("elpy" . "https://jorgenschaefer.github.io/packages/") 20 | ) 21 | ) 22 | ;; Initialize the package system but don't load all the packages 23 | (package-initialize nil) 24 | (setq package-enable-at-startup nil) 25 | ;; Refresh the package list if it isn't there 26 | (unless package-archive-contents (package-refresh-contents)) 27 | 28 | ;; We use use-package to organize our package loading and initialization, so 29 | ;; load that here 30 | (unless (package-installed-p 'use-package) (package-install 'use-package)) 31 | (require 'use-package) 32 | 33 | ;; Loads custom.el. The custom.el file should only contain settings that are 34 | ;; long lists of things or contain data too long or unwieldy to type out 35 | ;; manually. 36 | (setq custom-file (concat base-dir "custom.el")) 37 | (load custom-file) 38 | 39 | ;; Load up Org Mode and Org Babel for elisp embedded in 40 | ;; configuration-file 41 | (require 'org-id) 42 | (require 'org-element) 43 | (require 'org) 44 | ;; Load our configuration file 45 | (org-babel-load-file configuration-file) 46 | 47 | (provide 'init) 48 | (put 'downcase-region 'disabled nil) 49 | --------------------------------------------------------------------------------