Skip to content

Instantly share code, notes, and snippets.

@danielsource
Last active March 12, 2026 15:07
Show Gist options
  • Select an option

  • Save danielsource/193ac284c53587137d4bffd0dbc41e3e to your computer and use it in GitHub Desktop.

Select an option

Save danielsource/193ac284c53587137d4bffd0dbc41e3e to your computer and use it in GitHub Desktop.
Basic GNU Emacs config
;;
;; ~/.emacs.d/init.el
;;
;; Show quick help: C-h C-q
;; Basic appearance
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(blink-cursor-mode -1)
;; Indentation
(setq-default indent-tabs-mode nil
tab-always-indent 'complete
c-default-style "k&r"
c-basic-offset 4
sh-basic-offset 4
sgml-basic-offset 2)
;; General
(setenv "PAGER" "")
(setq inhibit-startup-screen t
initial-scratch-message nil
frame-resize-pixelwise t
disabled-command-function nil
use-short-answers t
compilation-ask-about-save nil
compilation-scroll-output t
dired-listing-switches "-al --group-directories-first"
custom-file "~/.emacs.d/custom.el"
auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list/" t))
backup-directory-alist '(("." . "~/.emacs.d/backup/"))
backup-by-copying t
delete-old-versions -1
version-control t)
(delete-selection-mode 1)
(column-number-mode 1)
(winner-mode 1)
(windmove-default-keybindings 'meta)
(windmove-swap-states-default-keybindings 'control)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(load custom-file t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment