public
Created

An example from my init.org

  • Download Gist
gistfile1.el
Emacs Lisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
* 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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.