Skip to content

Instantly share code, notes, and snippets.

@ionrock
Created October 21, 2013 22:11
Show Gist options
  • Save ionrock/7091839 to your computer and use it in GitHub Desktop.
Save ionrock/7091839 to your computer and use it in GitHub Desktop.
An example from my init.org
* My Emacs Customizations
** The Vendor Directory
I keep all my non-packages in =.emacs.d/vendor=.
#+begin_src emacs-lisp
(add-to-list 'load-path "~/.emacs.d/vendor")
#+end_src
** Packages
We load melpa and marmelade packages here. They are
configured/required later.
#+begin_src emacs-lisp
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
#+end_src
Here we actually add all our packages.
#+begin_src emacs-lisp
;; Add in your own as you wish:
(defvar my-packages '(color-theme
color-theme-solarized
color-theme-wombat
color-theme-ir-black
undo-tree
php-mode
yasnippet
js2-mode
dizzee
go-mode
xml-rpc
yaml-mode
pyregexp
virtualenv
flymake-cursor
magit
exec-path-from-shell
s
dash
monky
ido-ubiquitous
expand-region
helm
smex)
"A list of packages to ensure are installed at launch.")
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
#+end_src
Finally, we'll require and configure the simple ones.
#+begin_src emacs-lisp
;; python regex for search and replace
;; (require 'pyregexp)
;; magit
(require 'magit)
(global-set-key (kbd "C-c s") 'magit-status)
;; s string lib
(require 's)
#+end_src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment