8000 .emacs.d/README.md at master · tlentali/.emacs.d · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
225 lines (174 loc) · 19.5 KB

README.md

File metadata and controls

225 lines (174 loc) · 19.5 KB

At the end of the day GNU Emacs is more fun than it is frustrating ✨🐂💫


Table of Contents

🚀 Get inspired

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.

🧠 Why Emacs ?

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)

🔥 Features

Emacs is what you want it be. Emacs is power.
But with great power, comes great responsibility :
the responsibility to think.
Bozhidar Batsov

⚡ Global editor behavior

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

✨ Appearance

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

📑 Org mode

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

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

🖊️ Markdown

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

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

🙌 Life changing tricks

  • 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 .emacs point on the .emacs.d/init.el config file, add the following in your .emacs file :

    (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 e
    incremental number M-x kmacro-insert-counter
    name last macro M-x name-last-kbd-macro
    call named macro M-x insert-kbd-macro

🛈 Source

📜 License

GPL-3.0 License, I choose you !

0