Create a gist now

Instantly share code, notes, and snippets.

@yancya /init.el
Last active Dec 10, 2015

What would you like to do?
今の emacs の設定ファイル
;;scratch の初期メッセージを消す
(setq initial-scratch-message "")
(tool-bar-mode -1)
(setq inhibit-startup-message t)
;; 対応するカッコを強調表示
(show-paren-mode t)
(set-language-environment 'Japanese)
(prefer-coding-system 'utf-8)
;; ¥の代わりにバックスラッシュ
(define-key global-map [] [?\\])
(set-frame-parameter (selected-frame) 'alpha '(95 50))
(setq-default indent-tabs-mode nil)
;; C-k で行全体を削除(改行を含む)
(setq kill-whole-line t)
(global-unset-key (kbd "C-l"))
(global-set-key (kbd "C-l C-l") 'recenter-top-bottom)
(global-set-key (kbd "C-m") 'newline-and-indent)
(cua-mode t)
(setq cua-enable-cua-keys nil) ; そのままだと C-x が切り取りになってしまったりするので無効化
;;Ctrl+TAB で次のバッファーへ移動する
(global-set-key (kbd "<C-tab>") 'next-buffer)
(global-set-key (kbd "<C-S-tab>") 'previous-buffer)
;; "C-t" でウィンドウを切り替える
(define-key global-map (kbd "C-t") 'other-window)
(require 'linum)
(global-set-key (kbd "C-x C-g") 'goto-line)
(setq linum-format "%3d")
(column-number-mode t)
(size-indication-mode t)
(display-time-mode t)
(setq display-time-24hr-format t)
(setq frame-title-format "%b %f %& %Z")
(setq-default tab-width 4)
(if (boundp 'window-system)
(setq default-frame-alist
(append (list
'(foreground-color . "white") ;文字色:白
'(background-color . "black") ;背景色:黒
'(top . 100) ;ウィンドウの表示位置(Y座標)
'(left . 150) ;ウィンドウの表示位置(X座標)
'(width . 105) ;ウィンドウ幅
'(height . 35) ;ウィンドウ高
(setq initial-frame-alist default-frame-alist)
;;WQHD 画面を使ってるときに、使いたい
(defun frame-to-center ()
"frame to center"
(set-frame-size (selected-frame) 130 65)
(set-frame-position (selected-frame) 800 30))
(global-set-key (kbd "C-l c") 'frame-to-center)
(eval-after-load "sql"
(load-library "sql-indent")
(load-library "sql-complete")
(load-library "sql-transform")))
;;Font 設定
(when (>= emacs-major-version 23)
(set-face-attribute 'default nil
:height 150)
(frame-parameter nil 'font)
'("Source Code Pro" . "iso10646-1"))
nil 'japanese-jisx0208
(font-spec :family "Hiragino Maru Gothic Pro"))
nil 'katakana-jisx0201
(font-spec :family "Hiragino Maru Gothic Pro")))
(require 'package)
(add-to-list 'package-archives '("marmalade" . ""))
(add-to-list 'package-archives '("melpa" . "") t)
(require 'helm-config)
(global-set-key (kbd "C-l h") 'helm-mini)
(add-to-list 'load-path (expand-file-name (concat user-emacs-directory "elisp")))
(require 'drill-instructor)
(setq drill-instructor-global t)
;;Auto Complete Mode
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict")
(global-set-key (kbd "C-l r") 'query-replace)
(global-set-key (kbd "C-l R") 'query-replace-regexp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment