Last active
December 18, 2015 23:08
-
-
Save reinforce-lab/5859074 to your computer and use it in GitHub Desktop.
MacでのEmacs設定ファイル。Mac book airでMarkdownを書くため用。
This file contains 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
;; download Emacs-24.3-with-inline-patch.dmg from http://sourceforge.jp/projects/macemacsjp/releases/ | |
;;http://www.emacswiki.org/emacs/FrameSize | |
;; Mac book air 11 の画面全体に表示 | |
(if window-system | |
(set-frame-size (selected-frame) 155 42)) | |
;; http://www.emacswiki.org/emacs/ToolBar | |
;; ツールバーを非表示に | |
(tool-bar-mode -1) | |
;; バックアップを残さない | |
(setq make-backup-files nil) | |
;; C-Ret で矩形選択 | |
;; 詳しいキーバインド操作:http://dev.ariel-networks.com/articles/emacs/part5/ | |
(cua-mode t) | |
(setq cua-enable-cua-keys nil) | |
;; 現在の行をハイライト表示する | |
(global-hl-line-mode) | |
;; カーソルの色をオレンジ色に設定する (白色なら white にする) | |
;;http://margaret-sdpara.blogspot.jp/2012/07/emacs.html | |
(setq default-frame-alist | |
(append (list '(cursor-color . "orange")) default-frame-alist)) | |
;; http://hitode909.hatenablog.com/entry/20110817/1313507601 | |
;; 10秒間操作をしない場合は、2秒周期でカーソルを明滅 | |
;;(set-cursor-color "orange") | |
(setq blink-cursor-interval 1.0) | |
(setq blink-cursor-delay 10.0) | |
(blink-cursor-mode 1) | |
;; http://ap-www.cf.ocha.ac.jp/hito/index.php?emacs.el%A4%CE%C0%DF%C4%EA | |
;;(setq visible-bell t) ;; 警告音を消す | |
(global-set-key "\M-n" 'linum-mode);;行番号 | |
(line-number-mode t);;行数表示 | |
;;ビープ音を消す | |
(setq ring-bell-function 'ignore) | |
;;https://gist.github.com/mitukiii/4365568 | |
(setq default-input-method "MacOSX") | |
;; Google日本語入力を使う場合はおすすめ | |
(mac-set-input-method-parameter "com.google.inputmethod.Japanese.base" `title "あ") | |
;; Monaco 12pt をデフォルトにする | |
(set-face-attribute 'default nil | |
:family "Monaco" | |
:height 130) | |
;; 日本語をヒラギノ角ゴProNにする | |
(set-fontset-font "fontset-default" | |
'japanese-jisx0208 | |
'("Hiragino Maru Gothic ProN")) | |
;; 半角カナをヒラギノ角ゴProNにする | |
(set-fontset-font "fontset-default" | |
'katakana-jisx0201 | |
'("Hiragino Maru Gothic ProN")) | |
;; http://qiita.com/catatsuy/items/c3e4fe2e6c856c285880 | |
;; minibuffer 内は英数モードにする | |
(add-hook 'minibuffer-setup-hook 'mac-change-language-to-us) | |
(mac-translate-from-yen-to-backslash) | |
;; http://d.hatena.ne.jp/aoe-tk/20130210/1360506829 | |
;; テーマを設定 wombat | |
(load-theme 'wombat t) | |
;; markdown-mode http://jblevins.org/projects/markdown-mode/ | |
;; cd ~/.emacs.d/; git clone git://jblevins.org/git/markdown-mode.git | |
(setq load-path (append '("~/.emacs.d/markdown-mode") load-path)) | |
(autoload 'markdown-mode "markdown-mode" | |
"Major mode for editing Markdown files" t) | |
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode)) | |
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) | |
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) | |
;; http://moya-notes.blogspot.jp/2013/02/emacs24-config-on-mac.html#markdown2 | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; [基本] トラックパッド用のスクロール設定 | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(defun scroll-down-with-lines () | |
"" (interactive) (scroll-down 3)) | |
(defun scroll-up-with-lines () | |
"" (interactive) (scroll-up 3)) | |
(global-set-key [wheel-up] 'scroll-down-with-lines) | |
(global-set-key [wheel-down] 'scroll-up-with-lines) | |
(global-set-key [double-wheel-up] 'scroll-down-with-lines) | |
(global-set-key [double-wheel-down] 'scroll-up-with-lines) | |
(global-set-key [triple-wheel-up] 'scroll-down-with-lines) | |
(global-set-key [triple-wheel-down] 'scroll-up-with-lines) | |
;; http://sakito.jp/emacs/emacs23.html#id21 | |
(define-key global-map [ns-drag-file] 'ns-find-file) | |
;; http://www.emacswiki.org/emacs/TransparentEmacs | |
;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>])) | |
(set-frame-parameter (selected-frame) 'alpha '(95 50)) | |
(add-to-list 'default-frame-alist '(alpha 95 50)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment