Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

328 lines (274 sloc) 8.663 kb
;;; init.el -- Initializes emacs by loading the org babel files
(require 'package)
(when (< emacs-major-version 24)
(add-to-list 'package-archives '("gnu" . "")))
(add-to-list 'package-archives '("marmalade" . "") t)
(add-to-list 'package-archives '("melpa" . "") t)
(add-to-list 'package-archives '("org" . "") t)
(when (not package-archive-contents)
(when (not (package-installed-p 'use-package))
(package-install 'use-package))
(require 'use-package))
(setq custom-file "~/.emacs.d/custom.el")
(unless (file-exists-p custom-file)
(write-file custom-file)))
(load custom-file)
(when window-system
(set-face-attribute 'default nil :font "fira-mono-14")
(add-to-list 'default-frame-alist `(width . 100))
(add-to-list 'default-frame-alist `(height . ,(/ (- (display-pixel-height) 50)
(use-package color-theme-sanityinc-tomorrow
:ensure t
:commands color-theme-sanityinc-tomorrow-night
(unless (member 'sanityinc-tomorrow-night custom-enabled-themes)
(require 'bind-key)
("s-[" . backward-paragraph)
("s-]" . forward-paragraph)
("C-s" . isearch-forward-regexp)
("C-r" . isearch-backward-regexp))
(set-locale-environment "utf-8")
(setenv "LANG" "en_US.UTF-8")
(setq auto-save-interval 200
backup-directory-alist '(("." . "~/.emacs.d/backups"))
default-directory "~/"
delete-by-moving-to-trash t
delete-old-versions t
indent-tabs-mode nil
inhibit-startup-screen t
kept-new-versions 6
load-prefer-newer t
message-log-max 1000
ns-pop-up-frames nil
ns-use-srgb-colorspace t
require-final-newline t
ring-bell-function 'ignore
save-interprogram-paste-before-kill t
show-paren-style 'parenthesis
tab-width 4
version-control t)
(unless (eq 'darwin system-type)
(menu-bar-mode -1))
(blink-cursor-mode -1)
(column-number-mode +1)
(scroll-bar-mode -1)
(show-paren-mode +1)
(tool-bar-mode -1)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(defalias 'yes-or-no-p 'y-or-n-p)
(when (and (eq 'darwin system-type)
(file-exists-p "/usr/local/bin/gls"))
(setq insert-directory-program "/usr/local/bin/gls"))
(defun ljos/back-to-indentation|beginning-of-line ()
"Moves the cursor back to indentation or to the beginning of
the line if it is already at the indentation. If it is at the
beginning of the line it stays there."
(when (not (bolp))
(let ((p (point)))
(when (= p (point))
(beginning-of-line 1)))))
(bind-key (kbd "C-a") 'ljos/back-to-indentation|beginning-of-line)
(use-package apropos
:defer t
(setq apropos-do-all t))
(use-package auth-source
:defer t
(add-to-list 'auth-sources 'macos-keychain-internet))
(use-package tramp
:defer t
(setq tramp-default-method "ssh"))
(use-package dired
:defer t
(setq dired-listing-switches "-alh"))
(use-package company
:ensure t
:init (global-company-mode))
(use-package exec-path-from-shell
:if (eq 'darwin system-type)
:ensure t
(exec-path-from-shell-copy-env "DOKTORGRAD"))
(use-package highlight-symbol
:ensure t
:commands highlight-symbol-mode
(setq highlight-symbol-idle-delay 0.2)
(add-hook 'highlight-symbol-mode-hook
(lambda () (highlight-symbol-nav-mode +1)))))
(use-package hungry-delete
:ensure t
:init (global-hungry-delete-mode +1))
(use-package flx-ido
:ensure t
:commands flx-ido-mode)
(use-package ido-vertical-mode
:ensure t
:commands ido-vertical-mode)
(use-package ido
:init (ido-mode +1)
:bind ("C-x C-f" . ido-find-file)
(flx-ido-mode +1)
(ido-vertical-mode +1)
(setq ido-auto-merge-work-directories-length nil
ido-create-new-buffer 'always
ido-enable-flex-matching t
ido-enable-dot-prefix t
ido-handle-dubplicate-virtual-buffers 2
ido-max-prospects 10
ido-everywhere t
ido-use-filename-at-point 'guess
ido-use-virtual-buffers t)
(use-package ido-ubiquitous
:ensure t)
(add-to-list 'ido-ignore-buffers ".*-autoloads.el"))
(use-package ispell
:defer t
(setq ispell-dictionary "english"
ispell-highlight-face 'flyspell-incorrect
ispell-program-name "/usr/local/bin/aspell"))
(use-package perspective
:ensure t
:commands persp-mode
(set-face-attribute 'persp-selected-face nil :foreground "#81a2be"))
(use-package projectile
:ensure t
:init (projectile-global-mode)
:bind ("s-p" . projectile-command-map)
(setq projectile-switch-project-action 'projectile-dired)
(use-package persp-projectile
:ensure t
:commands persp-projectile
(add-hook 'persp-activated-hook
#'(lambda ()
(get-buffer-create "*Messages*")))))
(require 'persp-projectile))
(use-package saveplace
:preface (setq-default save-place t)
(setq save-place-file "~/.emacs.d/.places"))
(use-package smart-mode-line
:ensure t
(setq-default sml/vc-mode-show-backend t
sml/theme 'respectful)
(use-package smex
:ensure t
:bind (("M-x" . smex)
("M-X" . smex-major-mode-commands)))
(use-package uniquify
(setq uniquify-buffer-name-style 'forward
uniquify-min-dir-content 2))
(use-package visual-regexp
:ensure t
:bind (("C-c q" . vr/query-replace)
("C-c r" . vr/replace)))
(use-package window-number
:commands window-number-mode
:load-path "site-lisp/"
:init (window-number-mode))
(use-package ess
:ensure t
(use-package ess-site
:commands R
:mode ("\\.R$" . R-mode)
(add-hook 'R-mode-hook 'subword-mode))
'((R . t))))
(use-package paredit
:ensure t
:commands (enable-paredit-mode paredit-mode))
(use-package lisp-mode
:bind (([C-s-268632091] . backward-sexp)
([C-s-268632093] . forward-sexp))
(use-package elisp-slime-nav
:ensure t
:commands elisp-slime-nav-mode)
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
(add-hook 'emacs-lisp-mode-hook 'elisp-slime-nav-mode)
(add-hook 'ielm-mode-hook 'elisp-slime-nav-mode)
(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode)
(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode)
(add-hook 'eval-expression-minibuffer-setup-hook
(use-package magit
:ensure t
:bind ("C-x g" . magit-status)
(setq magit-last-seen-setup-instructions "1.4.0"))
(use-package org
:ensure org-plus-contrib
:mode ("\\.org$" . org-mode)
'((sh . t)
(awk . t)))
(bind-key (kbd "C-c a") 'org-archive-to-archive-sibling org-mode-map)
(setq org-completion-use-ido t
org-export-with-section-numbers nil
org-export-with-toc nil
org-src-fontify-natively t
org-src-window-setup 'current-window
org-startup-folded 'showall
org-use-speed-commands t)
(add-hook 'org-mode-hook (function
(lambda () (auto-fill-mode +1))))
(use-package ob-sh
:defer t
(setq org-babel-sh-command "bash")
(add-to-list 'org-babel-default-header-args:sh
'(:shebang . "#!/usr/bin/env bash")))
(use-package ox-latex
:ensure org-plus-contrib
:defer t
(setq org-latex-pdf-process '("latexmk -gg -pdf -bibtex %f"))
(unless (boundp 'org-latex-packages-alist)
(setq org-latex-packages-alist nil))
(add-to-list 'org-latex-packages-alist '("" "microtype"))
(add-to-list 'org-latex-packages-alist '("l2tabu" "nag"))
(add-to-list 'org-latex-packages-alist '("" "lmodern") 't)))
(use-package prolog
:ensure t
:mode ("\\.pl" . prolog-mode))
(use-package simple
(add-hook 'prog-mode-hook
#'(lambda () (highlight-symbol-mode +1))))
(use-package sparql-mode
:load-path "site-lisp/sparql-mode"
:mode "\\.sparql$"
:defines sparql-default-base-url
(setq sparql-default-base-url ""))
;;; init.el ends here
Jump to Line
Something went wrong with that request. Please try again.