Created
December 5, 2012 02:47
-
-
Save NaokiKuzumi/4211685 to your computer and use it in GitHub Desktop.
どこまでをemacsでやり、どこまでをportageでやるのか悩みつつまた大幅減量がなされた.emacs
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
;;;; | |
;;;; emacs config file | |
;;;; | |
;;; | |
;;; common settings | |
;;; | |
;; no startup message | |
(setq inhibit-startup-message t) | |
;; | |
;; key config | |
;; | |
(global-set-key "\C-h" 'delete-backward-char) | |
(define-key global-map "\C-x?" 'help) | |
(global-set-key "\C-t" 'ESC-prefix) | |
;; | |
;; environment | |
;; | |
(setq load-path | |
(append (list | |
(expand-file-name "~/.emacs.d/site-lisp/")) | |
load-path)) | |
(set-language-environment 'Japanese) | |
(set-default-coding-systems 'utf-8) | |
;; truncuate line when in 2 or more windows. | |
(setq truncate-partial-width-windows nil) | |
(setq default-tab-width 4) | |
(set-default-font "Liberation Mono-12") | |
(set-fontset-font (frame-parameter nil 'font) | |
'japanese-jisx0208 | |
'("M+1P+IPAG" . "unicode-bmp")) | |
(if (boundp 'window-system) | |
(progn | |
; | |
(setq initial-frame-alist | |
(append (list | |
'(foreground-color . "azure3") ; 文字が白 | |
'(background-color . "black") ; 背景は黒 | |
'(border-color . "black") | |
'(mouse-color . "white") | |
'(cursor-color . "white") | |
'(cursor-type . box) | |
'(menu-bar-lines . 1) | |
'(vertical-scroll-bars . nil) ;;スクロールバーはいらない | |
) | |
initial-frame-alist)))) | |
(setq default-frame-alist initial-frame-alist) | |
;;; | |
;;; mode settings | |
;;; | |
;; | |
;; show paren | |
;; | |
(show-paren-mode t) | |
(setq show-paren-style 'mixed) | |
(set-face-background 'show-paren-match-face "LightSlateBlue") | |
(set-face-foreground 'show-paren-match-face "LightCyan") | |
(set-face-underline-p 'show-paren-match-face "Yellow") | |
;; | |
;; grep | |
;; | |
(setq grep-host-defaults-alist nil) | |
(setq grep-template "grep <C> -n <R> <F> <N>") | |
(setq grep-find-template "find . <X> -type f <F> -print0 | xargs -0 -e grep <C> -n <R> <N>") | |
;; | |
;; desktop-save | |
;; | |
(desktop-save-mode 1) | |
;; | |
;; org | |
;; | |
(setq org-startup-indented t) | |
(setq org-startup-truncated t) | |
;; | |
;; howm | |
;; | |
(autoload 'howm-menu "howm" "Hitori Otegaru Wiki Modoki" t) | |
(setq howm-file-name-format "%Y/%m/%Y-%m-%d.howm") | |
(setq howm-view-summary-persistent nil) | |
(global-set-key "\C-c,," 'howm-menu) | |
(global-set-key "\C-c,q" 'howm-kill-all) | |
(eval-after-load "calendar" | |
'(progn | |
(define-key calendar-mode-map | |
"\C-m" 'my-insert-day) | |
(defun my-insert-day () | |
(interactive) | |
(let ((day nil) | |
(calendar-date-display-form | |
'("[" year "-" (format "%02d" (string-to-int month)) | |
"-" (format "%02d" (string-to-int day)) "]"))) | |
(setq day (calendar-date-string | |
(calendar-cursor-to-date t))) | |
(exit-calendar) | |
(insert day))))) | |
(setq howm-menu-lang 'ja) | |
;; | |
;; ecma | |
;; | |
;; (autoload 'ecmascript-mode "ecmascript-mode" nil t) | |
;; (setq auto-mode-alist (cons '("\\.js$" . ecmascript-mode) auto-mode-alist)) | |
;; | |
;; js mode | |
;; | |
(setq auto-mode-alist (cons '("\\.js$" . js-mode) auto-mode-alist)) | |
;; | |
;; php mode | |
;; | |
(autoload 'php-mode "php-mode" nil t) | |
(setq auto-mode-alist (cons '("\\.ctp" . php-mode) auto-mode-alist)) | |
;; | |
;; c mode | |
;; | |
(add-hook 'c-mode-common-hook | |
'(lambda () | |
(progn | |
; (semantic-mode 1) ; CEDET | |
(c-toggle-hungry-state 1) | |
(c-set-style "linux") | |
(setq tab-width 4) | |
(setq indent-tabs-mode nil) | |
(setq c-basic-offset 4)))) | |
;; | |
;; ocaml | |
;; | |
;;(autoload 'tuareg-mode "tuareg" nil t) | |
;;(setq auto-mode-alist (cons '("\\.ml$" . tuareg-mode) auto-mode-alist)) | |
;; (add-hook 'tuareg-mode-hook | |
;; '(lambda () | |
;; (progn | |
;; (setq indent-tabs-mode nil) | |
;; (setq ff-other-file-alist | |
;; '(("\\.ml$" (".mli")) | |
;; ("\\.mli$" (".ml")))) | |
;; (define-key tuareg-mode-map (kbd "C-c o") 'ff-find-other-file) | |
;; (setq tab-width 4)))) | |
;; | |
;; common lisp | |
;; | |
(setq auto-mode-alist (cons '("\\.cl$" . lisp-mode) auto-mode-alist)) | |
(add-hook 'lisp-mode-hook | |
'(lambda () | |
(progn | |
(setq indent-tabs-mode nil) | |
(setq tab-width 4)))) | |
(when (require 'cl-indent-patches nil t) | |
;; emacs-lispのインデントと混同しないように | |
(setq lisp-indent-function | |
(lambda (&rest args) | |
(apply (if (memq major-mode '(emacs-lisp-mode lisp-interaction-mode)) | |
'lisp-indent-function | |
'common-lisp-indent-function) | |
args)))) | |
;; | |
;; slime | |
;; | |
;;(setq inferior-lisp-program "sbcl") | |
;;(setq slime-net-coding-system 'utf-8-unix) | |
;;(eval-after-load "slime" | |
;; '(progn (slime-setup '(slime-repl)))) | |
;;(require 'slime) | |
;; for kNormal and assembly | |
;; (setq auto-mode-alist (cons '("\\.kn$" . auto-revert-mode) auto-mode-alist)) | |
;; (add-hook 'asm-mode-set-comment-hook | |
;; (function | |
;; (lambda () | |
;; (setq asm-comment-char ?#)))) | |
;; (add-hook 'asm-mode-hook | |
;; (function | |
;; (lambda () | |
;; (auto-revert-mode t)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment