LoginSignup
3
3

More than 5 years have passed since last update.

emacsの設定を残してみる

Last updated at Posted at 2014-01-13

(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.
'(global-linum-mode t)
'(tool-bar-mode nil))
(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.
)

;; Mac用フォント設定
;; http://tcnksm.sakura.ne.jp/blog/2012/04/02/emacs/

;; 英語
(set-face-attribute 'default nil
:family "Ricty Regular" ;; font
:height 140) ;; font size

;; 日本語
(set-fontset-font
nil 'japanese-jisx0208
;; (font-spec :family "Hiragino Mincho Pro")) ;; font
(font-spec :family "Hiragino Kaku Gothic ProN")) ;; font

;; 半角と全角の比を1:2にしたければ
(setq face-font-rescale-alist
;; '((".Hiragino_Mincho_pro." . 1.2)))
'((".Hiragino_Kaku_Gothic_ProN." . 1.2)));; Mac用フォント設定

;;改行とインデント
(global-set-key"\C-m"'newline-and-indent)
;;(M-x c-set-style RET) ;;<インデント>

;;インデントとインデント設定名
;;gun 2
;;k&r 5
;;bsd TAB(8)
;;stroustrup 4
;;whitesmith 1
;;ellemtel 3
;;cc-mode 4

(put 'dired-find-alternate-file 'disabled nil)

;;起動画面のmessageとscratchを消す
(setq inhibit-startup-message t)
(setq initial-scratch-message nil)

;;シンタックスハイライトを定義
(global-font-lock-mode t)

;;起動時の画面フルサイズ
(set-frame-parameter nil 'fullscreen 'maximized)

;;; 対応する括弧を表示させる
(show-paren-mode 1)

;;; 現在行に色をつける
(global-hl-line-mode 1)

;;; 履歴を次回Emacs起動時にも保存する
(savehist-mode 1)

;;; ファイル内のカーソル位置を保存する
(setq-default save-place t)

;;; global-font-lock-mode(色の設定等)を有効にする
(global-font-lock-mode t)

;;起動時に画面分割/ターミナル起動
(defun split-window-and-run-shell()
(setq w (selected-window))
(setq w2 (split-window w nil t))
(select-window w2)
(shell)
(select-window w))
(add-hook 'after-init-hook (lambda()(split-window-and-run-shell)))

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3