summaryrefslogtreecommitdiff
path: root/dot-emacs
blob: 0291c632e2bcaabb016775699efa0221a997f003 (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
;; Switch off toolbar
(tool-bar-mode -1)

;; Highlight current line
(global-hl-line-mode 1)

;; Show line numbers by default
(global-linum-mode 1)

;; Show line-number in the mode line
(line-number-mode 1)

;; Show column-number in the mode line
(column-number-mode 1)

;; set keys for Apple keyboard, for emacs in OS X
(setq mac-command-modifier 'control) ; make cmd key do Control
(setq mac-option-modifier 'meta) ; make opt key do Meta
(setq mac-control-modifier 'control) ; make Control key do Control. TODO: change to Super eventually
(setq ns-function-modifier 'hyper)  ; make Fn key do Hyper

;; redifine £ as # for Python coding, but allow £ as H-3 (Hyper-3 - Hyper mapped to Fn on Mac)
(define-key key-translation-map (kbd "£") "#") ; hash
(define-key key-translation-map (kbd "H-3") (kbd "£")) ; pound

;; Disable C-z - background process
;; Unbind Pesky Sleep Button
(global-unset-key [(control z)])
(global-unset-key [(control x)(control z)])

;; IDO for auto-completion
(ido-mode 1)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t) ; enable IDO in C-x C-f also

;; Faster startup: disable splash and go straight to *scratch*
(setq inhibit-startup-message t
      inhibit-startup-echo-area-message t)

;; Enable auto-indent globally
(define-key global-map (kbd "RET") 'newline-and-indent)

;;
;; Custom managed variables from here on
;;
(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.
 '(linum-format "%3d"))
(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.
 )