Created
August 16, 2017 18:23
-
-
Save wangkuiyi/2365b834411225708ed79aab010d3d14 to your computer and use it in GitHub Desktop.
Yi's Emacs configuration
This file contains hidden or 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
(setq-default indent-tabs-mode nil) | |
(show-paren-mode 1) | |
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.milkbox.net/packages/")) | |
(package-initialize) | |
(setq-default line-spacing 5) | |
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) | |
(add-to-list 'auto-mode-alist '("\\.cu\\'" . c++-mode)) | |
(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. | |
'(custom-enabled-themes (quote (sanityinc-tomorrow-blue))) | |
'(custom-safe-themes | |
(quote | |
("82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" default))) | |
'(package-selected-packages | |
(quote | |
(color-theme-sanityinc-tomorrow dockerfile-mode protobuf-mode graphviz-dot-mode cmake-mode markdown-mode google-c-style)))) | |
(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. | |
) | |
(add-hook 'c-mode-common-hook 'google-set-c-style) | |
(add-hook 'c-mode-common-hook 'google-make-newline-indent) | |
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph | |
(defun unfill-paragraph (&optional region) | |
"Takes a multi-line paragraph and makes it into a single line of text." | |
(interactive (progn (barf-if-buffer-read-only) '(t))) | |
(let ((fill-column (point-max)) | |
;; This would override `fill-column' if it's an integer. | |
(emacs-lisp-docstring-fill-column t)) | |
(fill-paragraph nil region))) | |
;; Handy key definition | |
(define-key global-map "\M-Q" 'unfill-paragraph) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(global-set-key "\C-cc" 'compile) | |
(setq compile-command "docker run --rm -it -v $(git rev-parse --show-toplevel):/paddle paddle:dev") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment