Skip to content

Instantly share code, notes, and snippets.

@tmyymmt
Created November 7, 2012 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmyymmt/4032621 to your computer and use it in GitHub Desktop.
Save tmyymmt/4032621 to your computer and use it in GitHub Desktop.
init.el for cocoa emacs
; css-mode
(defun coding-style-css ()
(setq css-indent-offset 2))
(add-hook 'css-mode-hook 'coding-style-css)
;
(setq truncate-lines t)
(setq truncate-partial-width-windows t)
(set-language-environment "Japanese")
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
(blink-cursor-mode 0)
(setq read-buffer-completion-ignore-case t)
(setq read-file-name-completion-ignore-case t)
(setq delete-by-moving-to-trash t)
(setq trash-directory "~/.Trash")
(show-paren-mode 1)
(setq show-paren-style 'mixed)
(defface hlline-face
'((((class color)
(background dark))
(:background "dark slate gray"))
(((class color)
(background light))
(:background "dark slate gray"))
(t
()))
"*Face used by hl-line.")
(setq hl-line-face 'hlline-face)
(global-hl-line-mode)
(column-number-mode t)
(define-key global-map [home] 'beginning-of-line)
(define-key global-map [end] 'end-of-line)
(define-key global-map (kbd "C-<home>") 'beginning-of-buffer)
(define-key global-map (kbd "C-<end>") 'end-of-buffer)
(define-key global-map (kbd "C-<tab>") 'next-buffer)
(define-key global-map (kbd "S-C-<tab>") 'previous-buffer)
;(define-key global-map (kbd "") ')
(define-key global-map (kbd "C-a") 'start-kbd-macro)
(define-key global-map (kbd "C-q") 'end-kbd-macro)
(define-key global-map (kbd "C-z") 'call-last-kbd-macro)
(setq inhibit-startup-message t)
;;;
(add-to-list 'load-path "~/.emacs.d/site-lisp")
(require 'tabbar nil t)
(tabbar-mode 1)
(setq tabbar-buffer-groups-function nil)
;(setq tabbar-separator '(1.5))
(require 'resumer nil t)
;resumer-save-to-file
;resumer-load-from-file
(require 'scala-mode)
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-hook 'scala-mode-hook
(function
(lambda ()
(setq scala-mode-indent:step 2)
(scala-mode-lib:define-keys scala-mode-map
([(shift tab)] 'scala-undent-line)
([(control tab)] nil))
(local-set-key [(return)] 'newline-and-indent))))
;(add-hook 'scala-mode-hook 'jaspace-mode)
;;;
(setq mac-option-modifier 'meta)
(setq yank-excluded-properties t)
(global-linum-mode t)
(tool-bar-mode 0)
(set-background-color "Black")
(set-foreground-color "White")
(set-cursor-color "White")
(add-to-list 'default-frame-alist '(alpha . 92))
(setq initial-frame-alist
(append
'((top . 0) ; フレームの Y 位置(ピクセル数)
(left . 0) ; フレームの X 位置(ピクセル数)
(width . 128) ; フレーム幅(文字数)
(height . 65)) ; フレーム高(文字数)
initial-frame-alist))
(create-fontset-from-ascii-font "Menlo-12: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.2) (".*Menlo.*" . 1.0)))
;(set-default-font
;"-*-Osaka-normal-normal-normal-*-24-*-*-*-m-0-iso10646-1")
(desktop-save-mode t)
(desktop-load-default)
(desktop-read)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment