Skip to content

tlentali/.emacs.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 !

About

πŸ¦„πŸ’» Personal GNU/Emacs config

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published