-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el~
151 lines (130 loc) · 5.17 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
146
147
148
149
150
151
;; load emacs 24's package system. Add MELPA repository.
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(when (>= emacs-major-version 24)
(require 'package)
(add-to-list
'package-archives
;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
'("melpa" . "http://melpa.milkbox.net/packages/")
t))
; (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.
; '(dired-mode-hook
; (cons
; (quote tramp-theme-hook-function)
; (delete
; (quote tramp-theme-hook-function)
; dired-mode-hook)))
; '(eshell-directory-change-hook
; (cons
; (quote tramp-theme-hook-function)
; (delete
; (quote tramp-theme-hook-function)
; eshell-directory-change-hook)))
; '(find-file-hook
; (cons
; (quote tramp-theme-hook-function)
; (delete
; (quote tramp-theme-hook-function)
; find-file-hook)))
; '(global-linum-mode t)
; '(line-number-mode t)
; '(mode-line-buffer-identification
; (quote
; (:eval
; (tramp-theme-mode-line-buffer-identification))) t)
; '(package-selected-packages
; (quote
; (ahungry-theme tramp-theme addressbook-bookmark dash emmet-mode gitignore-mode request helm-ack helm-ad helm-addressbook helm-ag helm-ag-r helm-dictionary helm-directory helm-emmet helm-git helm-gitignore helm-pydoc helm-themes python-info python-mode async helm-core popup helm)))
; '(red "#ffffff"))
; (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.
; )
;; helm mode ayarlari
(require 'helm-config)
(global-set-key (kbd "M-x") #'helm-M-x)
(global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks)
(global-set-key (kbd "C-x C-f") #'helm-find-files)
;;
;; helm mode'u baslangicta calistirıyor
(helm-mode 1)
;;
;; parantezleri otomatik çiftliyor
(electric-pair-mode 1)
;;
;; gereksiz ust menuyu(toolbar) kaldırıyor
;;(tool-bar-mode -1)
;;(menu-bar-mode -1)
;;(scroll-bar-mode -1)
;;
;; emacsi terminalden kullanirken disardan kopyala yapistir yapabilmeyi sagliyor
;; once sudo apt-get install xclip
(xclip-mode 1)
;;auto-complete with emacs i başlatıyor
(require 'auto-complete)
;;default ayarları hallediyor auto-complete için
(require 'auto-complete-config)
(ac-config-default)
;;yasnippet i başlatma auto complete devamı
(require 'yasnippet)
(yas-global-mode 1)
;;initialize auto-complete-c-headers
(defun my:acc-c-header-init ()
(require 'auto-complete-c-headers))
;;yazdığımız fonksiyonu c/c++ hooks tan çağırıyoruz
(add-hook 'c++-mode-hook 'my:acc-c-header-init)
(add-hook 'c-mode-hook 'my:acc-c-header-init)
(add-to-list 'achead:include-directories '"/Library/Developer/CommandLineTools/usr/include")
;; bir yaziyi sectikten sonra yazmaya baslarsan secili yeri silip oyle yaziyor
(delete-selection-mode 1)
;; once kelimeyi sonra parantezin icini sonra fonksiyonun icini... seciyor
(global-set-key (kbd "C-t") 'er/expand-region)
;; satir sayilarini gosteriyor
;;(global-linum-mode 1)
;; flycheck'i (syntax check) acilista calistiriyor
(add-hook 'after-init-hook #'global-flycheck-mode)
;; eslesen parantezleri, koseli parantezleri vs esliyor
(show-paren-mode 1)
;; backup dosyalarinin (~ ile bitenler) calisilan klasor yerine
;; "/tmp" klasorunde olusturulmasını ve saklanmasini sagliyor
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
;; ahungry temasini acilista calistiriyor
(load-theme 'ahungry t)
;; load theme yapinca eskilerin disable olmasini sagliyor
(defun disable-all-themes ()
"disable all active themes."
(dolist (i custom-enabled-themes)
(disable-theme i)))
(defadvice load-theme (before disable-themes-first activate)
(disable-all-themes))
(setq c-default-style "linux"
c-basic-offset 4)
;; auto-complete-mode'u baslangicta calistiriyor
;;(global-auto-complete-mode t)
(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
(auto-complete-c-headers yasnippet auto-complete xclip tramp-theme python-mode python-info helm-themes helm-pydoc helm-gitignore helm-git helm-emmet helm-directory helm-dictionary helm-ag-r helm-ag helm-addressbook helm-ad helm-ack ahungry-theme))))
(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.
)