gdritter repos dotfiles / 4463818
initial dotfiles from lemuria Getty Ritter 9 years ago
2 changed file(s) with 232 addition(s) and 0 deletion(s). Collapse all Expand all
+199
-0
emacs less more
1 ;; basic appearance bits
2
3 (setq initial-scratch-message "")
4 (setq inhibit-startup-message t)
5 (setq inhibit-startup-screen t)
6 (setq-default c-basic-offset 4)
7 (menu-bar-mode 0)
8 (setq column-number-mode t)
9 (setq default-tab-width 4)
10 (setq indent-tabs-mode nil)
11
12 (if (not (getenv "BIG"))
13 (progn
14 (scroll-bar-mode 0)
15 (tool-bar-mode 0)))
16
17
118
19
20 ;; *elpa setup
21 (require 'package)
22 (package-initialize)
23 (add-to-list 'package-archives
24 '("melpa" . "http://melpa.milkbox.net/packages/") t)
25 (require 'use-package)
26
27
228
29
30 ;; misc. package setup
31
32 (use-package magit
33 :ensure t)
34
35 (use-package twittering-mode
36 :ensure t
37 :init (setq twittering-use-master-password t))
38
39
340
41
42 ;; tuareg-mode
43
44 (use-package tuareg
45 :ensure t
46 :init
47 (progn
48 (autoload 'tuareg-mode "tuareg-mode"
49 "Major mode for editing Caml or whatever." t)
50 (autoload 'camldebug "camldebug" "Run the Caml debugger" t)
51 (autoload 'tuareg-imenu-set-imenu "tuareg-imenu"
52 "Configuration of imenu for tuareg" t)
53 (add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu)
54 (add-to-list 'auto-mode-alist '("\\.ml[ily]?\\'" . tuareg-mode))))
55
56
457
58
59 ;; personal dockerfile mode
60
61 (load "/home/gdritter/.emacs-modes/dockerfile-mode.el")
62 (add-to-list 'auto-mode-alist '("\\Dockerfile\\'" . dockerfile-mode))
63
64
565
66
67 ;; rust-mode
68
69 (use-package rust-mode
70 :ensure t
71 :init (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)))
72
73
674
75
76 ;; toml-mode
77
78 (use-package toml-mode
79 :ensure t
80 :init (add-to-list 'auto-mode-alist '("\\.toml\\'" . toml-mode)))
81
82
783
84
85 ;; markdown-mode
86
87 (use-package markdown-mode
88 :ensure t
89 :init
90 (progn
91 (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
92 (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
93 (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))))
94
95
896
97
98 ;; cryptol-mode
99
100 (use-package cryptol-mode
101 :ensure t
102 :init (add-to-list 'auto-mode-alist '("\\.cry\\'" . cryptol-mode)))
103
104
9105
106
107 ;; color things!
108
109 (when (display-graphic-p)
110 (use-package color-theme
111 :ensure t
112 :init
113 (progn
114 (color-theme-initialize)
115 (add-to-list 'custom-theme-load-path
116 "/home/gdritter/.emacs-modes/color-theme-solarized")
117 (add-to-list 'custom-theme-load-path
118 "/home/gdritter/.emacs-modes/tomorrow-theme")
119 (add-to-list 'custom-theme-load-path
120 "/home/gdritter/.emacs-modes/zenburn")
121 (let ((theme (getenv "THEME")))
122 (cond
123 ((string= theme "solarized-dark")
124 (load-theme 'solarized-dark t))
125 ((string= theme "solarized-light")
126 (load-theme 'solarized-light t))
127 ((string= theme "tomorrow")
128 (load-theme 'tomorrow-night t))
129 (t (load-theme 'zenburn t))))))
130 (custom-set-faces
131 '(default
132 ((t (:family "Inconsolata"
133 :foundry "unknown"
134 :slant normal
135 :weight normal
136 :height 98
137 :width normal))))
138 '(tex-verbatim
139 ((t (:family "consolas"))))))
140
141
142
10143
144
145 (use-package whitespace
146 :ensure t
147 :init
148 (progn
149 (setq whitespace-style '(face empty tabs trailing))
150 (global-whitespace-mode t)))
151
152
11153
154
155 ;; haskell-mode
156
157 (use-package haskell-mode
158 :ensure t
159 :init
160 (progn
161 (setq haskell-mode-hook 'turn-on-haskell-simple-indent)))
162
12163
164
165 ;; spacing fixes!
166
167 (defun fix-spacing ()
168 (let ((here (point)))
169 (interactive)
170 (untabify (point-min) (point-max))
171 (replace-regexp "\s*$" "")
172 (goto-char here)
173 (princ "Fixing all spacing...")))
174
175 (setq gdritter/spacing-modes
176 '(c-mode
177 c++-mode
178 asm-mode
179 haskell-mode
180 haskell-cabal-mode
181 emacs-lisp-mode
182 lisp-mode
183 d-mode
184 erlang-mode
185 tuareg-mode))
186
187 (defun fix-spacing-hook ()
188 (when (member major-mode gdritter/spacing-modes)
189 (fix-spacing)))
190
191 (add-hook 'before-save-hook 'fix-spacing-hook)
192
193
13194
195
196 ;; text-fringe-mode (for editing single prose files)
197
198 (define-minor-mode bzg-big-fringe-mode
199 "Minor mode to center text using large fringe"
200 :init-value nil
201 :global t
202 :variable bzg-big-fringe-mode
203 :group 'editing-basics
204 (if (not bzg-big-fringe-mode)
205 (set-fringe-style nil)
206 (progn
207 (set-fringe-mode
208 (/ (- (frame-pixel-width)
209 (* 100 (frame-char-width)))
210 2))
211 (mapcar (lambda (fb) (set-fringe-bitmap-face fb 'org-hide))
212 fringe-bitmaps))))
1 # .bashrc
2
3 # Source global definitions
4 if [ -f /etc/bashrc ]; then
5 . /etc/bashrc
6 fi
7
8 #cat <TODO
9 #echo
10
11 # User specific aliases and functions
12 alias cl=clear
13 alias la='ls -a'
14 alias ll='ls -l'
15 alias lpdup='lpr -o sides=two-sided-long-edge -P hp4200n'
16 alias iks='ssh ikshvaku'
17 alias ros='ssh rosencrantz'
18 alias guil='ssh guildenstern'
19 alias iks-elinks='ssh ikshvaku -t "bash -c \". .bashrc && elinks\""'
20 alias iks-finch='ssh ikshvaku -t "bash -c \". .bashrc && finch\""'
21 alias iks-irssi='ssh ikshvaku -t "bash -c \". .bashrc && irssi\""'
22 alias iks-ncmpc='ssh ikshvaku -t "bash -c \". .bashrc && ncmpc\""'
23 alias evil='EVIL=true emacs'
24 alias evilmacs='EVIL=true emacs'
25 alias bigmacs='BIG=true emacs'
26 alias textmacs='NARROW=true emacs'
27 alias em='EVIL=true BARE=true emacs'
28 alias objdump='objdump -M intel'
29 alias pr-paper='lpr -P hp4200n -o number-up=2 -o sides=two-sided-long-edge'
30 alias big-urxvt='urxvt -fn "xft:Inconsolata:pixelsize=24"'
31
32 export EDITOR="emacs -nw"
33 export BASHFILESIZE=50000