Utilizes jwiegley’s use-package macro to cleanly and quickly require, install via `package.el`, and setup various extensions. Enables lots of lovely minor modes, and conditionally loads operating and local system specific code.
- Magit is a Git Porcelain
- Evil for Vim emulation
- Projectile to manage and interact with projects
- use-package organizes
init.el
and manages packages - Company is the best auto-completion framework
- Flycheck provides on-the-fly syntax and compilation checking
- Ledger because double-entry bookkeeping is all the rage
- Undo Tree records edits as a traversable graph
- Whitespace Butler unobtrusively cleans up whitespace
- YASnippet is a great template system
Enables when the argument is nil or positive and disables when zero or negative.
Recording because C-x C-@
is horrible.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Narrowing.html#Narrowing
- use
eval-expression
- Fill-Prefix with point after prefix
- Unicode: <U200B> /xe2/x80/x8b ZERO WIDTH SPACE
- Insert using: (C-x 8 RET 200b RET)
From StackOverflow:
- M-x find-name-dired: you will be prompted for a root directory and a filename pattern.
- Press t to “toggle mark” for all files found.
- Press Q for “Query-Replace in Files…”: you will be prompted for query/substitution regexps.
- Proceed as with query-replace-regexp: SPACE to replace and move to next match, n to skip a match, etc.
- Press Y to finish replacing in all buffers.
- C-x C-s ! to save all buffers.
- use regex groups like “ab\(c\)” where the parentheses are escaped because Emacs
- refer to prior capture groups by \N where N is 1-indexed on the captured groups (e.g. back reference)
- see Wiki; the comma indicates elisp code to evaluate
- e.g. [0-9]+ -> \,(+ 257 \#)
- or by 8 starting at 10 \,(+ 10 (* 8 \#))
;; captures all non-terminals in Bison grammar
(save-excursion
(while (re-search-forward "^\\([a-z_]+\\):" nil t)
(princ (format "%s " (match-string 1)) (get-buffer-create "matches"))))
- Use
C-c C-i
and choose the “string” syntax - Copy the regexp without the surrounding quotes
- Use
C-c C-q
to close regexp-builder
- switch
- p
- commander
- m
- command
- !
- async
- &
- make
- c
- make test
- P
- make tags
- R
- replace
- r
- dired
- D
- vcs
- v
- ag
- ss
- tag
- j
- buffers
- b
- kill
- k
- recent
- e
- alternate
- a
- test files
- T
- toggle test
- t
- Needs terminfo
- Remove TERM from shell’s rc file
tic -o ~/.terminfo
/usr/local/Cellar/emacs/HEAD/share/emacs/24.4.50/etc/e/eterm-color.ti
- newline
- C-j
- (add-to-list ‘somelist `(symbol . ,(expression to be evaluated)))
- The backquote is like a normal quote except it evaluates elements marked with commas. RTFM
Use M-x view-lossage
to see the most recent 300 keystrokes, per
Emacs Redux
https://ebzzry.github.io/emacs-pairs.html
See INSTALL.REPO
git clone --depth 1 -b emacs-24 git://git.sv.gnu.org/emacs.git
Can use build-dep emacs
to get dependencies.
make distclean
sudo pacman -S texinfo libxft
# with GTK
sudo pacman -S gtk2 xorg-fonts-100dpi
GTK+ and FreeType are needed to for the X11 build with proper font rendering. See other notes for X11 and Xft setup.
yum install gtk2-devel freetype gnutls-devel
Still needs GTK and FreeType.
sudo apt-get install texi2html texinfo
- Install MinGW and MSYS (see Getting Started)
- Run
C:\MinGW\msys\1.0\postinstall\pi.bat
to setupfstab
- Add shortcut to
C:\MinGW\msys\1.0\msys.bat
Otherwise autoreconf
will fail cryptically.
dos2unix.exe configure.ac
./autogen.sh
This runs the usual autoreconf -i -I m4
./configure --without-all --with-x-toolkit=no --with-xft --with-makeinfo
./configure --without-all --with-x-toolkit=no --with-ns --with-toolkit-scroll-bars --with-makeinfo
./configure --without-all --with-xft --with-makeinfo
- XFT is the X11 font system, and is required.
- Sub-pixel rendering
./configure --without-all --with-xft --with-makeinfo
Toolkit scroll-bars are required on Windows but excluded by
--without-all
, so explicitly include them.
./configure --without-all --with-w32 --with-toolkit-scroll-bars
--with-sound --with-gnutls --with-zlib --without-compress-install --with-libotf
make bootstrap
make info doc
sudo make install install-info install-doc
Copy nextstep/Emacs.app
to desired location
rm -rf ~/.emacs.d/elpa