-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathemacs
84 lines (62 loc) · 1.68 KB
/
emacs
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
; disable tool-bar-mode
(setq tool-bar-mode -1)
;; cololum and line number on minibuffer
(setq column-number-mode t)
(setq line-number-mode t)
; no startup message
(setq inhibit-startup-message t)
; image file mode
(setq auto-image-file-mode t)
; display time
(display-time-mode t)
(setq display-time-24hr-format t)
; y/n instead of yes/no
(fset 'yes-or-no-p 'y-or-n-p)
; show match parenthsis
(show-paren-mode t)
; selection-highlighting
(transient-mark-mode t)
; no TAB!, use C-q TAB
(setq indent-tabs-mode nil)
(setq default-tab-width 4)
; color in shell-mode
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on t)
; always use bash in ansi-term
(defvar my-term-shell "/bin/bash")
(defadvice ansi-term (before force-bash)
(interactive (list my-term-shell)))
(ad-activate 'ansi-term)
; anti idle for BBS
(defvar antiidle)
(defun enable-anti-idle ()
(interactive)
(setq antiidle
(run-with-timer 0 180 '(lambda ()
(term-send-up)
(term-send-down)))))
(defun disable-anti-idle ()
(interactive)
(cancel-timer antiidle))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; plugins
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'load-path "~/.emacs.d/")
; irc clinet on emacs
(require 'erc)
; git-emacs
(add-to-list 'load-path "~/.emacs.d/plugins/git-emacs")
(require 'git-emacs)
; ibuffer-mode
(global-set-key (kbd "C-x C-b") 'ibuffer)
(autoload 'ibuffer "ibuffer" "List buffers." t)
; ido
(require 'ido)
(ido-mode t)
; desktop
(load "desktop")
(desktop-load-default)
(desktop-read)
;; python-mode
(add-to-list 'load-path "~/.emacs.d/plugins/python-mode")
(autoload 'python-mode "python-mode" "Python editing mode." t)