emacs lisp repository
修订版 | cac56c30732d2ba24ec90536fc90dd697f395592 (tree) |
---|---|
时间 | 2013-06-28 02:00:57 |
作者 | Daisuke Yamashta <yamasdais@gmai...> |
Commiter | Daisuke Yamashta |
added some configurations.
added copyright notation to update-sh
@@ -1,3 +1,10 @@ | ||
1 | +; Package | |
2 | +(require 'package) | |
3 | +(add-to-list | |
4 | + 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
5 | +(package-initialize) | |
6 | + | |
7 | + | |
1 | 8 | ; Global keybind |
2 | 9 | (global-set-key (kbd "C-h") 'delete-backward-char) |
3 | 10 | (global-set-key (kbd "M-g") 'goto-line) |
@@ -5,19 +12,25 @@ | ||
5 | 12 | (interactive) |
6 | 13 | (if (one-window-p) |
7 | 14 | (let () |
8 | - (split-window-vertically) | |
9 | - (next-buffer)) | |
15 | + (split-window-vertically) | |
16 | + (next-buffer)) | |
10 | 17 | (other-window 1))) |
11 | 18 | |
12 | 19 | (global-set-key (kbd "<C-tab>") 'other-window-or-split-by-next-buffer) |
13 | 20 | (global-set-key (kbd "<C-S-iso-lefttab>") 'previous-multiframe-window) |
21 | + | |
14 | 22 | ; indent |
15 | 23 | (setq-default tab-width 4) |
16 | 24 | (tool-bar-mode -1) ;; Disable tool bar |
17 | 25 | |
18 | 26 | ; Frame size |
19 | 27 | (if window-system |
20 | - (set-frame-size (selected-frame) 80 52)) | |
28 | + (set-frame-size (selected-frame) 80 52)) | |
29 | + | |
30 | +; Parenthesis | |
31 | +(show-paren-mode t) | |
32 | +(setq show-paren-delay 0) | |
33 | +(setq show-paren-style 'single) | |
21 | 34 | |
22 | 35 | ; Buffer switcher |
23 | 36 | (iswitchb-mode 1) |
@@ -25,27 +38,64 @@ | ||
25 | 38 | ; Mode hook |
26 | 39 | (add-hook |
27 | 40 | 'c-mode-common-hook |
28 | - (function (lambda () | |
29 | - (c-set-style "stroustrup") | |
30 | - (setq show-paren-delay 0) | |
31 | - (setq show-paren-style 'single) | |
32 | - (show-paren-mode t) | |
33 | - | |
34 | - (setq indent-tabs-mode nil) | |
35 | - (setq c-basic-offset 2) | |
36 | - (c-set-offset 'brace-list-entry 0) | |
37 | - (c-set-offset 'inline-open 0) | |
38 | - (c-set-offset 'statement-cont 0) | |
39 | - (c-set-offset 'arglist-close 0) | |
40 | - ))) | |
41 | + (function | |
42 | + (lambda () | |
43 | + (c-set-style "stroustrup") | |
44 | + | |
45 | + (setq indent-tabs-mode nil) | |
46 | + (setq c-basic-offset 2) | |
47 | + (c-set-offset 'brace-list-entry 0) | |
48 | + (c-set-offset 'inline-open 0) | |
49 | + (c-set-offset 'statement-cont 0) | |
50 | + (c-set-offset 'arglist-close 0) | |
51 | + ))) | |
41 | 52 | |
42 | 53 | (add-hook |
43 | 54 | 'c++-mode-hook |
44 | - (function (lambda () | |
45 | - (c-set-offset 'innamespace 0) | |
46 | - (c-set-offset 'access-label '/) | |
47 | - ))) | |
55 | + (function | |
56 | + (lambda () | |
57 | + (c-set-offset 'innamespace 0) | |
58 | + (c-set-offset 'access-label '/) | |
59 | + ))) | |
60 | + | |
61 | +; Emacs-Lisp mode hook | |
62 | +(require 'eldoc) | |
63 | +(add-hook | |
64 | + 'emacs-lisp-mode-hook | |
65 | + (function | |
66 | + (lambda () | |
67 | + (setq indent-tabs-mode nil) | |
68 | + ))) | |
69 | +(setq eldoc-echo-area-user-multiline-p t) | |
70 | +(add-hook | |
71 | + 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) | |
72 | +(add-hook | |
73 | + 'lisp-interaction-mode-hook 'turn-on-eldoc-mode) | |
74 | + | |
75 | +; Shell-mode hook | |
76 | +(add-hook | |
77 | + 'sh-mode-hook | |
78 | + (function | |
79 | + (lambda () | |
80 | + (setq indent-tabs-mode nil) | |
81 | + (setq sh-basic-offset 2) | |
82 | + ))) | |
48 | 83 | |
49 | 84 | ; Line, column number |
50 | 85 | (line-number-mode 1) |
51 | 86 | (column-number-mode 1) |
87 | + | |
88 | +;; recentf | |
89 | +(when (require 'recentf nil t) | |
90 | + (setq recentf-max-saved-items 100) | |
91 | + (setq recentf-exclude '(".recentf")) | |
92 | + (setq recentf-auto-cleanup 10) | |
93 | + (setq recentf-auto-save-timer | |
94 | + (run-with-idle-timer 30 t 'recentf-save-list)) | |
95 | + (recentf-mode 1) | |
96 | + ) | |
97 | + | |
98 | +;; Popwin | |
99 | +;; Have installed this package from "melpa" | |
100 | +;(require 'popwin) | |
101 | +;(popwin-mode 1) |
@@ -1,6 +1,21 @@ | ||
1 | 1 | #!/bin/bash |
2 | 2 | # -*- Shell-script -*- |
3 | 3 | |
4 | +# Copyright (C) 2013 Daisuke Yamashta | |
5 | +# | |
6 | +# This program is free software: you can redistribute it and/or modify | |
7 | +# it under the terms of the GNU General Public License as published by | |
8 | +# the Free Software Foundation, either version 3 of the License, or | |
9 | +# (at your option) any later version. | |
10 | +# | |
11 | +# This program is distributed in the hope that it will be useful, | |
12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | +# GNU General Public License for more details. | |
15 | +# | |
16 | +# You should have received a copy of the GNU General Public License | |
17 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | + | |
4 | 19 | MODE=0755 |
5 | 20 | FORCE_COPY=0 |
6 | 21 |