forked from nguyent/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.emacs
More file actions
67 lines (55 loc) · 2.05 KB
/
.emacs
File metadata and controls
67 lines (55 loc) · 2.05 KB
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
(setq inhibit-startup-message t)
(global-unset-key "\C-x\C-b")
(cua-selection-mode 1) ; C-RET for visual rect selection
(show-paren-mode 1)
(setq show-paren-delay 0)
(menu-bar-mode -1)
(tool-bar-mode -1)
(setq x-select-enable-clipboard t)
(setq user-mail-address "thang@ccs.neu.edu")
(setq make-backup-files nil)
(server-start)
(column-number-mode t)
(ido-mode t)
(setq-default indent-tabs-mode nil)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; set indentation to 4 when editing in python
(add-hook 'python-mode-hook
'(lambda ()
(setq-default python-indent 4)))
;; stroustrup when editing c
(add-hook 'c-initialization-hook
'(lambda ()
(setq-default c-default-style "stroustrup")))
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(delete-selection-mode 1)
(line-number-mode 1)
(global-linum-mode 1)
(setq default-tab-width 4)
(setq tab-width 4)
(desktop-save-mode 1)
(setq desktop-path '("~/.emacs.d/"))
(setq desktop-dirname "~/.emacs.d/")
(setq desktop-base-file-name "emacs-desktop")
(fset 'html-mode 'nxml-mode)
(setq inhibit-splash-screen t)
(scroll-bar-mode -1)
(custom-set-variables
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(custom-enabled-themes (quote (deeper-blue))))
(when (equal system-type 'darwin)
(setenv "PATH" (concat "/opt/local/bin:/usr/local/bin:" (getenv "PATH")))
(push "/opt/local/bin" exec-path))
(setq frame-title-format
(list (format "%s %%S: %%j " (system-name))
'(buffer-file-name "%f" (dired-directory dired-directory "%b"))))
(defun get-abs-path ()
"Get the absolute path of the current working buffer, including filename and place it into the kill ring"
(interactive)
(kill-new (buffer-file-name)))
(global-set-key [f5] 'get-abs-path)
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))