comparison .emacs @ 0:2764b4f45f9f

1st commit
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Mon, 21 Apr 2014 04:30:59 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2764b4f45f9f
1 ;;htmllize
2 (load "~/.emacs.d/htmlize.el")
3
4 ;;load path
5 (setq load-path (cons "~/.emacs.d" load-path))
6 (setq load-path (cons (expand-file-name "~/.emacs.d/color-theme-6.6.0") load-path))
7 (display-time-mode 1)
8
9 ;;カーソル位置表示
10 (line-number-mode 1)
11 (column-number-mode 1)
12 (blink-cursor-mode 0)
13
14 ;;キーバインド
15 (define-key global-map "\C-u" 'undo)
16 (define-key global-map "\C-j" 'dabbrev-expand)
17 (define-key global-map "\C-h" 'delete-backward-char)
18 (define-key global-map "\C-c\C-i" 'indent-region)
19 (define-key global-map "\C-ch" 'windmove-left)
20 (define-key global-map "\C-cj" 'windmove-down)
21 (define-key global-map "\C-ck" 'windmove-up)
22 (define-key global-map "\C-cl" 'windmove-right)
23 (define-key global-map "\C-c\C-c" 'comment-or-uncomment-region)
24 (define-key global-map "\C-c\C-v" 'split-window-horizontally)
25
26 ;;括弧の対応
27 (show-paren-mode 1)
28
29 ;;スクロール設定
30 (setq scroll-step 1)
31
32 ;;関数名
33 (which-function-mode 1)
34
35 ;; スケルトンでのペア補完をオン
36 (setq skeleton-pair 1)
37
38 ;;; スケルトンでのペア補完定義
39 ;;(global-set-key "(" 'skeleton-pair-insert-maybe)
40 ;;(global-set-key "[" 'skeleton-pair-insert-maybe)
41 ;;(global-set-key "{" 'skeleton-pair-insert-maybe)
42 ;;(global-set-key "\"" 'skeleton-pair-insert-maybe)
43 ;;(global-set-key "'" 'skeleton-pair-insert-maybe)
44
45 ;;選択範囲に色をつける
46 (setq transient-mark-mode t)
47
48 ;;行削除
49 (setq kill-whole-line t)
50
51 ;;聞き方の変更
52 (fset 'yes-or-no-p 'y-or-n-p)
53
54 ;;インデント関係
55 (global-set-key "\C-m" 'newline-and-indent)
56 (setq-default indent-tabs-mode nil)
57 (setq-default tab-width 4)
58 (setq c-basic-offset 4)
59 ;; (setq default-tab-width 4)
60
61 ;;カラーテーマ
62 (require 'color-theme)
63 (color-theme-initialize)
64 (color-theme-pok-wob)
65
66 ;;(load-library "php-mode")
67 ;;(reguire 'php-mode)
68
69 ;;全角
70 (defface my-face-b-1 '((t (:background "medium aquamarine"))) nil)
71 (defface my-face-b-1 '((t (:background "dark turquoise"))) nil)
72 (defface my-face-b-2 '((t (:background "cyan"))) nil)
73 (defface my-face-b-2 '((t (:background "SeaGreen"))) nil)
74 (defface my-face-u-1 '((t (:foreground "SteelBlue" :underline t))) nil)
75 (defvar my-face-b-1 'my-face-b-1)
76 (defadvice font-lock-mode (before my-font-lock-mode ())
77 (font-lock-add-keywords
78 major-mode
79 '(
80 (" " 0 my-face-b-1 append)
81 )))
82 (ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode)
83 (ad-activate 'font-lock-mode)
84 (add-hook 'find-file-hooks '(lambda ()
85 (if font-lock-mode
86 nil
87 (font-lock-mode t))))
88 (put 'set-goal-column 'disabled nil)
89
90 ;;gosh
91 (setq scheme-program-name "gosh -i")
92
93 ;; groovy
94 (global-font-lock-mode 1)
95 (autoload 'groovy-mode "groovy-mode" "Major mode for editing Groovy code." t)
96 (add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode))
97 (add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))
98 (add-hook 'groovy-mode-hook
99 '(lambda ()
100 (require 'groovy-electric)
101 (groovy-electric-mode)))
102
103 ;;backup
104 (setq make-backup-files nil)
105 (setq auto-save-default nil)
106
107 ;; OpenCL
108 (add-to-list 'auto-mode-alist '("\.cl$" . c++-mode))
109 (custom-set-variables
110 ;; custom-set-variables was added by Custom.
111 ;; If you edit it by hand, you could mess it up, so be careful.
112 ;; Your init file should contain only one such instance.
113 ;; If there is more than one, they won't work right.
114 '(gud-gdb-command-name "gdb --annotate=1")
115 '(large-file-warning-threshold nil)
116 '(tab-width 8))
117 (custom-set-faces
118 ;; custom-set-faces was added by Custom.
119 ;; If you edit it by hand, you could mess it up, so be careful.
120 ;; Your init file should contain only one such instance.
121 ;; If there is more than one, they won't work right.
122 )
123
124 ;; Cuda
125 (add-to-list 'auto-mode-alist '("\.cu$" . c++-mode))
126 (custom-set-variables
127 ;; custom-set-variables was added by Custom.
128 ;; If you edit it by hand, you could mess it up, so be careful.
129 ;; Your init file should contain only one such instance.
130 ;; If there is more than one, they won't work right.
131 '(gud-gdb-command-name "gdb --annotate=1")
132 '(large-file-warning-threshold nil)
133 '(tab-width 8))
134 (custom-set-faces
135 ;; custom-set-faces was added by Custom.
136 ;; If you edit it by hand, you could mess it up, so be careful.
137 ;; Your init file should contain only one such instance.
138 ;; If there is more than one, they won't work right.
139 )
140
141 ;; Haskell
142 (add-to-list 'load-path "~/.emacs.d/haskell-mode/")
143 (require 'haskell-mode-autoloads)
144 (add-to-list 'Info-default-directory-list "~/.emacs.d/haskell-mode/")
145 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
146 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)