-
Notifications
You must be signed in to change notification settings - Fork 0
/
emacs_config.el~
155 lines (120 loc) · 4.58 KB
/
emacs_config.el~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
(setq load-path (cons (expand-file-name "~/emacs/site-lisp/") load-path))
(setq initial-frame-alist '((top . 20) (left .30) ;Make window bigger
(width . 200) (height . 53)))
(require `ess-site) ;Load ess
(autoload `ess-rdired "ess-rdired"
"View *R* objects in dired-like buffer." t)
(require `essd-jags)
(require 'smooth-scrolling) ;Enable smooth scrolling
;; scroll one line at a time (less "jumpy" than defaults)
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
(setq mouse-wheel-follow-mosue 't) ;; scroll window under mouse
(setq scroll-step 1) ;; keyboard scroll one line at a time
(defun my-bell-function () ;disable bell when scrolling
(unless (memq this-command
'(isearch-abort abort-recursive-edit exit-minibuffer
keyboard-quit mwheel-scroll down up next-line previous-line
backward-char forward-char))
(ding)))
(setq ring-bell-function 'my-bell-function)
(setq inhibit-splash-screen t)
(add-hook 'emacs-startup-hook
'(lambda ()
(switch-to-buffer "*Bookmark List*")))
(autoload 'matlab-mode "matlab.el" "Enter Matlab mode." t) ;MATLAB mode
(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab.el" "Interactive Matlab mode." t)
(add-to-list 'load-path "~/emacs/site-lisp/color-theme-6.6.0") ;Color themes
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-hober)))
(eval-after-load "color-theme" '(color-theme-xemacs))
;; TeX-mode options
(setq-default TeX-master nil) ; Query for master file.
(setq TeX-auto-save t)
(setq TeX-parse-self)
(add-hook 'latex-mode-hook 'turn-on-reftex)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(setq reftex-plug-into-auctex t)
(setq reftex-label-alist
`((nil ?f nil "Figure~\ref{%s}" nil nil)
(nil ?t nil "Table~\ref{%s}" nil nil)
(nil ?s nil "Section~\ref{%s}" nil nil)))
;; Own Macros
(fset 'kill-completion-buffer
[?\C-x ?k ?* ?C ?o ?m tab return])
(global-set-key "\C-x\C-kC" 'kill-completion-buffer)
(fset 'copy-line
[?\C-a ?\C- ?\C-e ?\M-w])
(global-set-key "\C-x\C-kK" 'copy-line)
(fset 'copy-output-to-transcript
[?\M-{ ?\C- ?\M-} ?\M-w ?\C-x ?o ?\C-y ?\C- ?\C-\M-r ?^ ?> ?\M-\;])
(fset 'previous-R-command-in-transcript
[?\C-a ?\C- ?\C-e ?\C-w ?\C-c ?\C-z ?\C-c ?\C-u ?\M-p ?\C-a ?\C- ?\C-e ?\M-w ?\C-c ?\C-u ?\C-x ?o ?\C-y])
(fset 'col-to-latex-row
"\336 &\C-n\C-e")
;; Own keybindings
(global-set-key "\C-xl" 'goto-line)
(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.
'(LaTeX-float "htbp")
'(TeX-PDF-mode t)
'(TeX-electric-sub-and-superscript t)
'(ess-language "R")
'(latin1-display t nil (latin1-disp))
'(mac-emulate-three-button-mouse t)
'(reftex-label-alist (quote (("algorithm" 97 "alg:" "Algorithm~\\ref{%s}" nil ("algorithm" "alg.") -3))))
'(safe-local-variable-values (quote ((TeX-master . \.\./\.\./cv-tufte))))
'(show-paren-mode t)
'(tex-default-mode (quote latex-mode))
'(tool-bar-mode nil)
'(transient-mark-mode t))
(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.
'(cursor ((t (:background "red")))))
(put 'scroll-left 'disabled nil)
;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
(load
(expand-file-name "~/.emacs.d/elpa/package.el"))
(package-initialize))
;; Autocomplete
(require 'auto-complete)
(global-auto-complete-mode t)
;; Yasnippet
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/yasnippet/snippets")
;; Python
(load-library "ryan-python")
;; Subversion
(load-library "ryan-subversion")
;; Git
(require 'egg)
;; WindMove
(windmove-default-keybindings)
;; Org-mode
;(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
;; Split window and show bookmarks
(split-window-horizontally)
(list-bookmarks)
(column-number-mode)