LoginSignup
0
0

More than 5 years have passed since last update.

.emacs.dをさらす

Posted at
  • 特段,人様にお見せするような工夫はしていない
  • よく使うコマンドをよく慣れたキーバインドにする
  • 自分のためにさらす
  • vimこわい

;; -- mode: emacs-lisp; coding: utf-8; indent-tabs-mode: nil --

;;
;;
;; emacs-24.3/bin/.emacs.d/init.el
;; 20131215
;; for Windows GNU Emacs
;; Dropboxにおくこと

;;=============================================================
;; set encode utf-8
;;
(set-language-environment 'utf-8)
(set-default-coding-systems 'utf-8)

;;==============================================================
;; set font
;;
(when window-system
(progn
(set-default-font "Inconsolata-14")
(set-fontset-font (frame-parameter nil 'font)
'japanese-jisx0208
(font-spec :family "Meiryo UI" :size 18 ))
(setq default-frame-alist
(append
'(
(width . 80)
(height . 45)
(font . "Inconsolata-14")
)
default-frame-alist))
))

;;=============================================================
;; set color
;;

;; 正規表現
(set-face-foreground 'font-lock-regexp-grouping-backslash "#66CC99")
(set-face-foreground 'font-lock-regexp-grouping-construct "#9966CC")

;; カーソル行 rv環境で使うこと前提
(global-hl-line-mode t)
(set-face-background 'hl-line "darkslategray")

;; カーソル色
(defun update-cursor-color ()
(interactive)
(if current-input-method (set-cursor-color "#91C3FF")
(set-cursor-color "#AAAAAA")))
(update-cursor-color)
(run-with-idle-timer 10 t 'update-cursor-color)

(add-hook 'input-method-activate-hook
(lambda () (set-cursor-color "#91C3FF")))
(add-hook 'input-method-inactivate-hook
(lambda () (set-cursor-color "#AAAAAA")))

(when (and (eq window-system 'ns) (= emacs-major-version 23))
;; when IME is ON
(mac-set-input-method-parameter
"com.google.inputmethod.Japanese.base" 'title "G"))

(when (and (eq window-system 'ns) (= emacs-major-version 24))
;; when IME is ON
(mac-set-input-method-parameter
"com.google.inputmethod.Japanese.base" 'title "グ"))

;; カーソル点滅
(blink-cursor-mode -1)

;;==============================================================
;; key bind
;;
(define-key global-map (kbd "C-z") 'undo) ; undo
(define-key global-map (kbd "C-o") 'comment-dwim) ; コメントアウト
(define-key global-map (kbd "C-a") 'mark-whole-buffer) ; 全て選択
(define-key global-map (kbd "C-+") 'text-scale-increase) ; フォントサイズ拡大
(define-key global-map (kbd "C--") 'text-scale-decrease) ; フォントサイズ縮小

(add-hook 'python-mode-hook '(lambda () (hs-minor-mode 1)))
(define-key global-map (kbd "C-\") 'hs-toggle-hiding) ; ブロックをたたむ

;;=============================================================
;; back ground color

(custom-set-faces
'(default ((t
(:background "black" :foreground "LightCyan")
))))

;;透過
(add-to-list 'default-frame-alist '(alpha . (0.85 0.85)))
;; ======================================================
;; line number
;;
(custom-set-variables
'(global-linum-mode t))

;;==========================================================
;; others
;;
(tool-bar-mode 0) ;ツールバーを消す
(setq make-backup-files nil) ;バックアップファイルを作らない
(setq auto-save-default nil) ;オートセーブ無効

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0