Skip to content

Instantly share code, notes, and snippets.

@jhlb
Created November 4, 2014 19:06
Show Gist options
  • Save jhlb/ae8d14d3370fbb89bf10 to your computer and use it in GitHub Desktop.
Save jhlb/ae8d14d3370fbb89bf10 to your computer and use it in GitHub Desktop.
;; get rid of menu bar, scroll, etc.
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
; Inconsolata.
; requires ~/.fonts/Inconsolata.otf
(set-default-font "-unknown-Inconsolata-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1")
(add-to-list 'default-frame-alist '(font . "-unknown-Inconsolata-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1"))
(modify-frame-parameters nil '((wait-for-wm . nil)))
; move backup dir
(setq
backup-by-copying t ; don't clobber symlinks
backup-directory-alist
'(("." . "~/.emacs.d/saves")) ; don't litter my fs tree
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
; ...
;; backwards window switching
(defun select-previous-window ()
"Switch to the previous window"
(interactive)
(select-window (previous-window)))
(global-set-key (kbd "C-x p") 'select-previous-window)
(eval-after-load "snake"
'(progn
(define-key snake-mode-map "w" 'snake-move-up)
(define-key snake-mode-map "a" 'snake-move-left)
(define-key snake-mode-map "s" 'snake-move-down)
(define-key snake-mode-map "d" 'snake-move-right)))
; Command Notes
;
; M-| -- (shell-command-on-region) -- passes the contents of the
; region to the shell command.
;
; C-u M-| -- (shell-comand-on-region) -- with numeric argument, it
; replaces the region with the result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment