Last active
July 20, 2018 15:16
-
-
Save emgoeddel/5143516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; File opening util | |
(ido-mode 1) | |
;; No GUI things, thanks | |
(scroll-bar-mode -1) | |
(setq inhibit-startup-message t) | |
(tool-bar-mode 0) | |
;; Tabs are evil | |
(setq-default indent-tabs-mode nil) | |
(setq tab-stop-list (number-sequence 4 120 4)) | |
;; Check parens and trailing whitespace | |
(show-paren-mode 1) | |
(setq-default show-trailing-whitespace t) | |
;; Show where I am in a file | |
(which-func-mode 1) | |
;; Highlight lines over 80 characters | |
(add-hook 'c-mode-common-hook | |
(lambda () | |
(font-lock-add-keywords nil | |
'(("^[^\n]\\{80\\}\\(.*\\)$" 1 font-lock-warning-face t))))) | |
;; Highlight current line with custom bg color | |
(require 'highlight-current-line) | |
(highlight-current-line-on t) | |
(set-face-background 'highlight-current-line-face "#27292a") | |
;; Nonstandard color themes | |
(add-to-list 'load-path "/usr/share/emacs23/site-lisp/emacs-goodies-el/") | |
(require 'color-theme) | |
(color-theme-initialize) | |
(color-theme-midnight) | |
;; Get decent indentation | |
(setq c-default-style "stroustrup" | |
c-basic-offset 4) | |
(defun no-namespace-indent () | |
(c-set-offset 'innamespace [0])) | |
(add-hook 'c++-mode-hook 'no-namespace-indent) | |
;; Make sure to use cpp mode when appropriate | |
(setq auto-mode-alist (append '(("\\.cpp$" . c++-mode) | |
("\\.cc$" . c++-mode) | |
("\\.hpp$" . c++-mode) | |
("\\.h$" . c++-mode) | |
) auto-mode-alist)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment