Skip to content

Latest commit

 

History

History
242 lines (204 loc) · 7.48 KB

README.org

File metadata and controls

242 lines (204 loc) · 7.48 KB

.emacs.d

Table of Contents

Submodules

Remember to also clone submodules:

git clone --recursive [email protected]:bryangarza/dot-emacs.git

Paredit

Org mode

Org-present

  • left and right for movement
  • C-c C-= for large text
  • C-c C-- for small text
  • C-c C-q to quit (which will return you back to vanilla org-mode)
  • C-c < to jump to first slide
  • C-c > to jump to last slide

Hydras

  • C-c m Hydra for all hydras
  • C-c w Window movement and manipulation
  • C-c c Multiple cursors
  • C-c o Org mode headings
  • C-c a Avy

Zooming

  • C-x C-+ and C-x C-- (‘text-scale-adjust’) to increase or decrease the buffer text size
  • C-+ or C-- to repeat
  • C-x C-0 to restore the default (global) face height
  • S-mouse-1 pops up a menu where you can choose these same actions

Eyebrowse

The default key bindings are:

Key bindFunction
C-c C-w <Switch to previous window config
C-c C-w >Switch to next window config
C-c C-w ’Switch to last window config
C-c C-w ”Close current window config
C-c C-w ,Rename current window config
C-c C-w 0Switch to window config 0
C-c C-w 9Switch to window config 9

I also bound all the s-<n> keys to switch to that window config. Which you can do with another eyebrowse function but that one also sets some other keys I don’t want to override, so I just did it manually.

Don’t feel like putting this in a table.... From (eyebrowse-setup-evil-keys)

(define-key evil-motion-state-map (kbd "gt") 'eyebrowse-next-window-config)
(define-key evil-motion-state-map (kbd "gT") 'eyebrowse-prev-window-config)
(define-key evil-motion-state-map (kbd "gc") 'eyebrowse-close-window-config)
(define-key evil-motion-state-map (kbd "zx") 'eyebrowse-last-window-config))

Steps to Install Coq and Proof General

brew install coq

…and set coq mode for coq files, done in config already. company-coq auto installs with use-package. Download the devel version of Proof General. Unpack the .tgz file. Recompile for current Emacs:

make clean; make compile EMACS=/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15/Emacs.app/Contents/MacOS/Emacs

Make sure the right file path for the downloaded version of Proof General is in the config. (proof-site.el)

Unbinding

This will make the symbol my-nasty-variable’s value void:

(makunbound 'my-nasty-variable)

This will make the symbol my-nasty-function’s function definition void:

(fmakunbound 'my-nasty-function)

Pinning

If I ever want to pin packages:

(setq 'package-archives '(("melpa"        . "http://melpa.org/packages/")
                          ("melpa-stable" . "http://stable.melpa.org/packages/")))

(use-package company
  :ensure t
  :pin melpa-stable)

Helm

Aligning Code

Haskell wiki: aligning code in Emacs

(bind-key "C-x a r" 'align-regexp)

Editing with Sudo

C-x C-f /sudo::/path/to/file

Keybindings

Most of the keybindings I have set can be found in (bryan/keybindings). The majority involve the Super key, which on Mac is the Command key. On Windows or GNU/Linux, this is probably your Win key, but if it’s not bound, then just bind it!

Updating submodules

git submodule foreach git pull origin master

Finding face under point

what-cursor-position with a prefix argument shows the face under point, among other information.

Keyboard shortcut is C-u C-x =.

Ad-handle-definition warnings

To suppress things like

ad-handle-definition: `org-latex-keyword' got redefined

Do:

(setq ad-redefinition-action 'accept)

I didn’t though, because they are harmless, and I’d rather know when something is being advice’d.

OCaml

OCaml settings require external installation, see Real World OCaml’s GitHub wiki. If you don’t care about OCaml, simply comment out bryan/ocaml in bryan/pkg-full.

Graphical vs Console Emacs

Use Graphical Emacs.

Languages

All these are set up:

  • C
  • Common Lisp
  • CSS
  • Clojure
  • Elisp
  • Elm
  • Erlang
  • HTML
  • Haskell
  • Hy
  • Jade
  • JavaScript
  • LaTeX
  • Markdown
  • OCaml
  • Racket
  • Rust
  • Scala
  • Scheme
  • SQL
  • Stylus

Input Methods

22.4 Selecting an Input Method

C-x RET C-\ method RET
(set-input-method)
C-\
(toggle-input-method)
C-h I method RET
(describe-input-method)
C-h C-\ method RET
also (describe-input-method)
M-x list-input-methods
Display a list of all the supported input methods.

License

Copyright (C) 2014-2016 Bryan Garza

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Internal Notes

Because I keep forgetting the Org mode formatting:

You can make words *bold*, /italic/, _underlined_, =verbatim= and ~code~, and,
if you must, ‘+strike-through+’. Text in the code and verbatim string is not
processed for Org mode specific syntax, it is exported verbatim.

Batch resizing images on the command line:

sips -Z 640 *.jpg