initial upload
This commit is contained in:
174
0_inbox/in/Scrivener_Emacs_Vim/init.el
Normal file
174
0_inbox/in/Scrivener_Emacs_Vim/init.el
Normal file
@@ -0,0 +1,174 @@
|
||||
;; -*- lexical-binding: t -*-
|
||||
|
||||
;;;;
|
||||
;; Packages
|
||||
;;;;
|
||||
|
||||
;; Define package repositories
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("marmalade" . "http://marmalade-repo.org/packages/") t)
|
||||
(add-to-list 'package-archives
|
||||
'("tromey" . "http://tromey.com/elpa/") t)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
||||
|
||||
|
||||
;; Load and activate emacs packages. Do this first so that the
|
||||
;; packages are loaded before you start trying to modify them.
|
||||
;; This also sets the load path.
|
||||
(package-initialize)
|
||||
|
||||
;; Download the ELPA archive description if needed.
|
||||
;; This informs Emacs about the latest versions of all packages, and
|
||||
;; makes them available for download.
|
||||
(when (not package-archive-contents)
|
||||
(package-refresh-contents))
|
||||
|
||||
;; The packages you want installed. You can also install these
|
||||
;; manually with M-x package-install
|
||||
;; Add in your own as you wish:
|
||||
(defvar my-packages
|
||||
'(
|
||||
|
||||
;; Enhances M-x to allow easier execution of commands. Provides
|
||||
;; a filterable list of possible commands in the minibuffer
|
||||
;; http://www.emacswiki.org/emacs/Smex
|
||||
smex
|
||||
|
||||
))
|
||||
|
||||
;; On OS X, an Emacs instance started from the graphical user
|
||||
;; interface will have a different environment than a shell in a
|
||||
;; terminal window, because OS X does not run a shell during the
|
||||
;; login. Obviously this will lead to unexpected results when
|
||||
;; calling external utilities like make from Emacs.
|
||||
;; This library works around this problem by copying important
|
||||
;; environment variables from the user's shell.
|
||||
;; https://github.com/purcell/exec-path-from-shell
|
||||
(if (eq system-type 'darwin)
|
||||
(add-to-list 'my-packages 'exec-path-from-shell))
|
||||
|
||||
(dolist (p my-packages)
|
||||
(when (not (package-installed-p p))
|
||||
(package-install p)))
|
||||
|
||||
|
||||
;; Place downloaded elisp files in ~/.emacs.d/vendor. You'll then be able
|
||||
;; to load them.
|
||||
;;
|
||||
;; For example, if you download yaml-mode.el to ~/.emacs.d/vendor,
|
||||
;; then you can add the following code to this file:
|
||||
;;
|
||||
;; (require 'yaml-mode)
|
||||
;; (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
|
||||
;;
|
||||
;; Adding this code will make Emacs enter yaml mode whenever you open
|
||||
;; a .yml file
|
||||
(add-to-list 'load-path "~/.emacs.d/vendor")
|
||||
|
||||
|
||||
;;;;
|
||||
;; Customization
|
||||
;;;;
|
||||
|
||||
;; Add a directory to our load path so that when you `load` things
|
||||
;; below, Emacs knows where to look for the corresponding file.
|
||||
(add-to-list 'load-path "~/.emacs.d/customizations")
|
||||
|
||||
;; These customizations make it easier for you to navigate files,
|
||||
;; switch buffers, and choose options from the minibuffer.
|
||||
(load "navigation.el")
|
||||
|
||||
;; These customizations change the way emacs looks and disable/enable
|
||||
;; some user interface elements
|
||||
(load "ui.el")
|
||||
|
||||
;; These customizations make editing a bit nicer.
|
||||
(load "editing.el")
|
||||
|
||||
;; Hard-to-categorize customizations
|
||||
(load "misc.el")
|
||||
|
||||
(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 bold shadow italic underline bold bold-italic bold])
|
||||
'(ansi-color-names-vector
|
||||
(vector "#ffffff" "#bf616a" "#B4EB89" "#ebcb8b" "#89AAEB" "#C189EB" "#89EBCA" "#232830"))
|
||||
'(blink-cursor-mode nil)
|
||||
'(coffee-tab-width 2)
|
||||
'(custom-safe-themes
|
||||
(quote
|
||||
("ebc83be4a38da627b90598422a8f734e64555ce1c6a485d91b1fd15e05bb3ff8" "118f0145d56cc963031a2492b7454e3811e63c6ee9d75dad115bf76a774ab1ff" "d8f76414f8f2dcb045a37eb155bfaa2e1d17b6573ed43fb1d18b936febc7bbc2" "05c3bc4eb1219953a4f182e10de1f7466d28987f48d647c01f1f0037ff35ab9a" "e97dbbb2b1c42b8588e16523824bc0cb3a21b91eefd6502879cf5baa1fa32e10" "2305decca2d6ea63a408edd4701edf5f4f5e19312114c9d1e1d5ffe3112cde58" default)))
|
||||
'(fci-rule-color "#343d46")
|
||||
'(org-startup-truncated nil)
|
||||
'(show-paren-mode t)
|
||||
'(tool-bar-mode nil)
|
||||
'(vc-annotate-background nil)
|
||||
'(vc-annotate-color-map
|
||||
(quote
|
||||
((20 . "#bf616a")
|
||||
(40 . "#DCA432")
|
||||
(60 . "#ebcb8b")
|
||||
(80 . "#B4EB89")
|
||||
(100 . "#89EBCA")
|
||||
(120 . "#89AAEB")
|
||||
(140 . "#C189EB")
|
||||
(160 . "#bf616a")
|
||||
(180 . "#DCA432")
|
||||
(200 . "#ebcb8b")
|
||||
(220 . "#B4EB89")
|
||||
(240 . "#89EBCA")
|
||||
(260 . "#89AAEB")
|
||||
(280 . "#C189EB")
|
||||
(300 . "#bf616a")
|
||||
(320 . "#DCA432")
|
||||
(340 . "#ebcb8b")
|
||||
(360 . "#B4EB89"))))
|
||||
'(vc-annotate-very-old-color nil))
|
||||
|
||||
(require 'visual-fill-column)
|
||||
(require 'linum-off)
|
||||
(require 'f)
|
||||
|
||||
|
||||
;; enable perspective mode
|
||||
(persp-mode)
|
||||
|
||||
;; "A hook that's run after `persp-switch'.
|
||||
;; Run with the newly created perspective as `persp-curr'.")
|
||||
(add-hook 'persp-switch-hook
|
||||
(lambda()
|
||||
;; switche themes here...
|
||||
))
|
||||
|
||||
;; loads workspace on launch
|
||||
;; https://github.com/nex3/perspective-el/pull/49
|
||||
(defun save-perspective-configuration ()
|
||||
"Save the current perspective windows configuration"
|
||||
(interactive)
|
||||
(if persp-curr
|
||||
(with-temp-file (format "~/.emacs.d/perspectives/%s" (persp-name persp-curr))
|
||||
(insert (prin1-to-string (current-window-configuration-printable))))))
|
||||
|
||||
(defun load-perspective-configuration ()
|
||||
"Load the current perspective windows configuration"
|
||||
(interactive)
|
||||
(let ((perspective-file (format "~/.emacs.d/perspectives/%s" (persp-name persp-curr))))
|
||||
(if (f-exists? perspective-file)
|
||||
(restore-window-configuration (read (f-read perspective-file))))))
|
||||
|
||||
(add-hook 'persp-before-switch-hook 'save-perspective-configuration)
|
||||
(add-hook 'persp-created-hook 'load-perspective-configuration)
|
||||
|
||||
(load-perspective-configuration)
|
||||
|
||||
|
||||
(persp-new "main")
|
||||
(persp-new "config")
|
||||
(persp-new "journal")
|
||||
(persp-new "vimvalley")
|
||||
Reference in New Issue
Block a user