Created
October 1, 2016 17:05
-
-
Save Mischi/46a6048c91ddbdf218d900b7ed6609e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'package) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) | |
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) | |
(setq package-enable-at-startup nil) | |
(package-initialize) | |
(defun ensure-package-installed (&rest packages) | |
"Assure every package is installed, ask for installation if it's not. | |
Return a list of installed packages or nil for every skipped package." | |
(mapcar | |
(lambda (package) | |
(if (package-installed-p package) | |
nil | |
(if (y-or-n-p (format "Package %s is missing. Install it? " package)) | |
(package-install package) | |
package))) | |
packages)) | |
;; Make sure to have downloaded archive description. | |
(or (file-exists-p package-user-dir) | |
(package-refresh-content)) | |
;; Activate installed packages. | |
(package-initialize) | |
;; Make sure packages are installed. | |
(ensure-package-installed | |
'magit | |
'evil | |
'evil-magit | |
'projectile | |
'helm | |
'helm-projectile | |
'atom-one-dark-theme) | |
;; Disable backups | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
;; Load colorscheme | |
(load-theme 'atom-one-dark t) | |
;; Load and configure magit | |
(require 'magit) | |
(global-set-key (kbd "C-c g") 'magit-status) | |
;; Load and configure evil | |
(require 'evil) | |
(evil-mode t) | |
(define-key evil-normal-state-map (kbd "C-u") 'evil-scroll-up) | |
;; Load anf configure evil-magit | |
(require 'evil-magit) | |
;; Load and configure helm | |
(require 'helm-config) | |
(helm-mode 1) | |
;; Load and configure helm-projectile | |
(require 'helm-projectile) | |
(helm-projectile-on) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment