summaryrefslogtreecommitdiffstats
path: root/.emacs
blob: 9b26bb22c8c539c6d61e7cea9d4980342dd6026e (plain)
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
(require 'paren)
(require 'uniquify)

(load-file "~/.emacs.d/include.el")

(if (eq system-type 'gnu/linux) ; if we're running linux
    (load-file "~/.emacs.d/linux/.emacs"))

(setq inhibit-startup-message t)      ; don't show welcome
(setq-default indent-tabs-mode nil)   ; spaces, no tabs
(tool-bar-mode nil)                   ; no toolbar
(menu-bar-mode nil)                   ; no menu
(line-number-mode nil)                ; don't show line numbers in splitter
(global-linum-mode t)                 ; show line numbers in gutter
(column-number-mode t)                ; show column numbers in splitter
(color-theme-weirdness)               ; my theme
(global-font-lock-mode t)             ; always show syntax higlighting, this may
                                      ; be old
(fset 'yes-or-no-p 'y-or-n-p)         ; don't want to have to type yes or no
(setq require-final-newline t)        ; I always get bothered by this with the likes of fstab
(show-paren-mode t)
(setq font-lock-maximum-decoration t) ; denotes our interest in maximum possible fontification
(setq uniquify-buffer-name-style 'reverse)

;; Keybindings
(global-set-key "\C-m" 'newline-and-indent)

;; Autopair Mode
(autopair-global-mode)

;; Vala Mode
(add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode))
(add-to-list 'auto-mode-alist '("\\.vapi$" . vala-mode))
(add-to-list 'file-coding-system-alist '("\\.vala$" . utf-8))
(add-to-list 'file-coding-system-alist '("\\.vapi$" . utf-8))

;; C# Mode
(setq auto-mode-alist (cons `("\\.cs\\'" . csharp-mode) auto-mode-alist))

;; Batch Mode
(setq auto-mode-alist (cons `("\\.bat\\'" . batch-mode) auto-mode-alist))

;; Autosave location
(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))

;; Autocomplete
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)

;; ide-skel
(global-set-key [f4] 'ide-skel-proj-find-files-by-regexp)
(global-set-key [f5] 'ide-skel-proj-grep-files-by-regexp)
(global-set-key [f10] 'ide-skel-toggle-left-view-window)
(global-set-key [f11] 'ide-skel-toggle-bottom-view-window)
(global-set-key [f12] 'ide-skel-toggle-right-view-window)
(global-set-key [C-next] 'tabbar-backward)
(global-set-key [C-prior] 'tabbar-forward)

(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.
 )
(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.
 )