At the end of the day GNU Emacs is more fun than it is frustrating β¨ππ«
Table of Contents
This Emacs configuration, on top of being a documented configuration for my future self, aims to inspire you through some amazing features delivered by Emacs.
This .emacs.d is made possible thanks to a lot of wise people (see a few in the Source section).
Please feel free to look up certain tricks and functions and add it to your configuration.
A rule that I apply to avoid Emacs bankruptcy : only adopt Emacs Lisp code you need and understand.
If you have to ask what jazz is,
youβll never know.
Louis Armstrong
Some highlight in favor of Emacs :
- free as in "free speech" AND free as in "free beer"
- it is extensible, a lot
- a community of amazing and active people (so it's constantly evolving)
- programmatically interacting with text using Emacs Lisp and macros
- eventually works directly in the terminal
- full keyboard experience (but you can use your mouse if you want)
Emacs is what you want it be. Emacs is power.
But with great power, comes great responsibility :
the responsibility to think.
Bozhidar Batsov
Editing is a rewording activity.
Alan Perlis
| state | activation | action |
|---|---|---|
| β | auto | typed text replaces the selection if the selection is active |
| β | auto | always replace tabs with spaces and set tab width to 4 spaces for all buffers |
| β | auto | cursor scroll smoothly |
| β | auto | mousewheel scroll one line at a time (less "jumpy" than defaults) |
| β | auto | past things without indentation mess |
| β | M-1 or 2 or 3 ... |
window numbering to navigate between buffers easily |
| β | auto | zoom current window size |
| β | auto | visually highlight the selected buffer using dimmer |
| β | auto | disable backups auto-saves |
| β | auto | change yes-or-no questions into y-or-n questions |
| β | auto | After you split a window, your cursor goes on the new one |
| β | C-c s |
swiper instead of the default search |
| β | C-x b |
ibuffer instead of the default switch-to-buffer |
| β | M-s |
move around quickly with avy |
| β | auto | treats camelCase strings as several words |
| β | auto | typing "()", "[]", "{}" by pair |
| β | auto | briefly highlighted your cursor when changing buffer with beacon |
| β | auto | colors parentheses and other delimiters depending on their depth with rainbow-delimiters |
| β | auto | highlights matching parens when the cursor is just behind one of them |
| β | M-x treemacs |
pop a tree layout file explorer treemacs |
| β | C-q |
Expand region selection |
| β | M-y |
popup kill ring |
| β | C-x f |
use ido and ido vertical mode to find file instead of default file navigation |
| β | C-x u |
undo tree |
| β | M-x |
smex |
| β | C-c/C-v/C-z |
cua mode (it made me crazy to have several copy/past behavior) |
| β | C-c C-a |
in csv-mode, align data by column (M-x csv-align-fields) |
| β | C-c p |
projectile |
| β | C-s, C-r |
ctrlf |
| β | Tab |
yasnippet with custom snippets and yasnipet-snipet |
| β | auto | company mode, text completion framework |
Perfection is achieved, not when there is nothing more to add,
but when there is nothing left to take away.
Antoine de Saint-Exupery
A minimalist look :
| state | activation | action |
|---|---|---|
| β | auto | start full screen |
| β | auto | bar cursor instead of block cursor |
| β | auto | remove menu |
| β | auto | remove tool bar |
| β | auto | remove scroll bar |
| β | auto | replace scroll bar by yascroll (text scroll bar) |
| β | auto | no line number |
| β | auto | hide the startup message |
| β | auto | set a homepage dashboard displaying recent used files |
| β | auto | cursor line position |
| β | auto | horizon theme (or sexy-monochrome or brutalist via M-x load-theme RET sexy-monochrome) |
| β | C-x w |
distraction-free writing mode with writeroom |
| β | auto | Hack font |
Science is organized knowledge.
Wisdom is organized life.
Kant
Have a look at this detailed page for more info.
For now, I use those three :
Python is the "most powerful language you can still read".
Paul Dubois
| state | activation | action |
|---|---|---|
| β | auto | elpy |
| β | auto | use flycheck instead of flymake |
| β | M-x ein:login |
emacs ipython notebook : ein and how to use it |
| β | auto | smartparens |
If it is not documented,
it doesn't exist.
Louis Fried
| activation | action |
|---|---|
M-x gh-markdown-preview |
live preview and github look (from this blog) |
C-c C-l |
insert link |
C-c C-i |
insert image |
M-x markdown-toc-generate-or-refresh-toc |
insert or refresh table of content at cursor |
Git a life.
Anonymous
It's Magit !
| action | kbd |
|---|---|
| open magit | C-x g |
| stack | s |
| unstack | u |
| commit | c + c + commit message + C-c C-c |
| push | P + p |
| show git diff in margin | diff-hl |
-
on your computer settings : change the CapsLk key by ctrl. You're welcome.
-
before saving, look whatΕ different from last save :
M-x diff-buffer-with-file -
align comment or anything using a separator :
M-x diff-buffer-with-file -
preview markdown file :
M-x markdown-live-preview-mode -
to make
.emacspoint on the.emacs.d/init.elconfig file, add the following in your.emacsfile :(setq user-emacs-directory (file-truename "~/.emacs.d/")) (setq user-init-file "~/.emacs.d/init.el") (load user-init-file) -
macro :
action kbd start macro C-x (end macro C-x )play macro C-x eincremental number M-x kmacro-insert-countername last macro M-x name-last-kbd-macrocall named macro M-x insert-kbd-macro
- .emacs.d by Damien Garaud
- .emacs.d by Dawid Eckert
- .emacs.d by Purcell
- .emacs.d by Bozhidar Batsov
- .emacs.d by RememberYou
- mastering emacs in one year
- learn elisp in 15 minutes
GPL-3.0 License, I choose you !