Top > emacs .emacsC言語のindent設定
http://d.hatena.ne.jp/gomi-box/20071022/1193036225
;; c-mode-hock(C言語のインデントの設定) (defun my-c-mode-hook () (c-set-style "stroustrup") (setq indent-tabs-mode nil) (setq c-basic-offset 4) (c-toggle-auto-state -1) (define-key c-mode-base-map "\C-m" 'newline-and-indent)) (add-hook 'c-mode-hook 'my-c-mode-hook) ;; c++-mode-hock(C++のインデントの設定) (defun my-c++-mode-hook () (c-set-style "stroustrup") (setq indent-tabs-mode nil) (setq c-basic-offset 4) (c-toggle-auto-state -1) (define-key c-mode-base-map "\C-m" 'newline-and-indent)) (add-hook 'c++-mode-hook 'my-c++-mode-hook) 色
MacOSXその他
|