diff options
| author | jason | 2017-06-22 17:16:39 -0600 |
|---|---|---|
| committer | jason | 2017-06-22 17:16:39 -0600 |
| commit | d29176719bfa50a30c7d374f03fc3041d75ab436 (patch) | |
| tree | 4f2bfba08c2ac970a2393158386e3b4940481886 | |
| parent | f7490d4bd130a8519b06af89f75020296c188a35 (diff) | |
| download | dotemacs-d29176719bfa50a30c7d374f03fc3041d75ab436.tar.gz dotemacs-d29176719bfa50a30c7d374f03fc3041d75ab436.zip | |
Cleaned up config.org
| -rw-r--r-- | config.org | 99 |
1 files changed, 52 insertions, 47 deletions
| @@ -1,5 +1,9 @@ | |||
| 1 | #+TITLE: Emacs Configuration | ||
| 2 | #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="file:///home/jason/.emacs.d/contrib/org-export.css" /> | ||
| 3 | #+OPTIONS: html-style:nil | ||
| 4 | |||
| 1 | * Startup | 5 | * Startup |
| 2 | *** Defaults | 6 | ** Defaults |
| 3 | #+BEGIN_SRC emacs-lisp | 7 | #+BEGIN_SRC emacs-lisp |
| 4 | (setq | 8 | (setq |
| 5 | ;; Hide the default startup screen | 9 | ;; Hide the default startup screen |
| @@ -48,7 +52,7 @@ Use UTF-8 as the default encoding | |||
| 48 | (set-default-coding-systems 'utf-8) | 52 | (set-default-coding-systems 'utf-8) |
| 49 | #+END_SRC | 53 | #+END_SRC |
| 50 | 54 | ||
| 51 | I primarily use OS's that favor unix line endings, but occasionally I use | 55 | I primarily use OSes that favor unix line endings, but occasionally I use |
| 52 | Windows. This forces the buffers to be utf-8 with unix line endings by default. | 56 | Windows. This forces the buffers to be utf-8 with unix line endings by default. |
| 53 | 57 | ||
| 54 | #+BEGIN_SRC emacs-lisp | 58 | #+BEGIN_SRC emacs-lisp |
| @@ -73,7 +77,7 @@ filetype that should include trailing whitespace I will whitelist it. | |||
| 73 | (delete-trailing-whitespace))) | 77 | (delete-trailing-whitespace))) |
| 74 | #+END_SRC | 78 | #+END_SRC |
| 75 | 79 | ||
| 76 | *** Look and Feel | 80 | ** Look and Feel |
| 77 | #+BEGIN_SRC emacs-lisp | 81 | #+BEGIN_SRC emacs-lisp |
| 78 | ;; Hide the toolbar | 82 | ;; Hide the toolbar |
| 79 | (tool-bar-mode -1) | 83 | (tool-bar-mode -1) |
| @@ -101,7 +105,7 @@ mode ruins your current window layout. | |||
| 101 | #+BEGIN_SRC emacs-lisp | 105 | #+BEGIN_SRC emacs-lisp |
| 102 | (winner-mode 1) | 106 | (winner-mode 1) |
| 103 | #+END_SRC | 107 | #+END_SRC |
| 104 | *** Local Elisp Code | 108 | ** Local Elisp Code |
| 105 | Add directories where I store elisp code to the load path | 109 | Add directories where I store elisp code to the load path |
| 106 | 110 | ||
| 107 | #+BEGIN_SRC emacs-lisp | 111 | #+BEGIN_SRC emacs-lisp |
| @@ -118,7 +122,7 @@ Usernames and passwords are stored in a non-published file | |||
| 118 | #+BEGIN_SRC emacs-lisp | 122 | #+BEGIN_SRC emacs-lisp |
| 119 | (load "~/.emacs.d/secrets" t) | 123 | (load "~/.emacs.d/secrets" t) |
| 120 | #+END_SRC | 124 | #+END_SRC |
| 121 | *** Keybindings | 125 | ** Keybindings |
| 122 | By default Emacs binds ~C-x k~ to ~kill-buffer~ which asks for the buffer you | 126 | By default Emacs binds ~C-x k~ to ~kill-buffer~ which asks for the buffer you |
| 123 | want to close. 99.9% of the time I want to kill the buffer that is active so | 127 | want to close. 99.9% of the time I want to kill the buffer that is active so |
| 124 | make that the default behavior | 128 | make that the default behavior |
| @@ -130,7 +134,7 @@ make that the default behavior | |||
| 130 | ~ibuffer~ is a better buffer list utility so redefine the default buffer list | 134 | ~ibuffer~ is a better buffer list utility so redefine the default buffer list |
| 131 | to it. | 135 | to it. |
| 132 | 136 | ||
| 133 | #+BEGIN_SRC | 137 | #+BEGIN_SRC emacs-lisp |
| 134 | ;; Use ibuffer for the buffer list | 138 | ;; Use ibuffer for the buffer list |
| 135 | (global-set-key (kbd "C-x C-b") 'ibuffer) | 139 | (global-set-key (kbd "C-x C-b") 'ibuffer) |
| 136 | #+END_SRC | 140 | #+END_SRC |
| @@ -140,15 +144,15 @@ Define the package repositories | |||
| 140 | #+BEGIN_SRC emacs-lisp | 144 | #+BEGIN_SRC emacs-lisp |
| 141 | (setq package-archives '( | 145 | (setq package-archives '( |
| 142 | ("elpa" . "http://elpa.gnu.org/packages/") | 146 | ("elpa" . "http://elpa.gnu.org/packages/") |
| 143 | ;; For org-mode | 147 | |
| 144 | ("org" . "http://orgmode.org/elpa/") | 148 | ("org" . "http://orgmode.org/elpa/") |
| 145 | ;; melpa builds git repositories and can be unstable | 149 | ;; melpa builds git repositories and can be unstable |
| 146 | ("melpa" . "http://melpa.org/packages/") | 150 | ("melpa" . "http://melpa.org/packages/") |
| 147 | ;; marmalade has version uploaded by the maintainers | 151 | ;; marmalade has version uploaded by the maintainers |
| 148 | ;; ("marmalade" . "https://marmalade-repo.org/packages/") | 152 | ;; ("marmalade" . "https://marmalade-repo.org/packages/") |
| 149 | ;; melpa-stable builds from git tags but may be missing dependencies | 153 | ;; melpa-stable builds from git tags but may be missing dependencies |
| 150 | ;; ("melpa-stable" . "https://stable.melpa.org/packages/") | 154 | ;; ("melpa-stable" . "https://stable.melpa.org/packages/") |
| 151 | )) | 155 | )) |
| 152 | (package-initialize) | 156 | (package-initialize) |
| 153 | #+END_SRC | 157 | #+END_SRC |
| 154 | 158 | ||
| @@ -212,40 +216,9 @@ Use [[https://magit.vc/][magit]] to supplement emacs built in version control sy | |||
| 212 | ("C-c v B" . magit-blame) | 216 | ("C-c v B" . magit-blame) |
| 213 | ("C-c v L" . magit-log-buffer-file))) | 217 | ("C-c v L" . magit-log-buffer-file))) |
| 214 | #+END_SRC | 218 | #+END_SRC |
| 215 | * Packages | ||
| 216 | ** org-mode | ||
| 217 | **** Setup | ||
| 218 | Start org-indent-mode. This displays a single indented star instead of many | ||
| 219 | stars in org-mode headings. | ||
| 220 | 219 | ||
| 221 | #+BEGIN_SRC emacs-lisp | ||
| 222 | (setq org-startup-indented t | ||
| 223 | org-src-fontify-natively t) | ||
| 224 | #+END_SRC | ||
| 225 | **** Key Bindings | ||
| 226 | Define the keybindings for org-mode related things | ||
| 227 | |||
| 228 | | Key | Function | Description | | ||
| 229 | |-----+------------+-----------------------------| | ||
| 230 | | F12 | org-agenda | Display the org-agenda menu | | ||
| 231 | | | | | | ||
| 232 | 220 | ||
| 233 | #+BEGIN_SRC emacs-lisp | 221 | * Packages |
| 234 | (global-set-key (kbd "<f12>") 'org-agenda) | ||
| 235 | #+END_SRC | ||
| 236 | **** Agenda | ||
| 237 | Rather than using ~C-[~ and ~C-]~ for adding files to the agenda manually this | ||
| 238 | defines directories that include all org files in the agenda. | ||
| 239 | #+BEGIN_SRC emacs-lisp | ||
| 240 | (setq org-agenda-files '("~/org/")) | ||
| 241 | #+END_SRC | ||
| 242 | **** HTMLize | ||
| 243 | Styles source code blocks when exporting an org file to HTML | ||
| 244 | |||
| 245 | #+BEGIN_SRC emacs-lisp | ||
| 246 | (use-package htmlize | ||
| 247 | :ensure t) | ||
| 248 | #+END_SRC | ||
| 249 | ** Paradox | 222 | ** Paradox |
| 250 | [[https://github.com/Malabarba/paradox/][Paradox]] is a better emacs package manager. | 223 | [[https://github.com/Malabarba/paradox/][Paradox]] is a better emacs package manager. |
| 251 | 224 | ||
| @@ -392,3 +365,35 @@ Installation: | |||
| 392 | (cargo-minor-mode))) | 365 | (cargo-minor-mode))) |
| 393 | (add-hook 'racer-mode-hook #'company-mode) | 366 | (add-hook 'racer-mode-hook #'company-mode) |
| 394 | #+END_SRC | 367 | #+END_SRC |
| 368 | * org-mode | ||
| 369 | ** Setup | ||
| 370 | Start org-indent-mode. This displays a single indented star instead of many | ||
| 371 | stars in org-mode headings. | ||
| 372 | |||
| 373 | #+BEGIN_SRC emacs-lisp | ||
| 374 | (setq org-startup-indented t | ||
| 375 | org-src-fontify-natively t) | ||
| 376 | #+END_SRC | ||
| 377 | ** Key Bindings | ||
| 378 | Define the keybindings for org-mode related things | ||
| 379 | |||
| 380 | | Key | Function | Description | | ||
| 381 | |-----+------------+-----------------------------| | ||
| 382 | | F12 | org-agenda | Display the org-agenda menu | | ||
| 383 | |||
| 384 | #+BEGIN_SRC emacs-lisp | ||
| 385 | (global-set-key (kbd "<f12>") 'org-agenda) | ||
| 386 | #+END_SRC | ||
| 387 | ** Agenda | ||
| 388 | Rather than using ~C-[~ and ~C-]~ for adding files to the agenda manually this | ||
| 389 | defines directories that include all org files in the agenda. | ||
| 390 | #+BEGIN_SRC emacs-lisp | ||
| 391 | (setq org-agenda-files '("~/org/")) | ||
| 392 | #+END_SRC | ||
| 393 | ** HTMLize | ||
| 394 | Styles source code blocks when exporting an org file to HTML | ||
| 395 | |||
| 396 | #+BEGIN_SRC emacs-lisp | ||
| 397 | (use-package htmlize | ||
| 398 | :ensure t) | ||
| 399 | #+END_SRC | ||