Skip to content

Instantly share code, notes, and snippets.

@benj02
Last active August 29, 2015 14:22
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 benj02/bbdf7dab59e2cdeecad5 to your computer and use it in GitHub Desktop.
Save benj02/bbdf7dab59e2cdeecad5 to your computer and use it in GitHub Desktop.
emacs init.el
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages"))
(add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/"))
(defvar my-packages '(better-defaults smex yasnippet ido-ubiquitous php-mode))
(package-initialize)
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
;; Add vendor stuff here
;; Get smex set up
(require 'smex)
(smex-initialize)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commmands)
;; Ido
(require 'ido-ubiquitous)
(ido-mode 1)
(ido-everywhere 1)
(ido-ubiquitous 1)
;; Get yas set up
(require 'yasnippet)
(setq yas-snippet-dirs '("~/.emacs.d/snippets" "~/.emacs.d/my-snippets"))
(yas-global-mode 1)
;; Some more stuff
(setq inhibit-startup-message t
color-theme-is-global t
uniqify-buffer-name-style 'forward
default-tab-width 4)
;; Move windows with S-<arrow key>
(windmove-default-keybindings)
;; Smaller font
(set-face-attribute 'default nil :height 100)
;; Set window size
(add-to-list 'default-frame-alist '(height . 40))
(add-to-list 'default-frame-alist '(width . 150))
(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.
'(ansi-color-names-vector ["#2e3436" "#a40000" "#4e9a06" "#c4a000" "#204a87" "#5c3566" "#729fcf" "#eeeeec"])
'(custom-enabled-themes (quote (tango)))
'(custom-safe-themes (quote ("9a9e75c15d4017c81a2fe7f83af304ff52acfadd7dde3cb57595919ef2e8d736" default))))
(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.
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment