Skip to content

Instantly share code, notes, and snippets.

@knishioka
Last active February 19, 2019 13:19
Show Gist options
  • Save knishioka/d49cd72d7fa39b41440e0ed9e8e4b579 to your computer and use it in GitHub Desktop.
Save knishioka/d49cd72d7fa39b41440e0ed9e8e4b579 to your computer and use it in GitHub Desktop.
.emacsの雛形
; Package
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
; highlight brackets
(show-paren-mode 1)
; highlight region
(transient-mark-mode t)
; disable backup file
(setq backup-inhibited t)
; disable start-up message
(setq inhibit-startup-message t)
; comment color
(set-face-foreground 'font-lock-comment-face "#cc0000")
; key bind
(global-set-key "\C-h" 'backward-delete-char)
; show traling space
(setq-default show-trailing-whitespace t)
; limit 79
(add-hook 'python-mode-hook
(lambda ()
(font-lock-add-keywords nil
'(("^[^\n]\\{79\\}\\(.*\\)$" 1 font-lock-warning-face t)))))
(add-hook 'ruby-mode-hook
(lambda ()
(font-lock-add-keywords nil
'(("^[^\n]\\{79\\}\\(.*\\)$" 1 font-lock-warning-face t)))))
; prevent indent tabs
(setq-default indent-tabs-mode nil)
(electric-indent-mode -1)
; drill instructor
; need to install drill instructor in ~/.ssh/drill-insructor
; wget https://raw.githubusercontent.com/knishioka/emacs-drill-instructor/master/drill-instructor.el \
; -P ~/.emacs.d/drill-instructor/
(add-to-list 'load-path "~/.emacs.d/drill-instructor/")
(require 'drill-instructor)
(setq drill-instructor-global t)
(put 'upcase-region 'disabled nil)
;; helm
; (require 'helm-config)
; (helm-mode 1)
; (define-key global-map (kbd "M-x") 'helm-M-x)
; (define-key global-map (kbd "C-x C-f") 'helm-find-files)
; (define-key global-map (kbd "C-x C-r") 'helm-recentf)
; (define-key helm-map (kbd "C-h") 'delete-backward-char)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment