2017-05-15 01:35:31 +02:00
|
|
|
(package-initialize)
|
2017-05-15 14:25:35 +02:00
|
|
|
(defun ensure-packages-installed (packages)
|
|
|
|
"Ensure packages are installed"
|
|
|
|
(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))
|
|
|
|
|
2017-05-15 01:35:31 +02:00
|
|
|
|
|
|
|
(require 'package)
|
|
|
|
|
|
|
|
(push '("marmalade" . "http://marmalade-repo.org/packages/") package-archives)
|
|
|
|
(push '("melpa" . "http://melpa.milkbox.net/packages/") package-archives)
|
|
|
|
|
|
|
|
(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-faces-vector
|
|
|
|
[default default default italic underline success warning error])
|
|
|
|
'(blink-cursor-mode nil)
|
|
|
|
'(custom-enabled-themes (quote (wombat)))
|
|
|
|
'(global-evil-surround-mode t)
|
|
|
|
'(inhibit-startup-screen t)
|
|
|
|
'(menu-bar-mode nil)
|
|
|
|
'(package-selected-packages
|
|
|
|
(quote
|
|
|
|
(evil-surround org evil-magit magit makefile-runner evil)))
|
|
|
|
'(scroll-bar-mode nil)
|
|
|
|
'(tool-bar-mode nil))
|
|
|
|
(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.
|
|
|
|
'(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 113 :width normal :foundry "PfEd" :family "Inconsolata")))))
|
|
|
|
|
2017-05-15 14:25:35 +02:00
|
|
|
;; ensure repo cache is up1date
|
|
|
|
(or (file-exists-p package-user-dir)
|
|
|
|
(package-refresh-contents))
|
|
|
|
|
|
|
|
(ensure-packages-installed '(org evil evil-surround magit evil-magit))
|
|
|
|
|
2017-05-15 01:35:31 +02:00
|
|
|
(require 'evil)
|
|
|
|
(evil-mode t)
|
2017-05-15 14:25:35 +02:00
|
|
|
|
|
|
|
;; Window movement
|
|
|
|
(global-set-key (kbd "C-x <up>") 'windmove-up)
|
|
|
|
(global-set-key (kbd "C-x <down>") 'windmove-down)
|
|
|
|
(global-set-key (kbd "C-x <left>") 'windmove-left)
|
|
|
|
(global-set-key (kbd "C-x <right>") 'windmove-right)
|
|
|
|
|
|
|
|
;; Window cycling
|
|
|
|
(defun cycle-window ()
|
|
|
|
"cycles windows"
|
|
|
|
(interactive)
|
|
|
|
(select-window (next-window)))
|
|
|
|
|
|
|
|
(global-set-key (kbd "<C-tab>") 'cycle-window)
|
|
|
|
|
|
|
|
;; Overlay windows
|
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'("*Apropos*" display-buffer-same-window))
|
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'("*Help*" display-buffer-same-window))
|