Skip to content

Instantly share code, notes, and snippets.

@Crowbrammer
Created August 18, 2021 09:29
Show Gist options
  • Save Crowbrammer/1acfe7f305c5ed2b2af51dcd1b43beee to your computer and use it in GitHub Desktop.
Save Crowbrammer/1acfe7f305c5ed2b2af51dcd1b43beee to your computer and use it in GitHub Desktop.
Full outline for Brave Clojure, Chapter 2
From Clojure for the Brave and True
Chapter 2
https://www.braveclojure.com/basic-emacs/
How to wield emacs
Important part is the feedback loop, set up a REPL
Install and configure
Different install options per OS
Different exes for MacOS
`sudo apt` instructions at launchpad
Executable for Windows (DL, unzip, run bin/runemacs.exe)
Config it
Use Higginbotham's files
Delete the previous config dir and add Higginbotham's config
Start, let it DL, restart
Buffers and files
Default buffer is *scratch*, shown on the bottom left
Intro to keybinds, open a new buffer
Minibuffer on the bottom
Buffers differ from files
Navigating and opening files
Modes and packages
Emacs is a lisp interpreter
Emacs binds keybindings to functions
Emacs uses the same power of Lisp that Clojure does
Modes are sets of keybindings to functions that are available for specific files, usually disappearing when you work with other files
One major mode, multiple minor modes
Use commands or install customizations from packages manually to get new modes
Selection and editing
The point immediately precedes the rectangle; after the previous character
Efficient point movement
Selection
"Copy and paste" with killing/yanking
Views and errors
The entire emacs is in a frame
Can split the frame into multiple windows
Clojure stuff
CIDER (`cider-jack-in`)
Compile and evaluate specific forms
Compile the whole file
REPL navigation
Clojure docs
Errors: Switch to the error window and press q
Paredit
Balanced parentheses
Wrap and slurp
Barf (Put something) outside of the parantheses
Bounce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment