All Projects → hrs → Sensible Defaults.el

hrs / Sensible Defaults.el

Licence: gpl-3.0
A simple, modular collection of better Emacs default settings.

Projects that are alternatives of or similar to Sensible Defaults.el

Dotfiles
Ninrod's sharpened dotfiles for emacs, vim, zsh, tmux. Since '15.
Stars: ✭ 208 (+156.79%)
Mutual labels:  dotfiles, emacs
Awesome Dotfiles
Dotfiles for awesome people using the awesomewm linux environment
Stars: ✭ 409 (+404.94%)
Mutual labels:  dotfiles, emacs
Emacs.d
My Emacs configuration, literately 😄
Stars: ✭ 254 (+213.58%)
Mutual labels:  dotfiles, emacs
.emacs.d
My emacs configuration
Stars: ✭ 76 (-6.17%)
Mutual labels:  dotfiles, emacs
.dot Org Files
Dotfiles, Emacs + Org-mode with babel and Literate programming.
Stars: ✭ 57 (-29.63%)
Mutual labels:  dotfiles, emacs
Emacs Bootstrap
Your on-the-fly Emacs development environment.
Stars: ✭ 147 (+81.48%)
Mutual labels:  dotfiles, emacs
Rogue
Personal Emacs config
Stars: ✭ 286 (+253.09%)
Mutual labels:  dotfiles, emacs
Dotfiles
👾 ~/
Stars: ✭ 91 (+12.35%)
Mutual labels:  dotfiles, emacs
Cfgs
My personal configs
Stars: ✭ 14 (-82.72%)
Mutual labels:  dotfiles, emacs
Dotfiles
🐲 My Arch Linux config [i3-gaps + i3blocks + Zsh + Spacemacs + Rofi + Alacritty + Neofetch]
Stars: ✭ 725 (+795.06%)
Mutual labels:  dotfiles, emacs
Dots
💾 — Dumb & Opinionated Configurations
Stars: ✭ 144 (+77.78%)
Mutual labels:  dotfiles, emacs
Dotfiles
well-tailored NixOS & nix-darwin dotfiles
Stars: ✭ 63 (-22.22%)
Mutual labels:  dotfiles, emacs
Dotfiles
Configuration files for XMonad, Emacs, NixOS, Taffybar and more.
Stars: ✭ 127 (+56.79%)
Mutual labels:  dotfiles, emacs
Dotfiles
Jichao Ouyang's awesome dotfiles
Stars: ✭ 182 (+124.69%)
Mutual labels:  dotfiles, emacs
Dotfiles
If there is a shell, there is a way!
Stars: ✭ 112 (+38.27%)
Mutual labels:  dotfiles, emacs
Dotfiles
●📄 Ryan McGeary's configuration shiznit that makes him productive
Stars: ✭ 278 (+243.21%)
Mutual labels:  dotfiles, emacs
Dotfiles
Let's be honest: mostly Emacs.
Stars: ✭ 536 (+561.73%)
Mutual labels:  dotfiles, emacs
Dotfiles
🏠
Stars: ✭ 60 (-25.93%)
Mutual labels:  dotfiles, emacs
Dotfiles
💻 Dotfiles for zsh, vim, emacs, tmux, and bash. Tested on mac os.
Stars: ✭ 70 (-13.58%)
Mutual labels:  dotfiles, emacs
Prompt So Fancy
Fancy terminal
Stars: ✭ 79 (-2.47%)
Mutual labels:  dotfiles

Sensible default settings for Emacs

Emacs is a terrific editor, but its out-of-the-box experience isn't great. Some of its default settings feel a bit clunky. sensible-defaults.el aspires to help new users configure some of those settings in a simple and modular way (i.e., it's just a file of functions you can call).

The sensible-defaults.el file contains a number of function definitions, any of which can be called from your ~/.emacs or ~/.emacs.d/init.el file.

sensible-defaults.el includes settings for:

  • Ensuring that files end with newlines,
  • Always enabling syntax highlighting,
  • Increasing the garbage collection threshold,
  • Defaulting line-length to 80 characters,
  • Creating parent directories after saving a deeply nested file,
  • Making dired file sizes human-readable,
  • AND MORE!

For good or ill, sensible-defaults doesn't deal with any external packages. It only tweaks settings built into the editor itself. If you wanna configure packages, you're on your own.

Getting started

Emacs reads its initial configuration from either ~/.emacs.d/init.el or ~/.emacs. We suggest using a .emacs.d directory so you can keep your configuration code in more than one file.

Copy sensible-defaults.el into your .emacs.d. You can also store it in a separate directory, if you'd like, or symlink it into your .emacs.d directory. Symlinking is nice, since you can clone this repo somewhere and pull down new changes as they come in!

Load it from your init.el with (load-file "~/.emacs.d/sensible-defaults.el") (or some other path, if you put it somewhere else). This evaluates the file. That shouldn't do anything interesting on its own, though, since the file only defines functions.

Browse through sensible-defaults.el and decide which settings you'd like to enable. Call those functions in your init.el. That's it!

An Example

Suppose you want to use every setting and every keybinding suggested by sensible-defaults. Your init.el should contain the following code:

(load-file "~/.emacs.d/sensible-defaults.el")
(sensible-defaults/use-all-settings)
(sensible-defaults/use-all-keybindings)

A More Selective Example

Maybe you just want to increase the garbage collection threshold, show matching parentheses, and bind the Home and End keys correctly. Kind of a weird set of choices, but whatevs, it's easy:

(load-file "~/.emacs.d/sensible-defaults.el")
(sensible-defaults/increase-gc-threshold)
(sensible-defaults/show-matching-parens)
(sensible-defaults/bind-home-and-end-keys)

That's it!

Non-Default Settings

The sensible-defaults/backup-to-temp-directory setting isn't enabled by default (i.e., it isn't included in sensible-defaults/use-all-settings), since it could lead to unexpected data loss in some cases.

If you're the sort of person who doesn't rely much on backups and saves reflexively, though, this might be a perfectly fine choice for you.

If you choose to enable it, just call it like any of the other functions:

(sensible-defaults/backup-to-temp-directory)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].