Skip to content

Instantly share code, notes, and snippets.

@gregoryg
Created September 14, 2014 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregoryg/ebe7c325dbef366f2ff6 to your computer and use it in GitHub Desktop.
Save gregoryg/ebe7c325dbef366f2ff6 to your computer and use it in GitHub Desktop.
(setq confirm-kill-emacs 'y-or-n-p) ;; confirm to exit emacs
;; dippy bird FTW
(fset 'yes-or-no-p 'y-or-n-p)
(temp-buffer-resize-mode 1) ;; crazy cool
;; very important: keep a long list of yow lines
(setq yow-file "~/emacs/yow.lines")
;; almost as important: keep track of those tetris scores
(setq tetris-score-file "~/.emacs.d/tetris.score")
(global-set-key [home] (lambda () (interactive) (goto-char (point-min))))
(global-set-key [end] (quote end-of-buffer))
(global-unset-key (kbd "C-z"))
(global-set-key (kbd "C-z") 'undo)
(setq fill-column 90); default for wider screens
;; ensure that the default for searches is case-insensitive
(setq case-fold-search t)
;; highlight/colorize everything that can be colorized!
(global-font-lock-mode 1)
;; When I want transient mark mode, I'll beat it out of you
(setq transient-mark-mode nil)
;; display time and battery status in the mode line
(display-time-mode 1)
;; unbelievably weird thing I have to do to get the right time in emacs on my Windows laptop
(when (eq (window-system) 'w32)
(progn
(set-time-zone-rule "MDT+6")
(display-time)))
(display-battery-mode 0)
;; turn off that stupid toolbar
(tool-bar-mode -1)
;; scroll bars?
(scroll-bar-mode -1)
;; don't do that stoopid splash screen
(setq inhibit-splash-screen t)
;; never split windows horizontally by default
(setq split-width-threshold nil)
;; Here's a choice one: stay in the same column while scrolling!
(setq scroll-preserve-screen-position t)
;; in Emacs23+, make line-move move by a line, ignoring wrapping
(setq line-move-visual nil)
;
;; enable hugely useful things that are disabled by default
(put 'narrow-to-region 'disabled nil)
(put 'set-goal-column 'disabled nil)
;; echo quickly
(setq echo-keystrokes 0.1)
;; show column number in modeline
(column-number-mode t)
;; show them parens
(show-paren-mode 1)
(ansi-color-for-comint-mode-on)
;; keep the screen from jumping wildly as I cursor down/up
(setq scroll-conservatively 5)
;; remember minibuffer history between sessions
(savehist-mode t)
(setq frame-title-format (concat "emacs@" (system-name) " - %f; %b"))
;; if point is at end of line, keep it there for vertical movement
(setq track-eol t)
;; Dynamic abbrevs should expand both words and symbols
(setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_")
;; and now set up hippie-expand
(global-set-key (kbd "M-/") 'hippie-expand)
(global-set-key (kbd "C-x C-b") (lambda () (interactive) (ibuffer)))
(setq ibuffer-expert t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment