Skip to content

Instantly share code, notes, and snippets.

@b-adkins
Created November 1, 2021 21:13
Show Gist options
  • Save b-adkins/6826e8c65c25763567be5156149202d9 to your computer and use it in GitHub Desktop.
Save b-adkins/6826e8c65c25763567be5156149202d9 to your computer and use it in GitHub Desktop.
Emacs config
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; No tabs!
(setq-default indent-tabs-mode nil)
;; Indent of 2
(setq-default tab-width 2)
(setq c-default-style "bsd")
(setq c-basic-indent 2)
(setq c-basic-offset 2)
(setq js-indent-level 2)
(setq sh-indentation 2)
;; From GNU style, so it lines up
(setq c-brace-offset 0)
;; Tricks from http://ergoemacs.org/emacs/emacs_tabs_space_indentation_setup.html
;; make tab key always call a indent command.
(setq-default tab-always-indent t)
;; make tab key call indent command or insert tab character, depending on cursor position
(setq-default tab-always-indent nil)
;; make tab key do indent first then completion.
(setq-default tab-always-indent 'complete)
;; Start in column-number-mode
;; https://www.emacswiki.org/emacs/LineNumbers
(when (version<= "26.0.50" emacs-version )
(global-display-line-numbers-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment