-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.el
More file actions
94 lines (78 loc) · 2.22 KB
/
init.el
File metadata and controls
94 lines (78 loc) · 2.22 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
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
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(add-to-list 'load-path "~/.emacs.d/")
;; switch buffers by shift + arrow
(load "switch-buffer")
;; shift region by Meta + Shift + arrow
(load "shift-region")
;; swap 2 windows by C-s
(load "swap-windows")
;; load local options
(load "general-options")
;; load keys definitions
(load "keys")
;; ansi-color to enable color output in shell
(load-library "ansi-color")
(ansi-color-for-comint-mode-on)
;; useful modes
(require 'midnight)
(setq clean-buffer-list-delay-general)
(require 'ido)
(setq ido-save-directory-list-file "~/.emacs.d/ido.last")
(ido-mode t)
(require 'ffap)
(require 'uniquify)
;;(require 'recentf)
;;(recentf-mode t)
;; save sessions
(setq desktop-path '("~/.emacs.d/"))
(setq desktop-dirname "~/.emacs.d/")
(setq desktop-base-file-name "desktop")
(desktop-save-mode t)
;; remember last position in the file
;;(require 'saveplace)
;;(setq-default save-place t)
;;(setq save-place-file "~/.emacs.d/save-place")
;;(setq save-place-limit 500)
;; YASnippets
(add-to-list 'load-path "~/.emacs.d/yasnippet")
(require 'yasnippet)
(yas/initialize)
(setq yas/root-directory '("~/.emacs.d/yasnippet/snippets"
"~/.emacs.d/yasnippet/mysnippets"))
(mapc 'yas/load-directory yas/root-directory)
;; git
(require 'git)
(require 'gitsum)
(require 'magit)
;; TAGS
(defun create-tags (dir-name)
"Create tags file."
(interactive "DDirectory: ")
(shell-command
(format "ctags-exuberant -f %s/TAGS -e -R %s" dir-name dir-name))
)
;;rpm spec
(autoload 'rpm-spec-mode "rpm-spec-mode.el" "RPM spec mode." t)
(setq auto-mode-alist (append '(("\\.spec" . rpm-spec-mode))
auto-mode-alist))
;; My Python settings
(load "python-settings")
;; My Erlang settings
;;(load "erlang-settings")
;; My C settings
(load "c-settings")
;; set color theme
(add-to-list 'load-path "~/.emacs.d/color-theme")
(require 'color-theme)
;;(setq color-theme-is-global t)
;; Set different themes for X and nox modes
(if window-system
(progn
(require 'color-theme-tango)
(color-theme-tango))
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-billw))))