Emacsã§PHPãæ¸ãã¨ãã®ã¢ã¦ãã©ã¤ã³ã¢ã¼ãè¨å®
;;; ã¢ã¦ãã©ã¤ã³ã¢ã¼ã(php) (add-hook 'php-mode-hook '(lambda () (setq outline-regexp "^<\\?\\|^class\\|^\\?>\\|^}\\|^ function\\|^/\\*\\*\\|^ /\\*\\*\\|^interface\\|^abstract\\\ |^ private\\|^ protected\\|^ public\\|^ static\\|^ abstract") (setq outline-level (function (lambda () (save-excursion (let ((str nil)) (looking-at outline-regexp) (setq str (buffer-substring-no-properties (match-beginning 0) (match-end 0))) (cond ((string-match "^/\\*\\*" str) 1) ; é層1 ((string-match "^<\\?" str) 1) ((string-match "^\\?>" str) 1) ((string-match "^class" str) 1) ((string-match "^interface" str) 1) ((string-match "^abstract" str) 1) ((string-match "^ /\\*\\*" str) 2) ((string-match "^ function" str) 3) ((string-match "^ private" str) 3) ((string-match "^ protected" str) 3) ((string-match "^ public" str) 3) ((string-match "^ static" str) 3) ((string-match "^ abstract" str) 3) )))))) (outline-minor-mode t) (hide-body)))
Todo: é層ãå©ç¨ããã¦ããªãã®ã§ããã£ã¨ç¶ºéºã«è¡¨ç¤ºããããã«ããã
ç°¡æããã¥ã¢ã«
- C-c @ C-a : å ¨è¡¨ç¤º
- C-c @ C-e : å±é
- C-c @ C-c : æãããã¿
â»åè
ä½ã§ãã¢ã¦ãã©ã¤ã³ã¢ã¼ã
http://www.bookshelf.jp/pukiwiki/pukiwiki.php?%B2%BF%A4%C7%A4%E2%A5%A2%A5%A6%A5%C8%A5%E9%A5%A4%A5%F3%A5%E2%A1%BC%A5%C9