-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs.local.gyllen
64 lines (51 loc) · 2.11 KB
/
.emacs.local.gyllen
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
;;; ---- Check if system is Darwin/Mac OS X
(defun system-type-is-darwin ()
"Return true if system is darwin-based (Mac OS X)"
(string-equal system-type "darwin"))
;;;; ---- Check if system is GNU/Linux
(defun system-type-is-gnu ()
"Return true if system is GNU/Linux-based"
(string-equal system-type "gnu/linux"))
;; Home
(if (system-type-is-darwin) (setq popdevelop-packages-path "/Users/johangyllenspetz/Git/dotfiles/"))
(if (system-type-is-darwin) (load (concat popdevelop-packages-path "/Users/johangyllenspetz/Git/dotfiles/.emacs")))
;; Work
(if (system-type-is-gnu) (setq popdevelop-packages-path "/home/johangy/git/dotfiles/"))
(if (system-type-is-gnu) (load (concat popdevelop-packages-path "/home/johangy/git/dotfiles/.emacs")))
(if (system-type-is-gnu) (load (concat popdevelop-packages-path "/home/johangy/git/dotfiles/.emacs.local.gyllen.work")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Buffer switch
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(iswitchb-mode 1)
(setq iswitchb-buffer-ignore '("^\\*"))
(setq iswitchb-buffer-ignore '("\*"))
(defun iswitchb-local-keys ()
(mapc (lambda (K)
(let* ((key (car K)) (fun (cdr K)))
(define-key iswitchb-mode-map (edmacro-parse-keys key) fun)))
'(("C-f" . iswitchb-next-match)
("C-b" . iswitchb-prev-match)
("<up>" . ignore )
("<down>" . ignore ))))
(add-hook 'iswitchb-define-mode-map-hook 'iswitchb-local-keys)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; My key bindings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Key bindings xref
(global-set-key (kbd "C-c C-f") 'flymake-display-err-menu-for-current-line)
;; Goto line
(global-set-key "\C-c\C-j" 'goto-line)
;;Uncomment region
(global-set-key "\C-c\C-y" 'uncomment-region)
;; Switch windows with s-a
(global-set-key (kbd "s-a") 'other-window)
;; Indent region
(global-set-key (kbd "s-i") 'indent-region)
;; Color theme tweaks
(set-face-background 'trailing-whitespace "Green")
(set-face-background 'lineker-warning-face "Pink")
(set-face-foreground 'lineker-warning-face "Black")
;; I do not like the bar cursor
(setq djcb-normal-cursor-type 'box)
;; Use flymake
(add-hook 'c-mode-hook 'flymake-mode)