-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
129 lines (102 loc) · 4.31 KB
/
.emacs
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
(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.
'(inhibit-startup-screen t)
'(initial-buffer-choice t)
'(initial-scratch-message "\"Ride\"")
'(show-paren-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.
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "White" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "unknown" :family "Liberation Mono"))))
'(blue ((t (:foreground "#0099FF"))))
'(comint-highlight-prompt ((((min-colors 88)) (:foreground "IndianRed"))))
'(font-lock-doc-face ((t (:foreground "#223953")))))
;;; Shell mode edits
(setq comint-process-echoes t) ; stop echoes
;(setq ansi-color-names-vector ; better contrast colors
; ["black" "red4" "green4" "yellow4"
; "blue3" "magenta4" "cyan4" "white"])
;(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
;(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(setq comint-prompt-read-only t)
(setenv "PS1" "\\e[0;32m◆\\u@\\H \\D{%Y-%m-%d} \\t\\e[0;30m\\n")
;; clojure-mode
(add-to-list 'load-path "~/opt/clojure-mode")
(require 'clojure-mode)
;; Edit keybindings
(global-unset-key (kbd "C-x C-o"))
(global-set-key (kbd "C-x C-o") 'other-window)
(global-set-key (kbd "C-x g") 'goto-line)
(global-set-key (kbd "<delete>") 'delete-char)
(global-unset-key (kbd "C-x C-v"))
(global-unset-key (kbd "C-x C-c"))
(global-unset-key (kbd "C-x C-x"))
(global-unset-key (kbd "C-v"))
(global-set-key (kbd "C-x c") 'clipboard-kill-ring-save) ;;copy
(global-set-key (kbd "C-x C-c") 'clipboard-kill-ring-save) ;;copy
(global-set-key (kbd "C-x v") 'clipboard-yank) ;;paste
(global-set-key (kbd "C-x C-v") 'clipboard-yank) ;;paste
(global-set-key (kbd "C-x x") 'clipboard-kill-region) ;;cut
(global-set-key (kbd "C-x C-x") 'clipboard-kill-region) ;;cut
(global-unset-key (kbd "C-d"))
(global-set-key (kbd "C-d") 'kill-whole-line)
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-f") 'isearch-forward)
(global-set-key (kbd "C-c f") 'isearch-backward)
(global-unset-key (kbd "C-x f"))
(global-set-key (kbd "C-x f") 'find-file)
(global-unset-key (kbd "C-s"))
(global-set-key (kbd "C-s") 'query-replace)
(global-unset-key (kbd "C-x s"))
(global-set-key (kbd "C-x s") 'replace-string)
(global-unset-key (kbd "C-a"))
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(global-unset-key (kbd "C-x a"))
(global-set-key (kbd "C-c c") 'clojure-jack-in)
(global-unset-key (kbd "C-x a"))
(defun jao-copy-line ()
"Copy current line in the kill ring"
(interactive)
(kill-ring-save (line-beginning-position)
(line-beginning-position 2))`
(kill-ring-save (line-beginning-position)
(line-beginning-position 2))
(message "Line copied"))
(global-set-key (kbd "C-x a") 'jao-copy-line)
;; properly indents lines after a paste
(defadvice yank (after indent-region activate)
(indent-region (region-beginning) (region-end) nil))
;; Change paren-match highlight color
(require 'paren)
(set-face-background 'show-paren-match-face "#009933")
(set-face-foreground 'show-paren-match-face "#FFFFFF")
(set-face-attribute 'show-paren-match-face nil :weight 'extra-bold)
;; rainbow delimiters
(add-to-list 'load-path "~/opt/rainbow-delimiters")
(require 'rainbow-delimiters)
(require 'make-bright)
;; Clojure Colour Scheme
(add-to-list 'load-path "~/opt/my-color-themes")
(require 'color-theme-arjen)
;; blinking colorful cursor
(require 'colorcursor)
;; Maximize Window on startup
(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
;; linum-mode
(global-linum-mode 1)
(global-hl-line-mode 1) ;; highlight line of the cursor
(set-face-background 'hl-line "#492754")
;; desktop save mode
;;(desktop-save-mode 1)
;; Startup functions
(run-with-idle-timer 0.1 nil 'toggle-fullscreen)
;(add-hook 'clojure-mode-hook '(lambda () (setq frame-background-mode 'light)))
(color-theme-arjen)
(add-hook 'emacs-startup-hook 'global-visual-line-mode)
(add-hook 'emacs-startup-hook 'shell)