Skip to content

Instantly share code, notes, and snippets.

@snickerbockers
Created June 27, 2014 21:20
Show Gist options
  • Save snickerbockers/ebab00e7145e7417a086 to your computer and use it in GitHub Desktop.
Save snickerbockers/ebab00e7145e7417a086 to your computer and use it in GitHub Desktop.
My init.el
(c-add-style "custom-C++"
'("stroustrup"
(c-indent-comments-syntactically-p 1)
(c-offsets-alist
(substatement-open . 0)
(defun-open . 0)
(defun-close . 0)
(defun-block-intro . 4)
(class-open . 0)
(class-close . 0)
(inclass . 4)
(access-label . -4)
(comment-intro . 0)
(c . 1)
(inline-open . 0)
(inline-close . 0)
(innamespace . 0)
;(statement . 4)
)
;; (c-indent-comment-alist
;; (empty-line column . 0)
;; (anchored-comment align . 0))
(setq indent-tabs-mode nil)
(setq c-basic-offset 4)
)
)
(defun custom_c++_mode_hook()
(c-set-style "custom-C++")
(show-paren-mode))
(add-hook 'c++-mode-hook 'custom_c++_mode_hook)
(defun reload-config()
(interactive)
(load-file "~/.emacs"))
(defun edit-config()
(interactive)
(find-file "~/.emacs.d/init.el"))
(column-number-mode)
(require 'whitespace)
(setq whitespace-style '(face tabs lines-tail))
;; (setq whitespace-display-mappings '(
;; (space-mark 32 [187 9])
;; (newline-mark 10 [187 9])
;; (tab-mark 9 [187 9])))
(setq whitespace-line-column 100)
(global-whitespace-mode t)
;(setq-default c-basic-offset 4)
;(c-set-offset 'substatement-open 0)
;(setq-default c-default-style "linux")
(setq-default indent-tabs-mode nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment