Created
July 23, 2011 04:51
-
-
Save yohm/1101029 to your computer and use it in GitHub Desktop.
.emacs
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
(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-font-lock-mode t nil (font-core)) | |
'(show-paren-mode t) | |
'(standard-indent 2) | |
'(transient-mark-mode t)) | |
(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. | |
) | |
(global-set-key "\C-z" 'goto-line) | |
(global-set-key "\C-h" 'backward-delete-char-untabify) | |
(add-hook 'after-save-hook | |
'executable-make-buffer-file-executable-if-script-p) | |
(load-file "~/Emacs_setting/smart-compile.el") ;smart compile | |
(global-set-key "\C-c\C-o" 'smart-compile); smart compile | |
(add-hook 'c-mode-common-hook | |
(lambda ()(local-set-key "\C-c\C-o" 'smart-compile))) | |
(add-hook 'sh-mode-hook | |
(lambda ()(local-set-key "\C-c\C-o" 'smart-compile))) | |
(define-key menu-bar-tools-menu [compile] '("Compile..." . smart-compile)) | |
(setq compilation-window-height 10) | |
(setq cssm-indent-function #'cssm-c-style-indenter) | |
(setq cssm-indent-level 2) | |
;; buffer menu | |
(global-set-key "\C-x\C-b" 'buffer-menu) | |
;; | |
(set-face-foreground 'region "white") | |
(set-face-background 'region "dim gray") | |
(setq default-frame-alist | |
(append (list '(foreground-color . "black") | |
'(background-color . "white") | |
'(border-color . "black") | |
'(cursor-color . "blue") | |
'(mouse-color . "orange") | |
'(width . 232) | |
'(height . 55) | |
'(top . 20) | |
'(left . 20) | |
'(vertical-scroll-bars . nil) | |
) | |
default-frame-alist) | |
) | |
(set-face-foreground 'modeline "white") | |
(set-face-background 'modeline "black") | |
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode | |
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode | |
(setq tex-command "platex -shell-escape") | |
(global-set-key "\C-u" 'hs-toggle-hiding) | |
(add-hook 'c-mode-common-hook 'hs-minor-mode) | |
(add-hook 'cpp-mode-common-hook 'hs-minor-mode) | |
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode) | |
(add-hook 'java-mode-hook 'hs-minor-mode) | |
(add-hook 'lisp-mode-hook 'hs-minor-mode) | |
(add-hook 'perl-mode-hook 'hs-minor-mode) | |
(add-hook 'sh-mode-hook 'hs-minor-mode) | |
(add-hook 'ruby-mode-hook | |
'(lambda() | |
(hs-minor-mode 1))) | |
(let ((ruby-mode-hs-info | |
'(ruby-mode | |
"class\\|module\\|def\\|if\\|unless\\|case\\|while\\|until\\|for\\|begin\\|do" | |
"end" | |
"#" | |
ruby-move-to-block | |
nil))) | |
(if (not (member ruby-mode-hs-info hs-special-modes-alist)) | |
(setq hs-special-modes-alist | |
(cons ruby-mode-hs-info hs-special-modes-alist)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment