-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
145 lines (124 loc) · 4.58 KB
/
init.el
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
135
136
137
138
139
140
141
142
143
144
145
;; package管理
(package-initialize)
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
;; auto-complete(自動補完)
;;(require 'auto-complete)
;;(global-auto-complete-mode 0.5)
(set-default-coding-systems 'utf-8-unix) ; UTF-8 が基本
(set-terminal-coding-system 'utf-8-unix) ; emacs -nw も文字化けしない
(setq default-file-name-coding-system 'utf-8)
(setq default-process-coding-system '(utf-8 . utf-8))
(prefer-coding-system 'utf-8-unix)
;; 行番号を常に表示させる
(global-linum-mode)
(setq linum-format "%4d ")
;; font
(add-to-list 'default-frame-alist '(font . "ricty-12"))
;; バックスペースの設定
(global-set-key (kbd "C-h") 'delete-backward-char)
;; color theme
;;(load-theme 'monokai t)
;; Color
(if window-system (progn
(set-background-color "Black")
(set-foreground-color "LightGray")
(set-cursor-color "Gray")
(set-frame-parameter nil 'alpha 70) ;透明度
))
;; メニューバーを非表示
(menu-bar-mode 0)
;; ツールバーを非表示
(tool-bar-mode 0)
;; default scroll bar消去
(scroll-bar-mode -1)
;; スタートアップメッセージを表示させない
(setq inhibit-startup-message 1)
;; ターミナルで起動したときにメニューを表示しない
(if (eq window-system 'x)
(menu-bar-mode 1) (menu-bar-mode 0))
(menu-bar-mode nil)
;; scratchの初期メッセージ消去
(setq initial-scratch-message "")
;; 対応する括弧をハイライト
(show-paren-mode 1)
;; リージョンのハイライト
(transient-mark-mode 1)
;; 現在ポイントがある関数名をモードラインに表示
(which-function-mode 1)
;; スクロールは1行ごとに
(setq mouse-wheel-scroll-amount '(1 ((shift) . 5)))
;; スクロールの加速をやめる
(setq mouse-wheel-progressive-speed nil)
;; active window move
(global-set-key (kbd "<C-left>") 'windmove-left)
(global-set-key (kbd "<C-down>") 'windmove-down)
(global-set-key (kbd "<C-up>") 'windmove-up)
(global-set-key (kbd "<C-right>") 'windmove-right)
(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.
'(package-selected-packages
(quote
(psgml xml-rpc cmake-mode auto-complete neotree elscreen))))
(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.
)
;; elscreen(上部タブ)
(require 'elscreen)
(elscreen-start)
(global-set-key (kbd "\C-t") 'elscreen-create)
(global-set-key "\C-l" 'elscreen-next)
(global-set-key "\C-r" 'elscreen-previous)
(global-set-key (kbd "\C-w") 'elscreen-kill)
(set-face-attribute 'elscreen-tab-background-face nil
:background "grey10"
:foreground "grey90")
(set-face-attribute 'elscreen-tab-control-face nil
:background "grey20"
:foreground "grey90")
(set-face-attribute 'elscreen-tab-current-screen-face nil
:background "grey20"
:foreground "grey90")
(set-face-attribute 'elscreen-tab-other-screen-face nil
:background "grey30"
:foreground "grey60")
;;; [X]を表示しない
(setq elscreen-tab-display-kill-screen nil)
;;; [<->]を表示しない
(setq elscreen-tab-display-control nil)
;;; タブに表示させる内容を決定
(setq elscreen-buffer-to-nickname-alist
'(("^dired-mode$" .
(lambda ()
(format "Dired(%s)" dired-directory)))
("^Info-mode$" .
(lambda ()
(format "Info(%s)" (file-name-nondirectory Info-current-file))))
("^mew-draft-mode$" .
(lambda ()
(format "Mew(%s)" (buffer-name (current-buffer)))))
("^mew-" . "Mew")
("^irchat-" . "IRChat")
("^liece-" . "Liece")
("^lookup-" . "Lookup")))
(setq elscreen-mode-to-nickname-alist
'(("[Ss]hell" . "shell")
("compilation" . "compile")
("-telnet" . "telnet")
("dict" . "OnlineDict")
("*WL:Message*" . "Wanderlust")))
;; neotree(サイドバー)
(require 'neotree)
(global-set-key "\C-o" 'neotree-toggle)
;;; *.~ とかのバックアップファイルを作らない
(setq make-backup-files nil)
;;; .#* とかのバックアップファイルを作らない
(setq auto-save-default nil)