summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/em.el103
-rw-r--r--conf/kb.el7
-rw-r--r--conf/km-editor.el28
-rw-r--r--conf/km-evil.el (renamed from conf/ev.el)12
-rw-r--r--conf/km-func.el (renamed from conf/util.el)10
-rw-r--r--conf/km-general.el21
-rw-r--r--conf/km-haskell.el (renamed from conf/hs.el)0
-rw-r--r--conf/km-ibuffer.el (renamed from conf/ibuf.el)6
-rw-r--r--conf/km-ido.el22
-rw-r--r--conf/km-org.el (renamed from conf/om.el)7
-rw-r--r--conf/km-pkg.el (renamed from conf/pkg.el)11
-rw-r--r--conf/km-tex.el (renamed from conf/tex.el)6
-rw-r--r--conf/km-ui.el33
13 files changed, 126 insertions, 140 deletions
diff --git a/conf/em.el b/conf/em.el
deleted file mode 100644
index 2d68889..0000000
--- a/conf/em.el
+++ /dev/null
@@ -1,103 +0,0 @@
-;; general emacs settings
-(server-start)
-
-(setq-default fill-column 72)
-(add-hook 'text-mode-hook 'turn-on-auto-fill)
-
-;; to customize font
-(setq default-frame-alist '((font . "Droid Sans Mono-9")))
-
-(require 'font-lock)
-(global-font-lock-mode t)
-(add-to-list 'auto-mode-alist '("\\.*rc$" . conf-unix-mode))
-
-(setq browse-url-browser-function 'browse-url-generic
- browse-url-generic-program "google-chrome")
-;; ess
-;; (require 'ess-site)
-(add-hook 'ess-mode-hook (lambda ()
- (setq ess-indent-level 4)))
-
-;;(require 'dired+)
-
-;; shell scripts
-(add-hook 'sh-mode-hook (lambda ()
- (setq sh-basic-offset 4)))
-
-;; set location of custom.el
-(setq custom-file "~/.emacs.d/custom.el")
-(load custom-file)
-
-;; make whitespace-mode use just basic coloring
-;; http://ergoemacs.org/emacs/whitespace-mode.html
-(setq whitespace-style (quote
- (spaces tabs newline space-mark
- tab-mark newline-mark)))
-;; y or n
-(defalias 'yes-or-no-p 'y-or-n-p)
-
-;; splash screen
-(setq inhibit-splash-screen t
- initial-scratch-message nil)
-
-(scroll-bar-mode -1)
-(tool-bar-mode -1)
-(menu-bar-mode -1)
-(blink-cursor-mode -1)
-
-(delete-selection-mode t) ;; write over selected text
-(transient-mark-mode t)
-;; share clipboard with system
-(setq x-select-enable-clipboard t)
-
-(setq-default indicate-empty-lines t)
-(when (not indicate-empty-lines)
- (toggle-indicate-empty-lines))
-
-
-(setq echo-keystrokes 0.1
- use-dialog-box nil
- visible-bell t)
-(show-paren-mode t)
-
-;; store all backup and autosave files in the tmp dir
-(setq backup-directory-alist
- `((".*" . ,temporary-file-directory)))
-(setq auto-save-file-name-transforms
- `((".*" ,temporary-file-directory t)))
-
-;; revert buffers automatically when underlying files are changed externally
-(global-auto-revert-mode t)
-
-;; line info
-(line-number-mode t)
-(column-number-mode t)
-(size-indication-mode t)
-
-
-;; ido mode
-(ido-mode t)
-(setq ido-enable-prefix nil
- ido-everywhere t
- ido-enable-flex-matching t
- ido-create-new-buffer 'always
- ido-use-filename-at-point 'guess
- ido-max-prospects 10
- ido-save-directory-list-file "~/.emacs.d/cache/ido.hist")
-
-;; recent files
-(setq recentf-save-file "~/.emacs.d/cache/recentf"
- recentf-max-saved-items 200
- recentf-max-menu-items 15)
-(recentf-mode t)
-;; from prelude
-(defun recentf-ido-find-file ()
- "Find a recent file using ido."
- (interactive)
- (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
- (when file
- (find-file file))))
-
-;; tramp
-(require 'tramp)
-(setq tramp-default-method "ssh")
diff --git a/conf/kb.el b/conf/kb.el
deleted file mode 100644
index 2ceb33e..0000000
--- a/conf/kb.el
+++ /dev/null
@@ -1,7 +0,0 @@
-;; kb.el - key bindings
-;; evil-specific ones are in evil.el
-
-(global-set-key (kbd "C-x \\") 'align-regexp)
-
-;; replace buffer-menu with ibuffer
-(global-set-key (kbd "C-x C-b") 'ibuffer)
diff --git a/conf/km-editor.el b/conf/km-editor.el
new file mode 100644
index 0000000..0fe2a31
--- /dev/null
+++ b/conf/km-editor.el
@@ -0,0 +1,28 @@
+;; check km-ui.el if don't find something in here
+
+(setq-default fill-column 72)
+(add-hook 'text-mode-hook 'turn-on-auto-fill)
+
+;; ess
+;; (require 'ess-site)
+(add-hook 'ess-mode-hook (lambda ()
+ (setq ess-indent-level 4)))
+
+;; shell scripts
+(add-hook 'sh-mode-hook (lambda ()
+ (setq sh-basic-offset 4)))
+
+(global-set-key (kbd "C-x \\") 'align-regexp)
+
+;; make whitespace-mode use just basic coloring
+;; http://ergoemacs.org/emacs/whitespace-mode.html
+(setq whitespace-style (quote
+ (spaces tabs newline space-mark
+ tab-mark newline-mark)))
+
+(delete-selection-mode t) ;; write over selected text
+(transient-mark-mode t)
+;; share clipboard with system
+(setq x-select-enable-clipboard t)
+
+(blink-cursor-mode -1)
diff --git a/conf/ev.el b/conf/km-evil.el
index 87d5375..94def61 100644
--- a/conf/ev.el
+++ b/conf/km-evil.el
@@ -1,5 +1,3 @@
-;; ev.org - evil mode configuration
-
;; evil mode uses undo-tree
(require 'undo-tree)
@@ -13,7 +11,7 @@
(define-key evil-motion-state-map "H" 'evil-scroll-up)
(define-key evil-motion-state-map "L" 'evil-scroll-down)
-(defun save-and-kill-buffer ()
+(defun km/save-and-kill-buffer ()
"Save current buffer and then kill it"
(interactive)
(save-buffer)
@@ -24,7 +22,7 @@
(define-key evil-normal-state-map ",w" 'save-buffer)
(define-key evil-normal-state-map ",q" 'kill-buffer)
-(define-key evil-normal-state-map ",d" 'save-and-kill-buffer)
+(define-key evil-normal-state-map ",d" 'km/save-and-kill-buffer)
(define-key evil-normal-state-map "Q" 'fill-paragraph)
(evil-define-key 'visual emacs-lisp-mode-map
@@ -40,7 +38,7 @@
(require 'key-chord)
(key-chord-mode 1)
-(key-chord-define-global ",r" 'recentf-ido-find-file)
+(key-chord-define-global ",r" 'km/recentf-ido-find-file)
(key-chord-define-global ",t" 'org-capture)
;; instead of alt-x
(key-chord-define-global ",x" 'execute-extended-command)
@@ -49,7 +47,7 @@
(key-chord-define-global ",b" 'ido-switch-buffer)
;; org bindings
-(defun always-insert-item ()
+(defun km/always-insert-item ()
(interactive)
(if (not (org-in-item-p))
(insert "\n- ")
@@ -77,7 +75,7 @@
"o" (lambda ()
(interactive)
(end-of-line)
- (always-insert-item)
+ (km/always-insert-item)
(evil-append nil))
(kbd "M-j") 'org-shiftleft
(kbd "M-k") 'org-shiftright
diff --git a/conf/util.el b/conf/km-func.el
index bf9519d..48a2f35 100644
--- a/conf/util.el
+++ b/conf/km-func.el
@@ -1,15 +1,13 @@
-;; util.el -- utility functions
-
;; http://whattheemacsd.com/
;; whitespace cleanup
-(defun cleanup-buffer ()
+(defun km/cleanup-buffer ()
(interactive)
(untabify (point-min) (point-max))
(delete-trailing-whitespace)
(set-buffer-file-coding-system 'utf-8))
-(add-hook 'before-save-hook 'cleanup-buffer)
+(add-hook 'before-save-hook 'km/cleanup-buffer)
-(defun rename-current-buffer-file ()
+(defun km/rename-current-buffer-file ()
"Renames current buffer and file it is visiting."
(interactive)
(let ((name (buffer-name))
@@ -26,4 +24,4 @@
(message "File '%s' successfully renamed to '%s'"
name (file-name-nondirectory new-name)))))))
-(global-set-key (kbd "C-x C-r") 'rename-current-buffer-file)
+(global-set-key (kbd "C-x C-r") 'km/rename-current-buffer-file)
diff --git a/conf/km-general.el b/conf/km-general.el
new file mode 100644
index 0000000..5d661e9
--- /dev/null
+++ b/conf/km-general.el
@@ -0,0 +1,21 @@
+;; set location of custom.el
+(setq custom-file "~/.emacs.d/custom.el")
+(load custom-file)
+
+;; store all backup and autosave files in the tmp dir
+(setq backup-directory-alist
+ `((".*" . ,temporary-file-directory)))
+(setq auto-save-file-name-transforms
+ `((".*" ,temporary-file-directory t)))
+
+;; revert buffers automatically when underlying files are changed externally
+(global-auto-revert-mode t)
+
+;; tramp
+(require 'tramp)
+(setq tramp-default-method "ssh")
+
+(setq browse-url-browser-function 'browse-url-generic
+ browse-url-generic-program "google-chrome")
+
+;;(require 'dired+)
diff --git a/conf/hs.el b/conf/km-haskell.el
index 58bc2c8..58bc2c8 100644
--- a/conf/hs.el
+++ b/conf/km-haskell.el
diff --git a/conf/ibuf.el b/conf/km-ibuffer.el
index 8bda6e9..3fa6a03 100644
--- a/conf/ibuf.el
+++ b/conf/km-ibuffer.el
@@ -1,7 +1,9 @@
-;; ibuf.el
-;; configuration for ibuffer
+;; replace buffer-menu with ibuffer
+(global-set-key (kbd "C-x C-b") 'ibuffer)
+
;; modified from http://martinowen.net/blog/2010/02/tips-for-emacs-ibuffer.html
;; and here http://www.elliotglaysher.org/emacs/
+
(setq ibuffer-saved-filter-groups
'(("home"
("emacs-config" (or (filename . ".emacs.d")
diff --git a/conf/km-ido.el b/conf/km-ido.el
new file mode 100644
index 0000000..d06163c
--- /dev/null
+++ b/conf/km-ido.el
@@ -0,0 +1,22 @@
+(ido-mode t)
+(setq ido-enable-prefix nil
+ ido-everywhere t
+ ido-enable-flex-matching t
+ ido-create-new-buffer 'always
+ ido-use-filename-at-point 'guess
+ ido-max-prospects 10
+ ido-save-directory-list-file "~/.emacs.d/cache/ido.hist")
+
+;; recent files
+(setq recentf-save-file "~/.emacs.d/cache/recentf"
+ recentf-max-saved-items 200
+ recentf-max-menu-items 15)
+(recentf-mode t)
+
+;; from prelude
+(defun km/recentf-ido-find-file ()
+ "Find a recent file using ido."
+ (interactive)
+ (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
+ (when file
+ (find-file file))))
diff --git a/conf/om.el b/conf/km-org.el
index 56f080f..1d7a80a 100644
--- a/conf/om.el
+++ b/conf/km-org.el
@@ -1,6 +1,3 @@
-;;; om.el - org mode config
-;; created 24 Nov 2011
-
;;;; org-mode
(setq org-log-done t)
(setq org-todo-keywords
@@ -108,11 +105,11 @@
;;;; Refile settings
;; Exclude DONE state tasks from refile targets
-(defun bh/verify-refile-target ()
+(defun km/verify-refile-target ()
"Exclude todo keywords with a done state from refile targets"
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
-(setq org-refile-target-verify-function 'bh/verify-refile-target)
+(setq org-refile-target-verify-function 'km/verify-refile-target)
;; set up babel languages
(org-babel-do-load-languages
diff --git a/conf/pkg.el b/conf/km-pkg.el
index 66d7c2f..91c0462 100644
--- a/conf/pkg.el
+++ b/conf/km-pkg.el
@@ -1,4 +1,3 @@
-;; pkg.el
;; http://www.aaronbedra.com/emacs.d/
(require 'package)
@@ -7,7 +6,7 @@
(package-initialize)
(require 'cl)
-(defvar kyle-packages '(
+(defvar km/packages '(
evil
undo-tree
key-chord
@@ -18,15 +17,15 @@
)
"Default packages")
-(defun kyle-packages-installed-p ()
- (loop for pkg in kyle-packages
+(defun km/packages-installed-p ()
+ (loop for pkg in km/packages
when (not (package-installed-p pkg)) do (return nil)
finally (return t)))
-(unless (kyle-packages-installed-p)
+(unless (km/packages-installed-p)
(message "%s" "Refreshing package database...")
(package-refresh-contents)
- (dolist (pkg kyle-packages)
+ (dolist (pkg km/packages)
(when (not (package-installed-p pkg))
(message "installing %s" pkg)
(package-install pkg))))
diff --git a/conf/tex.el b/conf/km-tex.el
index 94886e0..1c69dbd 100644
--- a/conf/tex.el
+++ b/conf/km-tex.el
@@ -1,5 +1,3 @@
-;; tex.el
-
;;; add path for pdflatex
(getenv "PATH")
(setenv "PATH"
@@ -29,7 +27,7 @@
;; commented out the rest of it because something was causing it to
;; prompt for master file in org mode
-(defun org-mode-reftex-setup ()
+(defun km/org-mode-reftex-setup ()
(load-library "reftex")
;; (and (buffer-file-name)
;; (file-exists-p (buffer-file-name))
@@ -37,7 +35,7 @@
(define-key org-mode-map (kbd "C-c [") 'reftex-citation)
)
-(add-hook 'org-mode-hook 'org-mode-reftex-setup)
+(add-hook 'org-mode-hook 'km/org-mode-reftex-setup)
(setq reftex-default-bibliography
(quote
diff --git a/conf/km-ui.el b/conf/km-ui.el
new file mode 100644
index 0000000..19c7aac
--- /dev/null
+++ b/conf/km-ui.el
@@ -0,0 +1,33 @@
+;; check km-editor.el if don't find something in here
+
+;; to customize font
+(setq default-frame-alist '((font . "Droid Sans Mono-9")))
+
+(require 'font-lock)
+(global-font-lock-mode t)
+(add-to-list 'auto-mode-alist '("\\.*rc$" . conf-unix-mode))
+
+;; splash screen
+(setq inhibit-splash-screen t
+ initial-scratch-message nil)
+
+(scroll-bar-mode -1)
+(tool-bar-mode -1)
+(menu-bar-mode -1)
+
+(setq-default indicate-empty-lines t)
+(when (not indicate-empty-lines)
+ (toggle-indicate-empty-lines))
+
+(setq echo-keystrokes 0.1
+ use-dialog-box nil
+ visible-bell t)
+(show-paren-mode t)
+
+;; y or n
+(defalias 'yes-or-no-p 'y-or-n-p)
+
+;; line info
+(line-number-mode t)
+(column-number-mode t)
+(size-indication-mode t)