Skip to content

Instantly share code, notes, and snippets.

@BDFife BDFife/.emacs
Last active Oct 12, 2015

Embed
What would you like to do?
BDFife Emacs Config
; disable beeps
(setq visible-bell t)
; better switch buffer mode. just type and go
; (crtl-r moves through the buffers)
(iswitchb-mode 1)
; highlight matching parens
(show-paren-mode t)
; highlight regions
(setq transient-mark-mode t)
; disable scrollbars
(when (fboundp 'toggle-scroll-bar)
(toggle-scroll-bar -1))
; indicate end of buffer
; not using at the moment - I found this unnecessary
;(set-default 'indicate-empty-lines t)
; Temporary files cluttering up your workind directory are annoying.
; Create a directory in your home directory, and save to there instead!
(defvar user-temporary-file-directory
"~/.emacs-autosaves/")
(make-directory user-temporary-file-directory t)
(setq backup-by-copying t)
(setq backup-directory-alist
`(("." . ,user-temporary-file-directory)
(tramp-file-name-regexp nil)))
(setq auto-save-list-file-prefix
(concat user-temporary-file-directory ".auto-saves-"))
(setq auto-save-file-name-transforms
`((".*" ,user-temporary-file-directory t)))
; coerce all 'backup' files to a single folder
;(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
; decorate text if possible.
(cond ((fboundp 'global-font-lock-mode)
;; Turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; Maximum colors
(setq font-lock-maximum-decoration t)))
; disable tabs... and then
(setq-default indent-tabs-mode nil)
; force tabs to be 4 spaces.
(setq default-tab-width 4)
; set the default mode as text
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
; disable the blinking cursor
(blink-cursor-mode 0)
; disable the icon bar on 'windows' systems
; this doesn't always work w/emacs through
; the console - if so, disable the line below.
(if (not (null window-system))
(tool-bar-mode 0))
; other disable options -- just for reference
;(menu-bar-mode 0)
;(scroll-bar-mode 0)
; avoid the opening 'splash screen'
(setq inhibit-splash-screen t)
; show column as well as lines
(column-number-mode t)
; show time
(display-time)
; remap C-x + C-g to goto-line
(global-set-key "\C-x\C-g" 'goto-line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.