Skip to content

Instantly share code, notes, and snippets.

@itouhiro
Created January 14, 2018 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itouhiro/9cc16c86a16d42663d50098b9a30c571 to your computer and use it in GitHub Desktop.
Save itouhiro/9cc16c86a16d42663d50098b9a30c571 to your computer and use it in GitHub Desktop.
;;; -*- mode: lisp-interaction; syntax: elisp -*-
;; Time-stamp: <Jan 01 2018>
;; CharCode for Windows
(set-keyboard-coding-system 'japanese-shift-jis)
(set-buffer-file-coding-system 'japanese-cp932-dos)
(set-terminal-coding-system 'japanese-cp932-dos)
(set-file-name-coding-system 'japanese-cp932)
;; 標準IMEの設定
(when (locate-library "w32-ime")
(progn
(w32-ime-initialize)
(setq default-input-method "W32-IME")
(setq-default w32-ime-mode-line-state-indicator "[--]")
(setq w32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]"))
; (setq-default w32-ime-mode-line-state-indicator "[Aa]")
; (setq w32-ime-mode-line-state-indicator-list '("[Aa]" "[あ]" "[Aa]"))
;; バッファ切り替え時にIME状態を引き継ぐ
; (setq w32-ime-buffer-switch-p nil)
))
;; clipboard
(setq mouse-drag-copy-region t)
;; hilight line
(setq hl-line-face 'hlline-face)
(defface hlline-face
'((((class color)
(background dark))
; (:background "dark slate gray"))
(:background "#073642"))
(((class color)
(background light))
(:background "#073642"))
(t
()))
"*Face used by hl-line.")
(setq hl-line-face 'hlline-face)
;(setq hl-line-face 'underline)
;; color theme
(load-theme 'deeper-blue t)
;; color
(set-face-foreground 'fringe "gray22")
;; IME ON/OFF時のカーソルカラー
(set-cursor-color "#eee8d5")
(add-hook 'input-method-activate-hook
(lambda() (set-cursor-color "#859900")))
(add-hook 'input-method-inactivate-hook
(lambda() (set-cursor-color "#eee8d5")))
;; Window (Emacs term 'Frame') size
(setq default-frame-alist
(append (list
'(width . 120)
'(height . 51)
'(top . 0)
'(left . 40)
)
default-frame-alist))
;; Font
;(set-default-font "Ricty Discord-10")
;(set-default-font "Ricty Discord-7")
;(set-default-font "mplus-1m-9")
(set-default-font "BDF M+-9")
;; ToolBar
(tool-bar-mode -1)
;; EXTERNAL LIB
;; migemo
;; migemo-forward C-s
;; migemo-backward C-r
;; migemo-toggle-isearch-enable C-xm (default off)
(add-to-list 'load-path "~/.emacs.d/cmigemo-default-win32")
(require 'migemo)
(setq migemo-dictionary "E:/app/emacs/.emacs.d/cmigemo-default-win32/dict/utf-8/migemo-dict")
;(setq migemo-dictionary "~/.emacs.d/cmigemo-default-win32/dict/utf-8/migemo-dict") だとdict読み込みしない。
(setq migemo-command "cmigemo")
(setq migemo-options '("-q" "--emacs" "-i" "\a"))
(setq migemo-user-dictionary nil)
(setq migemo-regex-dictionary nil)
(setq migemo-coding-system 'utf-8-unix)
(load-library "migemo")
(migemo-init)
(global-set-key "\C-xm" 'migemo-toggle-isearch-enable)
(setq migemo-isearch-enable-p nil) ;default
;; EditorConfig
(add-to-list 'load-path "~/.emacs.d/editorconfig-emacs")
(require 'editorconfig)
(editorconfig-mode 1)
; 外部プログラムがあってもなくても Emacs Lisp 実装を用いる
;(set-variable 'editorconfig-get-properties-function
; #'editorconfig-core-get-properties-hash)
;; web-mode
(add-to-list 'load-path "~/.emacs.d/el")
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(defun my-web-mode-hook ()
"Hooks for Web mode."
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)
(setq web-mode-script-padding 0)
(setq web-mode-script-padding 0)
(setq web-mode-block-padding 0)
(setq web-mode-comment-style 2)
)
(add-hook 'web-mode-hook 'my-web-mode-hook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment