-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs-mac
134 lines (102 loc) · 3.82 KB
/
.emacs-mac
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
130
131
132
133
134
(add-to-list 'load-path "~/.lisp/")
(global-set-key [f4] 'goto-line)
(global-set-key [f5] 'replace-string)
(setq-default transient-mark-mode t)
(setq-default indent-tabs-mode nil)
;; ***************************************************************
;; Basic Modes and Editing
;; ***************************************************************
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq
scroll-margin 0
scroll-preserve-screen-position 1)
(font-lock-mode)
(menu-bar-mode -1)
(toggle-scroll-bar -1)
(tool-bar-mode -1)
(column-number-mode 1)
;; ***************************************************************
;; Tabs and indentation and cperl-mode
;; ***************************************************************
(setq default-tab-width 4
cperl-close-paren-offset -4
cperl-continued-statement-offset 4
cperl-indent-parens-as-block t
cperl-tab-always-indent t)
(setq cperl-indent-level 4)
(defalias 'perl-mode 'cperl-mode)
(setq iswitch-mode nil)
(setq linum-mode 1)
(add-hook 'cperl-mode-hook
(lambda() (linum-mode 1)))
(require 'tramp)
(setq tramp-default-method "scp")
;; ***************************************************************
;; Packages
;; ***************************************************************
(require 'package)
(push '("marmalade" . "http://marmalade-repo.org/packages/")
package-archives )
(push '("melpa" . "http://melpa.milkbox.net/packages/")
package-archives)
;; ***************************************************************
;; Mac mucking
;; ***************************************************************
(setq mac-option-key-is-meta nil)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier nil)
;(setq mac-allow-anti-aliasing nil)
;; perltidy note: select region; M-1; M-|; perltidy
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/")
(put 'narrow-to-region 'disabled nil)
;; Misc
;; Save backup files in a dedicated directory
(setq backup-directory-alist '(("." . "~/.saves")))
;; Set locale to UTF8
(set-language-environment 'utf-8)
(set-terminal-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
;;
;; Package Management
;;
;; Add package sources
;; (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
;; ("marmalade" . "http://marmalade-repo.org/packages/")
;; ("melpa" . "http://melpa.milkbox.net/packages/")))
;; Set up the package manager of choice. Supports "el-get" and "package.el"
;;(setq pmoc "el-get")
(setq pmoc "package.el")
;; setup C-c t for ansi-term shortcut
;;
;; http://emacsredux.com/blog/2013/03/29/terminal-at-your-fingertips/
(defun visit-term-buffer ()
"Create or visit a terminal buffer."
(interactive)
(if (not (get-buffer "*ansi-term*"))
(progn
(split-window-sensibly (selected-window))
(other-window 1)
(ansi-term (getenv "SHELL")))
(switch-to-buffer-other-window "*ansi-term*")))
(global-set-key (kbd "C-c t") 'visit-term-buffer)
; (set-background-color "grey")
;; (load-theme 'manoj-dark)
(load-theme 'wombat)
(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.
'(default ((t (:slant normal :weight normal :height 160 :width normal :foundry "apple" :family "Monaco"))))))
;;(and (load-library "solarized-dark-theme"))
;(require 'evil)