summaryrefslogtreecommitdiff
path: root/dot-emacs
diff options
context:
space:
mode:
authorManuel Amago <mamago@gmail.com>2014-11-23 12:26:33 +0000
committerManuel Amago <mamago@gmail.com>2014-11-23 12:26:33 +0000
commitabc2509e9205306305a9d098abaaaaf351274de0 (patch)
tree1e38fc548402f066dcb61a9243bb78ec6a2eb8c2 /dot-emacs
downloaddotfiles-abc2509e9205306305a9d098abaaaaf351274de0.tar.gz
dotfiles-abc2509e9205306305a9d098abaaaaf351274de0.zip
Initial commit
Diffstat (limited to 'dot-emacs')
-rw-r--r--dot-emacs52
1 files changed, 52 insertions, 0 deletions
diff --git a/dot-emacs b/dot-emacs
new file mode 100644
index 0000000..b4837d6
--- /dev/null
+++ b/dot-emacs
@@ -0,0 +1,52 @@
+;; 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
+
+;; 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.
+ )