Skip to content

Instantly share code, notes, and snippets.

@kyonmm
Created April 22, 2013 01:42
Show Gist options
  • Select an option

  • Save kyonmm/5431913 to your computer and use it in GitHub Desktop.

Select an option

Save kyonmm/5431913 to your computer and use it in GitHub Desktop.
required skk 他はM-x list-packageで導入する。
(when (eq window-system 'mac)
(add-hook 'window-setup-hook
(lambda ()
;; (setq mac-autohide-menubar-on-maximize t)
(set-frame-parameter nil 'fullscreen 'fullboth)
)))
(defun mac-toggle-max-window ()
(interactive)
(if (frame-parameter nil 'fullscreen)
(set-frame-parameter nil 'fullscreen nil)
(set-frame-parameter nil 'fullscreen 'fullboth)))
;; Carbon Emacsの設定で入れられた. メニューを隠したり.
(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.
'(display-time-mode t)
'(tab-width 2)
'(tool-bar-mode nil)
'(transient-mark-mode t))
(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.
)
;;Color
(if window-system (progn
(set-background-color "Black")
(set-foreground-color "LightGray")
(set-cursor-color "Gray")
(set-frame-parameter nil 'alpha 80)
))
;;font
(add-to-list 'default-frame-alist '(font . "あずきフォント-14"))
(set-face-attribute 'default nil
:family "あずきフォント"
:height 140)
(set-fontset-font "fontset-default"
'japanese-jisx0208
'("あずきフォント" . "jisx0208-sjis"))
;;; line number
(global-linum-mode t)
(set-face-attribute 'linum nil
:foreground "#39c"
:height 0.9)
;;;tab
(setq-default tab-width 2)
(setq default-tab-width 2)
(setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 40 44 48 52 56 60
64 68 72 76 80 84 88 92 96 100 104 108 112 116 120))
;; kill-bufferの確認を除外
(global-set-key (kbd "C-x k")
'(lambda () (interactive)
(let (kill-buffer-query-functions) (kill-buffer))))
;; Emacs終了時に確認
(setq confirm-kill-emacs 'y-or-n-p)
;; Ctrl-Hでバックスペース
(keyboard-translate ?\C-h ?\C-?)
;;括弧,クウォートの補完
(global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "'") 'skeleton-pair-insert-maybe)
(setq skeleton-pair 1)
;; 文字コード
(set-language-environment 'utf-8)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-keyboard-coding-system 'utf-8)
;; (prefer-coding-system 'sjis)
;; (set-default-coding-systems 'sjis)
;; (set-keyboard-coding-system 'sjis)
;;eshellの文字化け防止
(add-hook 'set-language-environment-hook
(lambda ()
(when (equal "ja_JP.UTF-8" (getenv "LANG"))
(setq default-process-coding-system '(utf-8 . utf-8))
(setq default-file-name-coding-system 'utf-8))
(when (equal "Japanese" current-language-environment)
(setq default-buffer-file-coding-system 'iso-2022-jp))))
(set-language-environment "Japanese")
;;; skk
(global-set-key "\C-x\C-j" 'skk-mode)
(add-hook 'dired-load-hook
(lambda ()
(load "dired-x")
(global-set-key "\C-x\C-j" 'skk-mode)
))
;(set-input-method "japanese-skk")
;;インプット方法にSKKを指定する
(setq skk-large-jisyo "D:/Apps/ddskk-14.4/dic/SKK-JISYO.L")
(autoload 'skk-mode "skk" nil t)
(autoload 'skk-tutorial "skk-tut" nil t)
(autoload 'skk-check-jisyo "skk-tools" nil t)
(autoload 'skk-merge "skk-tools" nil t)
(autoload 'skk-diff "skk-tools" nil t)
;;;; □ "「"を入力したら"」"も自動で挿入
(setq skk-auto-insert-paren t)
;; emacsclientを使えるようにする
;;(server-start)
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment