-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
153 lines (114 loc) · 4.23 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
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
152
;;; mh.emacs --- Summary
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
(package-initialize)
;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(setq make-backup-files nil) ;; stop creating those backup~ files
(setq auto-save-default nil) ;; stop creating those #autosave# files
;; keine "yes-or-no"-Fragen - "y-or-n" reicht aus
(defalias 'yes-or-no-p 'y-or-n-p)
;; Zusammengehoerende Klammern hervorheben
(show-paren-mode 1)
;; Text zwischen den Klammern nicht hervorheben
(setq show-paren-style 'parenthesis)
(use-package which-key
:ensure t
:config
(which-key-mode))
; Buffer Menu
(global-set-key (kbd "C-x C-b") 'buffer-menu)
(use-package flycheck
:ensure t
:init
(global-flycheck-mode t))
(require 'xcscope)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)
(cscope-setup)
;(setq cscope-command-args -R )
;(add-hook 'vhdl-mode-hook (function cscope-minor-mode))
(require 'ecb)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)
(require 'cedet)
(global-ede-mode t)
; Make umlauts work
(set-language-environment 'german)
(set-terminal-coding-system 'utf-8-emacs)
(setq c-default-style "linux"
c-basic-offset 4)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(R . t) (perl . t) (C . t) ))
;; Frame title bar formatting to show full path of file
(setq-default
frame-title-format
(list '((buffer-file-name " %f" (dired-directory
dired-directory
(revert-buffer-function " %b"
("%b - Dir: " default-directory)))))))
(setq-default
icon-title-format
(list '((buffer-file-name " %f" (dired-directory
dired-directory
(revert-buffer-function " %b"
("%b - Dir: " default-directory)))))))
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
;; --------- Smart-tabs -------------
(setq-default c-basic-offset 4
tab-width 4
indent-tabs-mode nil)
(smart-tabs-add-language-support c++ c++-mode-hook
((c-indent-line . c-basic-offset)
(c-indent-region . c-basic-offset)))
(smart-tabs-advice vhdl-indent-line vhdl-basic-offset)
(smart-tabs-insinuate 'c 'c++ 'javascript)
;; ------ Flycheck ------------------
(add-hook 'after-init-hook #'global-flycheck-mode)
(use-package flycheck
:ensure t
:init (global-flycheck-mode))
(flycheck-define-checker vhdl-nvc
"A VHDL syntax checker using nvc."
:command ("nvc" "--message=compact" "-a" source)
:error-patterns ((error line-start (file-name) ":" line ":" column ": error: " (message) line-end))
:modes vhdl-mode)
;; ---------------------------------------------------
'(package-selected-packages
(quote
(which-key use-package s flymake-cppcheck flycheck-elixir flycheck-cython eval-in-repl ecb cppcheck)))
'(show-trailing-whitespace t)
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
;; ----------------------------------
(add-hook 'term-exec-hook
(function
(lambda ()
(set-buffer-process-coding-system 'utf-8-unix 'utf-8-unix))))
(prefer-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(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.
)
(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.
'(show-trailing-whitespace t)
'(vhdl-indent-tabs-mode nil))