Created
May 25, 2013 11:22
-
-
Save ayato-p/5648750 to your computer and use it in GitHub Desktop.
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
; auto-async-byte-compile | |
; (require 'auto-async-byte-compile) | |
; 対応する括弧を表示する | |
(show-paren-mode t) | |
; 起動するときに起動画面を表示しない | |
(setq inhibit-startup-message t) | |
(setq initial-scratch-message "") | |
;; ツールバーを非表示 | |
(tool-bar-mode -1) | |
; *.~ とかのバックアップファイルを作らない | |
(setq make-backup-files nil) | |
; .#* とかのバックアップファイルを作らない | |
(setq auto-save-default nil) | |
; ^H を BackSpace | |
(global-set-key "\C-h" 'delete-backward-char) | |
; comman -> ctrl | |
(setq ns-command-modifier (quote control)) | |
; auto-install | |
(add-to-list 'load-path "~/.emacs.d/auto-install/") | |
(require 'auto-install) | |
(auto-install-update-emacswiki-package-name t) | |
(setq ediff-window-setup-function 'ediff-setup-windows-plain) | |
; auto-async-byte-compile | |
(require 'auto-async-byte-compile) | |
(setq auto-async-byte-compile-exclude-files-regexp "/junk/") | |
(add-hook 'emacs-lisp-mode-hook 'enable-auto-async-byte-compile-mode) | |
; gauche | |
(setq process-coding-system-alist | |
(cons '("gosh" utf-8 . utf-8) process-coding-system-alist)) | |
;; goshインタプリタのパスに合わせます。-iは対話モードを意味します。 | |
(setq gosh-program-name "/usr/local/bin/gosh -i") | |
;; schemeモードとrun-schemeモードにcmuscheme.elを使用します。 | |
;; scheme-mode => gauche-mode | |
(autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t) | |
(autoload 'run-scheme "cmuscheme" "Run an inferior Scheme process." t) | |
;; (setq auto-mode-alist | |
;; (cons '("\.\(scm\)$" . gauche-mode) auto-mode-alist)) | |
;; (autoload 'gauche-mode "gauche-mode" "Major mode for Scheme." t) | |
;; (autoload 'run-scheme "gauche-mode" "Run an inferior Scheme process." t) | |
;; ウィンドウを2つに分け、一方でgoshインタプリタを実行するコマンドを定義します。 | |
(defun scheme-other-window () | |
"Run scheme on other window" | |
(interactive) | |
(switch-to-buffer-other-window | |
(get-buffer-create "*scheme*")) | |
(run-scheme gosh-program-name)) | |
;; そのコマンドをCtrl-cSで呼び出します。 | |
(define-key global-map | |
"\C-cg" 'scheme-other-window) | |
; auto-complite | |
(when (require 'auto-complete nil t) | |
(global-auto-complete-mode t) | |
(define-key ac-complete-mode-map "\C-n" 'ac-next) | |
(define-key ac-complete-mode-map "\C-p" 'ac-previous)) | |
; scheme-mode-hook | |
(defvar ac-source-scheme | |
'((candidates | |
. (lambda () | |
(require 'scheme-complete) | |
(all-completions ac-target (car (scheme-current-env)))))) | |
"Source for scheme keywords.") | |
;;gauche-manual | |
(autoload 'gauche-manual "gauche-manual" "jump to gauche online manual." t) | |
(add-hook 'scheme-mode-hook | |
'(lambda () | |
(make-local-variable 'ac-sources) | |
(define-key scheme-mode-map "\C-c\C-f" 'gauche-manual) | |
(setq ac-sources (append ac-sources '(ac-source-scheme))))) | |
;; gauche info | |
(defvar anything-c-source-info-gauche-refj | |
;; '((info-index . "~/../gauche/share/info/gauche-refj.info"))) | |
'((info-index . "gauche-refj.info"))) | |
(defun anything-info-ja-at-point () | |
"Preconfigured `anything' for searching info at point." | |
(interactive) | |
(anything '(anything-c-source-info-gauche-refj) | |
(thing-at-point 'symbol) nil nil nil "*anything info*")) | |
(define-key global-map (kbd "\C-\M-;") 'anything-info-ja-at-point) | |
; e2wm | |
(require 'e2wm) | |
(global-set-key "\M-+" 'e2wm:start-management) | |
; emacs whitespace | |
(setq whitespace-style | |
'(tabs tab-mark spaces space-mark)) | |
(setq whitespace-space-regexp "\\(\x3000+\\)") | |
(setq whitespace-display-mappings | |
'((space-mark ?\x3000 [?\□]) | |
(tab-mark ?\t [?\xBB ?\t]) | |
)) | |
(require 'whitespace) | |
(global-whitespace-mode 1) | |
(set-face-foreground 'whitespace-space "LightSlateGray") | |
(set-face-background 'whitespace-space "DarkSlateGray") | |
(set-face-foreground 'whitespace-tab "LightSlateGray") | |
(set-face-background 'whitespace-tab "DarkSlateGray") | |
;文字コード Mac origin | |
(create-fontset-from-ascii-font "Menlo-14:weight=normal:slant=normal" nil "menlokakugo") | |
(set-fontset-font "fontset-menlokakugo" 'unicode (font-spec :family "Hiragino Kaku Gothic ProN" ) nil 'append) | |
(add-to-list 'default-frame-alist '(font . "fontset-menlokakugo")) | |
(setq face-font-rescale-alist '((".*Hiragino.*" . 1.0) (".*Menlo.*" . 1.0))) | |
; zencoding-mode | |
(add-to-list 'load-path "~/.emacs.d/zencoding/") | |
(require 'zencoding-mode) | |
(add-hook 'sgml-mode-hook 'zencoding-mode) | |
(add-hook 'html-mode-hook 'zencoding-mode) | |
(add-hook 'text-mode-hook 'zencoding-mode) | |
;;(define-key zencoding-mode-keymap "\C-." 'zencoding-expand-line) | |
; markdown-mode | |
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t) | |
(setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist)) | |
(setq markdown-command-needs-filename t) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment