diff options
author | Alan Pearce | 2017-09-22 15:34:14 +0200 |
---|---|---|
committer | Alan Pearce | 2017-09-22 15:34:14 +0200 |
commit | 1f09d8508fa3847c33fb0322f777d16b9b790707 (patch) | |
tree | dba8f251dd04fc3390cf972d1d805a20a01d6b09 /emacs/.emacs.d/main.el | |
parent | b01502f03218fe3a1724448814ef5a29d9246be8 (diff) | |
download | nixfiles-1f09d8508fa3847c33fb0322f777d16b9b790707.tar.lz nixfiles-1f09d8508fa3847c33fb0322f777d16b9b790707.tar.zst nixfiles-1f09d8508fa3847c33fb0322f777d16b9b790707.zip |
Emacs: Fix headers
Diffstat (limited to 'emacs/.emacs.d/main.el')
-rw-r--r-- | emacs/.emacs.d/main.el | 298 |
1 files changed, 149 insertions, 149 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 619bff2c..d07dfe1c 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -9,8 +9,8 @@ ;;; Header: ;; This is a living document, detailing my Emacs configuration using org-mode ;;; Code: -;;;;; Basics -;;;;;; Startup +;;;; Basics +;;;;; Startup ;; Open Emacs with just a plain window. No graphics or messages, please! ;; #+BEGIN_SRC emacs-lisp (setq inhibit-startup-screen t) @@ -32,7 +32,7 @@ (setq system-type 'gnu/linux/windows)))) ;; #+END_SRC -;;;;;; Compatibility +;;;;; Compatibility ;; #+BEGIN_SRC emacs-lisp (if (version< emacs-version "25.0") @@ -40,7 +40,7 @@ `(eval-after-load ,file (lambda () ,@body)))) ;; #+END_SRC -;;;;;; Scratch buffers +;;;;; Scratch buffers ;; I usually use scratch buffers for any sort of text. If I need a ;; programming mode in one, then I’ll just call it manually. I also like ;; the buffer to be empty. @@ -49,15 +49,15 @@ initial-major-mode 'text-mode) ;; #+END_SRC -;;;;;; Personal Information +;;;;; Personal Information ;; #+BEGIN_SRC emacs-lisp (setq user-mail-address "alan@alanpearce.eu" user-full-name "Alan Pearce") ;; #+end_src -;;;;; Packaging +;;;; Packaging -;;;;;; Use-package +;;;;; Use-package ;; #+BEGIN_SRC emacs-lisp (eval-and-compile @@ -103,9 +103,9 @@ package-enable-at-startup nil) ;; #+END_SRC -;;;;;; Helpers +;;;;; Helpers -;;;;;;; Hook Helpers +;;;;;; Hook Helpers ;; An improvement over add-hook with lamda functions that allows ;; modification and removal, without the boilerplate of an extra function @@ -116,7 +116,7 @@ (use-package hook-helpers)) ;; #+END_SRC -;;;;; Customize +;;;; Customize ;; I don’t really like using customize for normal configuration. ;; Instead, I use it for things that get saved automatically. That’s why ;; I use a different file, which is ignored by the VCS. It also means @@ -128,7 +128,7 @@ (load custom-file :noerror :nomessage) ;; #+END_SRC -;;;;; Styles +;;;; Styles ;; I prefer an always-visible cursor. Feels less distracting. ;; #+BEGIN_SRC emacs-lisp @@ -158,7 +158,7 @@ (ding)))) ;; #+END_SRC -;;;;;; Colours +;;;;; Colours ;; White-theme. Sounds like a good idea. @@ -185,7 +185,7 @@ (global-hl-line-mode +1) -;;;;;; Fonts +;;;;; Fonts ;; When possible, set up fonts. I don’t have any settings here for X11, ;; because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresources/main][XResources file]]. @@ -247,7 +247,7 @@ (global-prettify-symbols-mode +1)) ;; #+END_SRC -;;;;;; Page Breaks +;;;;; Page Breaks ;; By default, Emacs displays page breaks as ^L. Lines look much nicer. ;; On Windows, Emacs incorrectly detects that U+2500 (Box Drawings Light @@ -265,7 +265,7 @@ (cons page-break-lines-char page-break-lines-char) (face-attribute 'default :family))))) ;; #+END_SRC -;;;;;; Modeline +;;;;; Modeline ;; #+BEGIN_SRC emacs-lisp (column-number-mode -1) @@ -278,7 +278,7 @@ '(dired-directory (" — " dired-directory)))) ;; #+END_SRC -;;;;;; Chrome +;;;;; Chrome ;; Sometimes I like to hide clutter. Other times, it's useful. @@ -336,7 +336,7 @@ (add-hook 'minibuffer-exit-hook #'hide-mode-line) ;; #+END_SRC -;;;;;; Highlight Changes +;;;;; Highlight Changes ;; Highlight what just changed when I undo, yank, and so on. @@ -347,7 +347,7 @@ (volatile-highlights-mode t))) ;; #+END_SRC -;;;;;; Renaming major modes +;;;;; Renaming major modes ;; Diminishing major modes does not happen in the same manner as minor ;; modes. @@ -372,7 +372,7 @@ ;; #+END_SRC -;;;;; Environment Variables +;;;; Environment Variables ;; MacOS doesn’t have a reasonable way to set environment variables and ;; read them automatically any more. So, let’s use the @@ -393,7 +393,7 @@ (exec-path-from-shell-initialize))) ;; #+END_SRC -;;;;;; NixOS sandboxes +;;;;; NixOS sandboxes ;; I'm currently exploring using nix to create sandboxes for ;; development. This package allows using tools from inside sandboxes, @@ -417,7 +417,7 @@ (executable-find cmd))))))) ;; #+END_SRC -;;;;; Keybindings +;;;; Keybindings ;; I think =set-keyboard-coding-system= stops OS X from doing something ;; annoying to add accents. The modifier setup is to match my @@ -471,7 +471,7 @@ (set-register ?z `(file . ,(expand-file-name ".config/zsh/zshrc" "~"))) ;; #+END_SRC -;;;;;; Crux +;;;;; Crux ;; I can replace most of the simple helper/wrapper functions in my ;; configuration with crux.el @@ -490,7 +490,7 @@ (defalias 'rename-current-buffer-file #'crux-rename-file-and-buffer))) ;; #+END_SRC -;;;;; Projects +;;;; Projects ;; #+BEGIN_SRC emacs-lisp (defun switch-to-dotfiles () @@ -499,7 +499,7 @@ (projectile-switch-project-by-name (car (split-string (shell-command-to-string "ghq list --full-path dotfiles"))))) ;; #+END_SRC -;;;;;; The Silver Searcher +;;;;; The Silver Searcher ;; #+BEGIN_SRC emacs-lisp (use-package ag @@ -510,7 +510,7 @@ :after ag) ;; #+END_SRC -;;;;;; Ripgrep +;;;;; Ripgrep ;; Step over Silver Search, here comes a new challenger. @@ -525,7 +525,7 @@ ("s r" . projectile-ripgrep))) ;; #+END_SRC -;;;;;; Projectile +;;;;; Projectile ;; Projectile is awesome for working in projects, especially VCS-backed ;; ones. @@ -602,7 +602,7 @@ (define-key projectile-mode-map [remap counsel-projectile-ag] #'counsel-projectile-rg))) ;; #+END_SRC -;;;;;; vc +;;;;; vc ;; This is nice for some things that magit doesn’t do, and for those rare ;; occasions that I’m working with something other than git. @@ -618,7 +618,7 @@ tramp-file-name-regexp)))) ;; #+END_SRC -;;;;;; git-gutter-fringe +;;;;; git-gutter-fringe ;; It’s nice to be able to see at a glance which lines of a file have ;; changed. This package colours the fringe. I have it set to the right @@ -646,7 +646,7 @@ (setq git-gutter-fr:side 'right-fringe))) ;; #+END_SRC -;;;;;; magit +;;;;; magit ;; Magit is my favourite way to use git. I use selective staging all the ;; time. Make sure to set it up with a nice =completing-read-function= @@ -663,7 +663,7 @@ :init (add-hook 'magit-mode-hook #'magit-load-config-extensions)) ;; #+END_SRC -;;;;;; git-messenger +;;;;; git-messenger ;; Popup the last commit that changed the line at point. @@ -674,7 +674,7 @@ (setq git-messenger:use-magit-popup t))) ;; #+END_SRC -;;;;;; git-timemachine +;;;;; git-timemachine ;; This package allow me to go through a file’s history with just a few ;; keys. It makes it very easy to figure what what exactly was in a file @@ -686,7 +686,7 @@ :commands git-timemachine) ;; #+END_SRC -;;;;;; ghq +;;;;; ghq ;; [[https://github.com/motemen/ghq][=ghq=]] clones VCS-backed projects to a common directory. It should ;; seem familiar to anyone who's used =go get= before. [[https://github.com/rcoedo/emacs-ghq][=emacs-ghq=]] is a @@ -697,9 +697,9 @@ :if (executable-find "ghq")) ;; #+END_SRC -;;;;; Files +;;;; Files -;;;;;; Auto-saving +;;;;; Auto-saving ;; Auto-save everything to a temporary directory, instead of cluttering ;; the filesystem. I don’t want emacs-specific lockfiles, either. @@ -708,7 +708,7 @@ (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)) create-lockfiles nil) ;; #+END_SRC -;;;;;; Backups +;;;;; Backups ;; I like to keep my backups out of regular folders. I tell emacs to use ;; a subfolder of its configuration directory for that. Also, use the @@ -729,7 +729,7 @@ file)))) ;; #+END_SRC -;;;;;; autorevert +;;;;; autorevert ;; #+BEGIN_SRC emacs-lisp (use-package autorevert @@ -740,7 +740,7 @@ auto-revert-use-notify (not (eq system-type 'darwin))))) ;; #+END_SRC -;;;;;; Encoding +;;;;; Encoding ;; UTF-8 is usually appropriate. Note that =prefer-coding-system= expects ;; only a coding system, not a coding system and line ending combination. @@ -750,7 +750,7 @@ (setq-default buffer-file-coding-system 'utf-8-auto-unix) ;; #+END_SRC -;;;;;; Buffer-file management +;;;;; Buffer-file management ;; Ask if I want to create a directory when it doesn’t exist. This is ;; especially nice when starting new projects. @@ -782,7 +782,7 @@ (kill-buffer buf))))) ;; #+END_SRC -;;;;;; Whitespace +;;;;; Whitespace ;; Show bad whitespace, so that I can fix it. @@ -799,7 +799,7 @@ (add-hook 'text-mode-hook #'show-trailing-whitespace-on) ;; #+END_SRC -;;;;;; shrink-whitespace +;;;;; shrink-whitespace ;; DWIM whitespace removal. So I don’t need =M-SPC=, =M-\= and =C-x o= ;; for similar things any more. @@ -809,7 +809,7 @@ :bind ("M-SPC" . shrink-whitespace)) ;; #+END_SRC -;;;;;; Tramp +;;;;; Tramp ;; Tramp is awesome. It makes SSH feel Unix-y. The proxy setup is so ;; that I can sudo on remote machines @@ -837,7 +837,7 @@ (add-to-list 'tramp-default-proxies-alist '("localhost" nil nil)))) ;; #+END_SRC -;;;;;; ediff +;;;;; ediff ;; I like a horizonal diff setup, with everything in one frame. @@ -849,7 +849,7 @@ ediff-window-setup-function 'ediff-setup-windows-plain))) ;; #+END_SRC -;;;;; Indentation +;;;; Indentation ;; Ah, a complicated topic. One day we’ll all be using elastic ;; tabstops. I’ve recently switched to using two spaces, since elastic @@ -862,7 +862,7 @@ ;; #+END_SRC -;;;;;; smart-tabs-mode +;;;;; smart-tabs-mode ;; Not related to [[smart-tab][=smart-tab=]], this mode indents with tabs and aligns ;; with spaces. Perfect! @@ -876,7 +876,7 @@ (smart-tabs-mode indent-tabs-mode)))) ;; #+END_SRC -;;;;;; editorconfig +;;;;; editorconfig ;; #+BEGIN_SRC emacs-lisp (use-package editorconfig @@ -887,7 +887,7 @@ :config (editorconfig-mode 1)) ;; #+END_SRC -;;;;;; dtrt-indent-mode +;;;;; dtrt-indent-mode ;; Sometimes people use different indentation settings. [[https://github.com/jscheid/dtrt-indent][dtrt-indent]] ;; guesses the correct settings for me. @@ -903,9 +903,9 @@ (smart-tabs-mode (or indent-tabs-mode -1))))) ;; #+END_SRC -;;;;; Security +;;;; Security -;;;;;; password-store +;;;;; password-store ;; This is a frontend to the GPG-powered =pass= program. ;; #+BEGIN_SRC emacs-lisp @@ -914,9 +914,9 @@ :config (progn (setq password-store-password-length 16))) ;; #+END_SRC -;;;;; Buffers +;;;; Buffers -;;;;;; Ibuffer +;;;;; Ibuffer ;; Ibuffer is quite nice for listing all buffers. ;; #+BEGIN_SRC emacs-lisp @@ -952,7 +952,7 @@ filename-and-process))))) ;; #+END_SRC -;;;;;; Relative Buffer names +;;;;; Relative Buffer names ;; #+BEGIN_SRC emacs-lisp (use-package relative-buffers @@ -960,7 +960,7 @@ :config (progn (global-relative-buffers-mode))) ;; #+END_SRC -;;;;;; Narrowing +;;;;; Narrowing ;; Enable it without prompting @@ -970,7 +970,7 @@ (put 'narrow-to-region 'disabled nil) ;; #+END_SRC -;;;;;; ace-window +;;;;; ace-window ;; I don’t often have many windows open at once, but when I do, ;; =ace-window= is really nice to jump around them in the same way that @@ -993,7 +993,7 @@ aw-keys '(?a ?r ?s ?t ?n ?e ?i ?o)))) ;; #+END_SRC -;;;;; Windows +;;;; Windows ;; Scrolling is tricky. I use this setup to help me keep track of the ;; point whilst I’m moving about. @@ -1010,7 +1010,7 @@ (setq ns-pop-up-frames nil)) ;; #+END_SRC -;;;;;; eyebrowse +;;;;; eyebrowse ;; Workspaces, a bit like dwm. On Windows and Linux (at least the WMs ;; I'm likely to use), super+{0-9} are taken from the OS, so use meta @@ -1047,9 +1047,9 @@ (eyebrowse-mode +1))) ;; #+END_SRC -;;;;; Sessions +;;;; Sessions -;;;;;; Desktop +;;;;; Desktop ;; Save my Emacs session and restore it on startup. ;; #+BEGIN_SRC emacs-lisp @@ -1068,7 +1068,7 @@ (desktop-save-mode 1))) ;; #+END_SRC -;;;;;; winner +;;;;; winner ;; Undo, for window-based commands. @@ -1079,7 +1079,7 @@ (winner-mode 1))) ;; #+END_SRC -;;;;;; windmove +;;;;; windmove ;; Directional window movement @@ -1090,7 +1090,7 @@ ("S-<up>" . windmove-up) ("S-<down>" . windmove-down))) ;; #+END_SRC -;;;;; Blogging +;;;; Blogging ;; I have a [[https://alanpearce.uk][blog]] that I publish with hugo. @@ -1101,7 +1101,7 @@ easy-hugo-default-ext ".md")) ;; #+END_SRC -;;;;; Completion +;;;; Completion ;; Make built-in completion a bit more intelligent, by adding substring ;; and initial-based completion and ignoring case. @@ -1112,7 +1112,7 @@ tab-always-indent 'complete) ;; #+END_SRC -;;;;;; Company +;;;;; Company ;; The main choices for automatic completion in Emacs are company and ;; auto-complete-mode. I’ve not tried auto-complete-mode as company @@ -1146,9 +1146,9 @@ :after company) ;; #+END_SRC -;;; ** Dates & Times +;;;; Dates & Times -;;;;;; Calendar +;;;;; Calendar ;; Weeks start on Monday for me and I prefer ISO-style dates. ;; #+BEGIN_SRC emacs-lisp @@ -1187,7 +1187,7 @@ With two prefix arguments, write out the day and month name." (timer-relative-time (current-time) -86400)) ;; #+END_SRC -;;;;; Directories +;;;; Directories ;; Dired works quite nicely, but not always in the way I want. I don’t ;; like having so many prompts for recursive operations. Also, when I @@ -1254,7 +1254,7 @@ With two prefix arguments, write out the day and month name." (bind-key "i" #'dired-subtree-toggle dired-mode-map)))) ;; #+END_SRC -;;;;;; Disk usage +;;;;; Disk usage ;; Combine dired and du (disk usage). @@ -1265,7 +1265,7 @@ With two prefix arguments, write out the day and month name." (setq dired-du-size-format t))) ;; #+END_SRC -;;;;;; Dired-narrow +;;;;; Dired-narrow ;; One can already use dired with wildcards to browse a filtered ;; directory listing, but it opens a new buffer. Dired-narrow is a ;; slightly nicer interface: with a currently-open dired buffer, use =/= @@ -1279,15 +1279,15 @@ With two prefix arguments, write out the day and month name." ("/" . dired-narrow)))) ;; #+END_SRC -;;;;; Documentation +;;;; Documentation -;;;;;; helpful +;;;;; helpful ;; #+BEGIN_SRC emacs-lisp (use-package helpful) ;; #+END_SRC -;;;;;; ehelp +;;;;; ehelp ;; ehelp is a less well-known package that’s part of Emacs and slightly ;; improves the normal help commands, mostly by making quitting them easier. @@ -1297,7 +1297,7 @@ With two prefix arguments, write out the day and month name." :bind-keymap ("C-h" . ehelp-map)) ;; #+END_SRC -;;;;;; discover-my-major +;;;;; discover-my-major ;; A nicer way to browse keybindings for major modes. @@ -1306,7 +1306,7 @@ With two prefix arguments, write out the day and month name." :bind ("<f1>" . discover-my-major)) ;; #+END_SRC -;;;;;; which-key +;;;;; which-key ;; Popup keybindings following a prefix automatically. @@ -1318,7 +1318,7 @@ With two prefix arguments, write out the day and month name." (which-key-setup-side-window-right-bottom))) ;; #+END_SRC -;;;;;; eldoc +;;;;; eldoc ;; Documentation in the echo-area (where the minibuffer is displayed) is ;; rather useful. @@ -1331,9 +1331,9 @@ With two prefix arguments, write out the day and month name." (setq eldoc-idle-delay 0.1) (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))) ;; #+END_SRC -;;;;; Mail +;;;; Mail -;;;;;; Basics +;;;;; Basics ;; #+BEGIN_SRC emacs-lisp (with-eval-after-load "mailcap" @@ -1348,7 +1348,7 @@ With two prefix arguments, write out the day and month name." (setq mml-secure-openpgp-encrypt-to-self t)) ;; #+END_SRC -;;;;;; mu +;;;;; mu ;; #+BEGIN_SRC emacs-lisp (when (executable-find "mu") @@ -1448,7 +1448,7 @@ With two prefix arguments, write out the day and month name." (local-set-key (kbd "<backtab>") 'shr-previous-link))))) ;; #+END_SRC -;;;;; Misc +;;;; Misc ;; #+BEGIN_SRC emacs-lisp (defvar *init-file* @@ -1500,7 +1500,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (bind-key* "C-x r M-w" #'copy-rectangle) ;; #+END_SRC -;;;;;; Auxillary Configuration +;;;;; Auxillary Configuration ;; #+BEGIN_SRC emacs-lisp (require 'pinentry) @@ -1563,7 +1563,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'first-frame-hook #'load-private-data) ;; #+END_SRC -;;;;; Minibuffer +;;;; Minibuffer ;; Sometimes I want to use the minibuffer, but I’m already inside it. ;; Fortunately, this is possible. Of course, I need to know how many @@ -1587,7 +1587,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (defalias 'exit-emacs #'save-buffers-kill-emacs)) ;; #+END_SRC -;;;;;; swiper/ivy +;;;;; swiper/ivy ;; Ivy is the new kid on the completion block. It seems to be a strong ;; replacement for helm so far. @@ -1610,7 +1610,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-to-list 'ivy-initial-inputs-alist '(counsel-M-x . "")))) ;; #+END_SRC -;;;;;; counsel +;;;;; counsel ;; #+BEGIN_SRC emacs-lisp (use-package counsel @@ -1633,7 +1633,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." ;; #+END_SRC -;;;;;; smex +;;;;; smex ;; Smex is my favourite way to use =M-x=. Counsel’s =counsel-M-x= ;; function uses it internally, so I’m keeping it around, even though I @@ -1658,7 +1658,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." "smex-items")))) ;; #+END_SRC -;;;;;; cmd-to-echo +;;;;; cmd-to-echo ;; I’ve been looking for some way to run programming projects (mostly ;; node.js) inside emacs. =cmd-to-echo= seems great for this, as new @@ -1669,7 +1669,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :commands (cmd-to-echo) :config (setq cmd-to-echo-add-output-to-process-buffers t)) ;; #+END_SRC -;;;;; Modes +;;;; Modes ;; Setup some modes for systemd files ;; #+BEGIN_SRC emacs-lisp @@ -1744,7 +1744,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-to-list 'auto-mode-alist '("\\.sls\\'" . saltstack-mode)) ;; #+END_SRC -;;;;;; ledger +;;;;; ledger ;; I use [[http://ledger-cli.org/][=ledger=]] to manage my finances. It has an Emacs mode, which ;; works really nicely. @@ -1787,7 +1787,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." ("account" "ledger -f %(ledger-file) reg %(account)"))))) ;; #+END_SRC -;;;;;; Beancount +;;;;; Beancount ;; #+BEGIN_SRC emacs-lisp (let ((beancount-dir (car (split-string (shell-command-to-string "ghq list --full-path blais/beancount"))))) @@ -1803,7 +1803,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :config (setq beancount-use-ido nil)))) ;; #+END_SRC -;;;;;; Markdown +;;;;; Markdown ;; #+BEGIN_SRC emacs-lisp (use-package markdown-mode @@ -1812,7 +1812,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'markdown-mode-hook #'turn-on-auto-fill))) ;; #+END_SRC -;;;;;; Outshine +;;;;; Outshine ;; Org-ified source code. I think this might work better than ;; lentic-mode, whilst also being more general. @@ -1829,7 +1829,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'sh-mode-hook #'outline-minor-mode))) ;; #+END_SRC -;;;;;; Org +;;;;; Org ;; Org is wünderbar. @@ -1889,7 +1889,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (bind-key "C-x C-s" #'org-edit-src-exit org-src-mode-map))) ;; #+END_SRC -;;;;;;;* org-babel +;;;;;;; org-babel ;; Org’s babel feature is really nice. I use it for this file, and I can ;; use it to communicate between programming languages. Sometime I hope @@ -1909,7 +1909,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." org-src-preserve-indentation t))) ;; #+END_SRC -;;;;;;;* org-journal +;;;;;;; org-journal ;; I can use this to keep a journal. I should use it. @@ -1935,13 +1935,13 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." ;; #+END_SRC -;;;;; Programming +;;;; Programming (define-hook-helper prog-mode () :name long-lines (setq-local truncate-lines t)) -;;;;;; flycheck +;;;;; flycheck ;; On-the-fly error checking in programming modes? Yes please. @@ -1960,7 +1960,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (setq flycheck-javascript-eslint-executable "eslint_d")))) ;; #+END_SRC -;;;;;;; flycheck-pos-tip +;;;;;; flycheck-pos-tip ;; Show flycheck errors in a little popup, so I don't lose my place @@ -1972,7 +1972,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (flycheck-pos-tip-mode 1))) ;; #+END_SRC -;;;;;;; flycheck-flow +;;;;;; flycheck-flow ;; #+BEGIN_SRC emacs-lisp (use-package flycheck-flow @@ -1982,7 +1982,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (flycheck-add-next-checker 'javascript-eslint 'javascript-flow))) ;; #+END_SRC -;;;;;; golang +;;;;; golang ;; Go has a few packages to inter-operate with other emacs packages. @@ -2009,7 +2009,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." ;; #+END_SRC -;;;;;; ggtags +;;;;; ggtags ;; A nice completion backend for programming modes. @@ -2027,7 +2027,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'c-mode-common-hook #'turn-on-ggtags-mode))) ;; #+END_SRC -;;;;;; dumb-jump +;;;;; dumb-jump ;; A "clever" way of implementing go-to-definition across languages: use ;; a project-wide text search and apply heuristics to the results to @@ -2042,7 +2042,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :config (setq dumb-jump-selector 'ivy)) ;; #+END_SRC -;;;;;; imenu-anywhere +;;;;; imenu-anywhere ;; This is like imenu, but shows functions (or similar top-level ;; entities) across buffers in the same project. Neat! @@ -2051,9 +2051,9 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (use-package imenu-anywhere :bind ("C-x C-." . ivy-imenu-anywhere)) ;; #+END_SRC -;;;;;; Lisps +;;;;; Lisps -;;;;;;; All +;;;;;; All ;; Lisp modes don’t seem to have a common ancestor. So I made a custom ;; hook which I trigger in every lispy-mode. @@ -2072,7 +2072,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (run-hooks 'lisp-mode-common-hook)) ;; #+END_SRC -;;;;;;;* Redshank +;;;;;;; Redshank ;; Lisp syntax allows for really easy refactoring. Redshank gives some ;; operations that aren’t part of paredit, like extracting variables into @@ -2085,7 +2085,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'lisp-mode-common-hook #'turn-on-redshank-mode))) ;; #+END_SRC -;;;;;;; Emacs Lisp +;;;;;; Emacs Lisp ;; Customise the modeline-display of =emacs-lisp-mode=. Then make sure ;; it runs the common lisp hooks. @@ -2115,7 +2115,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (run-hooks 'lisp-mode-common-hook)))) ;; #+END_SRC -;;;;;;; Scheme & Lisp +;;;;;; Scheme & Lisp ;; I don’t work with these as often as I would like @@ -2125,7 +2125,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." #'common-lisp-indent-function)) ;; #+END_SRC -;;;;;;;* geiser +;;;;;;; geiser ;; A REPL thing for Scheme. Hopefully I’ll get to use it more in the ;; future. @@ -2138,7 +2138,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." run-racket)) ;; #+END_SRC -;;;;;;;* slime +;;;;;;; slime ;; A REPL thing (and more) for Lisp. @@ -2155,7 +2155,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (executable-find "ccl64"))))) ;; #+END_SRC -;;;;;;; Clojure +;;;;;; Clojure ;; #+BEGIN_SRC emacs-lisp (use-package clojure-mode @@ -2174,7 +2174,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (clj-refactor-mode 1)))) ;; #+END_SRC -;;;;;;;* cider +;;;;;;; cider ;; A REPL thing for Clojure @@ -2187,7 +2187,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'cider-mode-hook #'eldoc-mode))) ;; #+END_SRC -;;;;;; Auto-compile +;;;;; Auto-compile ;; Auto-compile emacs lisp when saving. ;; #+BEGIN_SRC emacs-lisp @@ -2196,7 +2196,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :init (add-hook 'emacs-lisp-mode-hook #'auto-compile-on-save-mode)) ;; #+END_SRC -;;;;;; cc-mode +;;;;; cc-mode ;; Although I don’t use C or C++, setting up the mode is helpful because ;; quite a few other modes are derived from it. @@ -2212,7 +2212,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (c-set-offset 'case-label '+))) ;; #+END_SRC -;;;;;; quickrun +;;;;; quickrun ;; It’s nice to be able to quickly evaluate some code. Although I don’t ;; really seem to use it. @@ -2221,7 +2221,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :bind (("C-c C-e" . quickrun))) ;; #+END_SRC -;;;;;; Scala +;;;;; Scala ;; Let’s try using Scala. @@ -2235,9 +2235,9 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (use-package ensime) ;; #+END_SRC -;;;;;; Web development +;;;;; Web development -;;;;;;; js2-mode +;;;;;; js2-mode ;; This mode is really great for editing Javascript. It turns code into ;; an AST internally, so it can work with it almost like a lisp. @@ -2263,7 +2263,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." js2-strict-missing-semi-warning nil))) ;; #+END_SRC -;;;;;;;* rjsx-mode +;;;;;;; rjsx-mode ;; A set of advice for js2-jsx-mode to work better with React. @@ -2274,7 +2274,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :mode (("\\.jsx\\'" . rjsx-mode))) ;; #+END_SRC -;;;;;;;* js2-refactor +;;;;;;; js2-refactor ;; Thanks to the AST provided by js2-mode, refactoring is possible. This ;; library implements some refactorings. @@ -2289,7 +2289,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (js2r-add-keybindings-with-prefix "C-c C-m"))) ;; #+END_SRC -;;;;;;;* add-node-modules-path +;;;;;;; add-node-modules-path ;; Inside a javascript project, it's common to install tools locally to ;; the project. This will allows emacs to find their executables. @@ -2305,7 +2305,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (setq flycheck-javascript-standard-executable "standard"))))) ;; #+END_SRC -;;;;;;;* Flow +;;;;;;; Flow ;; #+BEGIN_SRC emacs-lisp (use-package flow-minor-mode @@ -2314,7 +2314,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'js2-mode-hook #'flow-minor-enable-automatically))) ;; #+END_SRC -;;;;;;;* Indium +;;;;;;; Indium ;; Javascript with an inferior node.js process and a debugger? Awesome. @@ -2339,7 +2339,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'js2-mode-hook #'indium-interaction-mode))) ;; #+END_SRC -;;;;;;; tern +;;;;;; tern ;; Tern understands javascript. It adds really clever documented ;; completions, besides other IDE-like things. @@ -2360,7 +2360,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (use-package company-tern)) ;; #+END_SRC -;;;;;;; json-mode +;;;;;; json-mode ;; #+BEGIN_SRC emacs-lisp (use-package json-mode @@ -2370,7 +2370,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." ("\\.tern-project\\'" . json-mode))) ;; #+END_SRC -;;;;;;; restclient +;;;;;; restclient ;; Restclient is really nice. It’s like a scratchpad for HTTP api ;; calls. Feels a bit like using =org-babel=. I wonder if there’s an @@ -2391,7 +2391,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :init (add-to-list 'company-backends #'company-restclient t)) ;; #+END_SRC -;;;;;;; sgml-mode +;;;;;; sgml-mode ;; This is for HTML, since old versions of HTML were derived from SGML. ;; #+BEGIN_SRC emacs-lisp @@ -2400,7 +2400,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." :config (setq sgml-basic-offset 2)) ;; #+END_SRC -;;;;;;; emmet-mode +;;;;;; emmet-mode ;; Emmet is really nice to write HTML quickly. Especially with ;; frameworks that require multiple nested elements to do anything useful. @@ -2416,7 +2416,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'css-mode-hook #'emmet-mode))) ;; #+END_SRC -;;;;;;; web-mode +;;;;;; web-mode ;; This mode handles just about every templating language out ther, which ;; is really nice, because it handles the HTML part the same way in all @@ -2441,7 +2441,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (sp-local-pair '(web-mode) "<%" "%>"))) ;; #+END_SRC -;;;;;; Live coding +;;;;; Live coding ;; Sometimes I might want to show off my emacs usage. @@ -2459,7 +2459,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (global-command-log-mode -1)) ;; #+END_SRC -;;;;;;; command-log-mode +;;;;;; command-log-mode ;; #+BEGIN_SRC emacs-lisp (use-package command-log-mode @@ -2470,7 +2470,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." command-log-mode-is-global t))) ;; #+END_SRC -;;;;; Spelling +;;;; Spelling ;; #+BEGIN_SRC emacs-lisp (use-package ispell @@ -2534,7 +2534,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'prog-mode-hook #'flyspell-prog-mode))) ;; #+END_SRC -;;;;;; Style checking +;;;;; Style checking ;; [[https://github.com/ValeLint/vale][Vale]] is a linter, but for prose. Neat idea! Salesman is a bad term. @@ -2547,7 +2547,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (flycheck-vale-setup))) ;; #+END_SRC -;;;;; Scripting +;;;; Scripting ;; Make a shell-script buffer executable after saving it, if it has a shebang. @@ -2568,7 +2568,7 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer." (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) ;; #+END_SRC -;;;;;; eshell +;;;;; eshell ;; I should try to get into the habit of using this more. It’s really ;; nice, when I remember to use it. @@ -2611,7 +2611,7 @@ Pass optional ARG to `eshell' (which see)." ;; #+END_SRC -;;;;;;; Shells +;;;;;; Shells ;; #+BEGIN_SRC emacs-lisp (use-package shell @@ -2634,7 +2634,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (comint-delchar-or-maybe-eof arg))) ;; #+END_SRC -;;;;; Text editing +;;;; Text editing ;; Emacs has an editor within. @@ -2646,7 +2646,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (setq-default truncate-lines nil) ;; #+END_SRC -;;;;;; align +;;;;; align ;; =Align= is a useful command to line things up, once given some rules. ;; The most important one for me is JSON property alignment. @@ -2662,7 +2662,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (modes . '(js2-mode)))))) ;; #+END_SRC -;;;;;; Clipboard +;;;;; Clipboard ;; I like to use the clipboard more than the primary selection in X11. @@ -2675,7 +2675,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))) ;; #+END_SRC -;;;;;; Selection +;;;;; Selection ;; I’m quite used to deleting text by selecting it and typing. Emacs has ;; a mode for that. @@ -2712,7 +2712,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." :config (setq expand-region-fast-keys-enabled nil)) ;; #+END_SRC -;;;;;; avy +;;;;; avy ;; Avy is a really nice way to move around files, like ace-jump-mode, but ;; somehow I prefer it. @@ -2731,7 +2731,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." avy-keys '(?a ?r ?s ?t ?d ?h ?n ?e ?i ?\;)))) ;; #+END_SRC -;;;;;;; ace-link +;;;;;; ace-link ;; Visit any link. Despite the name, this works with avy. @@ -2742,7 +2742,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (ace-link-setup-default))) ;; #+END_SRC -;;;;;; goto-chg +;;;;; goto-chg ;; This is like popping the mark, only it filters to only change areas ;; and doesn’t go back to the same place more than once. @@ -2752,7 +2752,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." :bind ("C-c C-SPC" . goto-last-change)) ;; #+END_SRC -;;;;;; beginend +;;;;; beginend ;; In special buffers, I would rather have =M->= and =M-<= goto the ;; logical beginning/end rather than the physical ones. @@ -2766,7 +2766,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." beginend-modes))) ;; #+END_SRC -;;;;;; fontawesome +;;;;; fontawesome ;; Sometimes I might want to add a font-awesome icon to some text. ;; This package gives me two interfaces to find the icons @@ -2775,7 +2775,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (use-package fontawesome) ;; #+END_SRC -;;;;;; multiple-cursors +;;;;; multiple-cursors ;; I mentioned before that I’d used Sublime Text before. Multiple ;; cursors was one of my favourite features, so I was really happy when I @@ -2791,7 +2791,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." ("C-S-L" . mc/edit-lines))) ;; #+END_SRC -;;;;;; paredit +;;;;; paredit ;; Balanced parentheses in lisps are nice, but all the refactoring and ;; movement commands are much more interesting. @@ -2806,7 +2806,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode))) ;; #+END_SRC -;;;;;; smartparens +;;;;; smartparens ;; I like to use smartparens where paredit isn’t already useful. Somehow ;; I didn’t find smartparens’ implementation of paredit style to be as @@ -2841,7 +2841,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." ;; #+END_SRC -;;;;;; move-text +;;;;; move-text ;; Transposing lines, made easier. @@ -2850,7 +2850,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." :config (move-text-default-bindings)) ;; #+END_SRC -;;;;;; undo-tree +;;;;; undo-tree ;; Emacs’ default handling of undo is a bit confusing. Undo-tree makes ;; it much clearer. It’s especially helpful for protoyping and refactoring. @@ -2873,14 +2873,14 @@ Pass ARG to `comint-delchar-or-maybe-eof'." :diminish undo-tree-mode) ;; #+END_SRC -;;;;;; replace +;;;;; replace ;; #+BEGIN_SRC emacs-lisp (with-eval-after-load "replace.el" (setq case-replace nil)) ;; #+END_SRC -;;;;;; visual-regexp +;;;;; visual-regexp ;; I don’t always remember exactly how Emacs’ regular expressions work, ;; so this package is pretty useful because it highlights everything in @@ -2893,7 +2893,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." ("C-c m" . vr/mc-mark))) ;; #+END_SRC -;;;;; End +;;;; End ;; Start a server if possible. A daemon is already a server. ;; #+BEGIN_SRC emacs-lisp |