Created
October 17, 2011 13:52
-
-
Save hzno/1292646 to your computer and use it in GitHub Desktop.
test
This file contains hidden or 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
@echo off | |
color f1 | |
prompt $c$p$f[$t]$_$$$s | |
title MyPrompt(%~d0) | |
rem cls | |
rem ver | |
if not %CD:~-4% == home cd ../../ | |
set PATH=%CD%\bin;%PATH% | |
set HOME=%CD% |
This file contains hidden or 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
@echo off | |
echo ------------------------------------------ | |
echo Emacs 23.3 | |
echo ------------------------------------------ | |
echo: Emacsを起動します。 | |
start /b cmd /c "%home%\src\emacs-23.3\bin\runemacs.exe" | |
echo: | |
echo: | |
echo: |
This file contains hidden or 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
;;-*- mode:Emacs-Lisp -*- | |
;; 常時デバッグ状態 | |
(setq debug-on-error t) | |
;; normal-top-level-add-subdirs-to-load-path | |
;; [A-Za-z] | |
;; dolist Emacs 21 | |
(defun add-to-load-path (&rest paths) | |
(let (path) | |
(dolist (path paths paths) | |
(let ((default-directory (expand-file-name (concat user-emacs-directory path)))) | |
(add-to-list 'load-path default-directory) | |
(if (fboundp 'normal-top-level-add-subdirs-to-load-path) | |
(normal-top-level-add-subdirs-to-load-path)))))) | |
;; Emacs Lisp Path | |
(setq dotfiles-dir (file-name-directory (or load-file-name (buffer-file-name)))) | |
;; 引数を load-path へ追加 | |
(add-to-list 'load-path | |
(expand-file-name "lisp" dotfiles-dir) | |
;; 変更したり、自作の Emacs Lisp | |
(expand-file-name "vendor" dotfiles-dir) | |
;; private 内には自分専用の物がはいっている。依存は private 内で完結するようにしている | |
;;"private" | |
;; 初期設定ファイル | |
;;"site-start.d" | |
) | |
;; 文字コード | |
;;(set-language-environment 'Japanese) | |
(set-language-environment 'utf-8) | |
(prefer-coding-system 'utf-8) | |
(set-default-coding-systems 'utf-8-unix) | |
;; backup fileを残さない | |
(setq make-backup-files nil) | |
(setq backup-directory-alist | |
(cons (cons "\\.*$" (expand-file-name "back")) | |
backup-directory-alist)) | |
;;; 時刻を表示する | |
(display-time) | |
;; モードラインにライン数、カラム数表示 | |
(line-number-mode t) | |
(column-number-mode t) | |
;;; 起動時の画面はいらない | |
(setq inhibit-startup-message t) | |
;;; menubar | |
(menu-bar-mode nil) | |
(tool-bar-mode 0) ; ツールバーを非表示 | |
;; ベルを鳴らさない | |
(setq visible-bell t) | |
;; 警告を視覚的にする | |
(setq visible-bell t) | |
(show-paren-mode 1) ; 対応括弧を表示 | |
(global-linum-mode t) ;行番号を表示 | |
;; 表示フォーマット | |
(setq linum-format "%4d") | |
(fset 'yes-or-no-p 'y-or-n-p) ; yes, no を y, no | |
;; TAB はスペース 4 個ぶんを基本 | |
(setq-default indent-tabs-mode nil) | |
(setq-default c-basic-offset 4) | |
(setq-default tab-width 4) | |
(c-set-offset 'case-label '+) | |
; make emacs use the clipboard | |
(setq x-select-enable-clipboard t) | |
; 自動改行関連 | |
(setq-default auto-fill-mode nil) | |
(setq-default fill-column 300) | |
(setq text-mode-hook 'turn-off-auto-fill) | |
;;; テーマの設定 | |
;; Frame parameters | |
(setq default-frame-alist | |
(append '((scroll-bar-width . 14) | |
(top . 50) | |
(left . 200) | |
(width . 100) | |
(height . 40) | |
(foreground-color . "black") | |
(background-color . "white") | |
(mouse-color . "azure3") | |
(cursor-color . "azure3") | |
(cursor-type . box) | |
(vertical-scroll-bars . right) | |
(line-spacing . 0) | |
(cursor-type . box)) | |
default-frame-alist)) | |
(setq initial-frame-alist default-frame-alist) | |
;=================================== | |
; Key binding | |
;=================================== | |
(setq kill-whole-line t); C-kで改行も削除 | |
;;; help key変更 | |
;; BackSpaceをC-hに変更 | |
(global-set-key "\M-?" 'help-for-help) | |
(global-set-key "\C-h" 'backward-delete-char-untabify) | |
(global-set-key "\M-h" 'backward-kill-word) | |
(global-set-key "\C-x\C-b" 'bs-show) ;;bs-showでバッファ選択する。 | |
;; (global-whitespace-mode 1) 常に whitespace-mode だと動作が遅くなる場合がある | |
(global-set-key (kbd "C-x w") 'global-whitespace-mode) | |
(define-key global-map "\C-c;" 'comment-region) ; コメントアウト | |
(define-key global-map "\C-c:" 'uncomment-region) ; コメント解除 | |
;; 安全な実行のための共通系関数 | |
;; @see http://www.sodan.org/~knagano/emacs/dotemacs.html | |
(defmacro eval-safe (&rest body) | |
"安全な評価。評価に失敗してもそこで止まらない。" | |
`(condition-case err | |
(progn ,@body) | |
(error (message "[eval-safe] %s" err)))) | |
(defun load-safe (loadlib) | |
"安全な load。読み込みに失敗してもそこで止まらない。" | |
;; missing-ok で読んでみて、ダメならこっそり message でも出しておく | |
(let ((load-status (load loadlib t))) | |
(or load-status | |
(message (format "[load-safe] failed %s" loadlib))) | |
load-status)) | |
(defun autoload-if-found (functions file &optional docstring interactive type) | |
"set autoload iff. FILE has found." | |
(if (not (listp functions)) | |
(setq functions (list functions))) | |
(and (locate-library file) | |
(progn | |
(dolist (function functions) | |
(autoload function file docstring interactive type)) | |
t ))) | |
;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> package.el | |
(require 'cl) | |
(require 'package) | |
;;リポジトリにMarmaladeを追加 | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/")) | |
;;インストールするディレクトリを指定 | |
(setq package-user-dir (concat user-emacs-directory "vendor/elpa")) | |
;;インストールしたパッケージにロードパスを通してロードする | |
(package-initialize) | |
;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> lispes | |
;;;;;;;;;; for redo+.el | |
(require 'redo+) | |
;; アンドゥ時に過去のアンドゥがリドゥされないように設定する | |
(setq undo-no-redo t) | |
;; M-/でredo | |
(global-set-key "\M-/" 'redo) | |
;(setq undo-limit 600000) | |
;(setq undo-strong-limit 900000) | |
;;;;;;;;;; for tabbar-mode | |
(when (require 'tabbar nil t) | |
(setq tabbar-buffer-groups-function | |
(lambda () (list "All Buffers"))) | |
(setq tabbar-buffer-list-function | |
(lambda () | |
(remove-if | |
(lambda(buffer) | |
(unless (string= (buffer-name buffer) "*scratch*") | |
(find (aref (buffer-name buffer) 0) " *")) | |
) | |
(buffer-list)))) | |
(tabbar-mode)) | |
(set-face-attribute | |
'tabbar-default nil | |
:background "grey90") ;バー自体の色 | |
(set-face-attribute ;非アクティブなタブ | |
'tabbar-unselected nil | |
:background "grey80" | |
:foreground "grey40" | |
:box nil) | |
(set-face-attribute ;アクティブなタブ | |
'tabbar-selected nil | |
:background "grey50" | |
:foreground "black" | |
:box nil) | |
(set-face-attribute | |
'tabbar-button nil | |
:box '(:line-width 1 :color "gray72" :style released-button)) | |
(set-face-attribute 'tabbar-separator nil | |
:height 0.7) | |
(global-set-key (kbd "C-,") 'tabbar-backward) | |
(global-set-key (kbd "C-.") 'tabbar-forward) | |
(global-set-key (kbd "<f4>") 'tabbar-mode) | |
;;;;;;;;;; for revive.el | |
(require 'revive) | |
(autoload 'save-current-configuration "revive" "Save status" t) | |
(autoload 'resume "revive" "Resume Emacs" t) | |
(autoload 'wipe "revive" "Wipe emacs" t) | |
(define-key ctl-x-map "F" 'resume) ; C-x F で復元 | |
(define-key ctl-x-map "K" 'wipe) ; C-x K で Kill | |
(add-hook 'kill-emacs-hook 'save-current-configuration) ; 終了時に状態保存 | |
(resume) ; 起動時に復元 | |
;;;;;;;;;; for jaspace.el | |
;; タブ, 全角スペース、改行直前の半角スペースを表示する | |
(when (require 'jaspace nil t) | |
(when (boundp 'jaspace-modes) | |
(setq jaspace-modes (append jaspace-modes | |
(list 'php-mode | |
'yaml-mode | |
'javascript-mode | |
'js2-mode | |
'html-mode | |
'css-mode | |
'ruby-mode | |
'text-mode | |
'fundamental-mode)))) | |
(when (boundp 'jaspace-alternate-jaspace-string) | |
(setq jaspace-alternate-jaspace-string "□")) | |
(when (boundp 'jaspace-highlight-tabs) | |
(setq jaspace-highlight-tabs ?^)) | |
(when (boundp 'jaspace-alternate-eol-string) | |
(setq jaspace-alternate-eol-string "\x21b2\n")) | |
(add-hook 'jaspace-mode-off-hook | |
(lambda() | |
(when (boundp 'show-trailing-whitespace) | |
(setq show-trailing-whitespace nil)))) | |
(add-hook 'jaspace-mode-hook | |
(lambda() | |
(progn | |
(when (boundp 'show-trailing-whitespace) | |
(setq show-trailing-whitespace t)) | |
(face-spec-set 'jaspace-highlight-jaspace-face | |
'((((class color) (background light)) | |
(:foreground "blue")) | |
(t (:foreground "green")))) | |
(face-spec-set 'jaspace-highlight-tab-face | |
'((((class color) (background light)) | |
(:foreground "red" | |
:background "unspecified" | |
:strike-through nil | |
:underline t)) | |
(t (:foreground "purple" | |
:background "unspecified" | |
:strike-through nil | |
:underline t)))) | |
(face-spec-set 'trailing-whitespace | |
'((((class color) (background light)) | |
(:foreground "red" | |
:background "unspecified" | |
:strike-through nil | |
:underline t)) | |
(t (:foreground "purple" | |
:background "unspecified" | |
:strike-through nil | |
:underline t)))))))) | |
;; (require 'jaspace) | |
;; (setq jaspace-alternate-jaspace-string "□") | |
;; (setq jaspace-alternate-eol-string "\x21b2\n") | |
;; ;;(setq jaspace-highlight-tabs t) ; highlight tabs | |
;; (setq jaspace-highlight-tabs ?<) ; use < as a tab marker | |
;; (setq jaspace-modes (append jaspace-modes ;; 各種 major mode で有効に | |
;; (list | |
;; 'js2-mode | |
;; 'html-mode | |
;; 'css-mode | |
;; ))) | |
;; (add-hook 'mmm-mode-hook 'jaspace-mmm-mode-hook) ;; mmm-mode で有効に | |
;; for js2-mode | |
(autoload 'js2-mode "js2-mode" nil t) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(add-hook 'js2-mode-hook | |
'(lambda () | |
(setq js2-mirror-mode nil ; (, { とかを入力した際,対応する括弧とかを自動的に挿入しない。 | |
js2-auto-indent-p t | |
js2-mode-show-parse-errors nil | |
js2-mode-show-strict-warnings nil | |
js2-strict-trailing-comma-warning nil | |
js2-strict-inconsistent-return-warning nil | |
js2-missing-semi-one-line-override nil | |
) | |
(setq js2-cleanup-whitespace nil) | |
(setq js2-bounce-indent-flag nil) | |
(setq js2-strict-missing-semi-warning nil) | |
)) | |
;; for html-helper-mode | |
;; (add-hook 'html-helper-load-hook '(lambda () (require 'html-font))) | |
;; (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) | |
;; (autoload 'css-mode "css-mode") | |
;; (setq auto-mode-alist | |
;; (append | |
;; '( | |
;; ("\\.htm" . html-helper-mode) | |
;; ("\\.html" . html-helper-mode) | |
;; ("\\.shtml$" . html-helper-mode) | |
;; ("\\.php" . html-helper-mode) | |
;; ("\\.css" . css-mode) | |
;; ) auto-mode-alist)) | |
;; (add-hook 'html-helper-mode-hook '(lambda () (font-lock-mode 1))) | |
;;;;;;; php-mode | |
(load-library "php-mode") | |
(require 'php-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment