Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

52 lines (38 sloc) 1.49 KB
(require 'package)
(add-to-list 'package-archives '("melpa" . ""))
;; Prevent tabs and use 4 space tab stop
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq-default indent-line-function 'insert-tab)
;; Put backup files in one place
(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
;; Put auto-save files in one place
(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/autosaves/" t)))
;; Allow y/n answers instead of yes/no
(defalias 'yes-or-no-p 'y-or-n-p)
;; Disable beeping
(setq-default visible-bell t)
;; Enable syntax highlighting
(global-font-lock-mode t)
(setq-default font-lock-maximum-decoration t)
;; Disable auto indenting
(electric-indent-mode 0)
;; Show line numbers and column numbers by default
;; Bind M-# to toggle line number mode on/off
(setq-default column-number-mode t)
(global-set-key (kbd "M-#") 'display-line-numbers-mode)
;; Show trailing whitespace
(require 'whitespace)
(setq-default whitespace-style '(face trailing tabs))
(custom-set-faces '(whitespace-tab ((t (:background "red")))))
;; Smooth scrolling rather than jumping by half a screenful
(setq-default scroll-step 1)
;; Show the clock
(display-time-mode 1)
;; Set modes based on filename or file extension
(add-to-list 'auto-mode-alist '("(GNUmakefile|makefile|Makefile)" . makefile-mode))
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
You can’t perform that action at this time.