Last active
October 7, 2015 05:18
-
-
Save seriwb/9198158 to your computer and use it in GitHub Desktop.
Emacs init.el
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
;; C-mにnewline-and-indexを割り当てる。初期値はnewline | |
(define-key global-map (kbd "C-m") 'newline-and-indent) | |
;; C-hで前を削除 | |
(keyboard-translate ?\C-h ?\C-?) | |
;; ヘルプをC-x ?に変更 | |
(define-key global-map (kbd "C-x ?") 'help-command) | |
;; 折り返しのコマンド | |
(define-key global-map (kbd "C-c l") 'toggle-truncate-lines) | |
;; ウィンドウの切り替え | |
(define-key global-map (kbd "C-t") 'other-window) | |
;; Mac OS Xのファイル名の設定 | |
(when (eq system-type 'darwin) | |
(require 'ucs-normalize) | |
(set-file-name-coding-system 'utf-8-hfs) | |
(setq locale-coding-system 'utf-8-hfs)) | |
;; 文字数表示 | |
(column-number-mode t) | |
;; タイトルバーにファイルのフルパスを表示 | |
(setq frame-title-format "%f") | |
;; Tab幅を8から4に | |
(setq-default tab-width 4) | |
;; text-modeでTab幅を4にする | |
(add-hook 'text-mode-hook | |
'(lambda() | |
(define-key text-mode-map "\C-i" 'tab-to-tab-stop) | |
(define-key text-mode-map [backtab] 'backtab) | |
(setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128)) | |
(setq indent-tabs-mode nil))) | |
;; フォントの変更(Mac用) | |
;; nilを"fontset-default"にしてもOK | |
(when (eq system-type 'darwin) | |
(set-fontset-font | |
nil 'japanese-jisx0208 | |
(font-spec :family "ヒラギノ丸ゴ Pro")) | |
;; 等幅設定 | |
(setq face-font-rescale-alist | |
'((".*Monaco.*" . 1.0) | |
(".*Hiragino_Maru_Gothic_Pro.*" . 1.2)))) | |
;; package.el用 | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(package-initialize) | |
(unless (package-installed-p 'scala-mode2) | |
(package-refresh-contents) (package-install 'scala-mode2)) | |
;; ビープ音の削除 | |
(setq ring-bell-function 'ignore) | |
;; C-c c で compile コマンドを呼び出す | |
(define-key mode-specific-map "c" 'compile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment