Emacsã§PHPç°å¢ãæ´ãã¦ã¿ã
å
ã
ãPHPãJavaãRubyãJavascriptãHTMLããCSSã¾ã§å
¨é¨Eclipseã§ã使ã£ã¦æ¸ãã¦ãããã§ããã
ã¢ã·ã¢ã«ã¶ããããã®PHP開発で追加しておきたいEmacs Lisp 8選ãè¦ã¦ãããã¼ãEmacsã§æ¸ãã¦ã¿ãããªã¼ã¨æããåèã«ãã¦ç°å¢ãæ´ãã¦ã¿ã¾ããã
Emacsã¯è§¦ãããã©è¨å®ãè¯ãããããªãåå¿è
ãªã®ã§çµæ§è¦æ¦ãã¾ããã
ã¨ããããå¿ è¦ãããªãã®ãå ¨é¨åã£ã¦ãã
# php-mode wget http://jaist.dl.sourceforge.net/sourceforge/php-mode/php-mode-1.2.0.tgz tar xfvz php-mode-1.2.0.tgz cp php-mode.el /usr/share/emacs/site-lisp/ # phpããã¥ã¢ã« wget http://jp.php.net/get/php_manual_ja.tar.gz/from/this/mirror tar xfvz php_manual_ja.tar.gz mkdir -p /usr/local/share/php/doc/ cp -r html /usr/local/share/php/doc/ # css-mode wget http://www.garshol.priv.no/download/software/css-mode/css-mode.el cp css-mode.el /usr/share/emacs/site-lisp/ # javascript-mode wget http://web.archive.org/web/20060321004800/http://web.comhem.se/~u83406637/emacs/javascript.el cp javascript.el /usr/share/emacs/site-lisp/ # mmm-mode wget http://jaist.dl.sourceforge.net/sourceforge/mmm-mode/mmm-mode-0.4.8.tar.gz tar xfvz mmm-mode-0.4.8.tar.gz mkdir /usr/share/emacs/site-lisp/mmm-mode cd mmm-mode-0.4.8 cp mmm-mode-0.4.8/*.el /usr/share/emacs/site-lisp/mmm-mode # Mule-UCS wget http://www.meadowy.org/~shirai/elisp/mule-ucs.tar.gz tar xfvz mule-ucs.tar.gz mkdir -p /usr/share/emacs/site-lisp/Mule-UCS cd mule-ucs-20061127-1/ emacs -q --no-site-file -batch -l mucs-comp.el cp -r lisp/* /usr/share/emacs/site-lisp/Mule-UCS/ # svn wget http://www.xsteve.at/prg/emacs/psvn.el cp psvn.el /usr/share/emacs/site-lisp/ # ElScreen wget ftp://ftp.morishima.net/pub/morishima.net/naoto/ElScreen/elscreen-1.4.5.tar.gz tar xfvz elscreen-1.4.5.tar.gz cp elscreen-1.4.5/elscreen.el /usr/share/emacs/site-lisp/
php-modeã®ã³ã³ãã¤ã«
åèã«ãããµã¤ãã§çµæ§ãã£ã¦ããã®ã§ãããã¦ãEmacsä¸ã§ã³ã³ãã¤ã«ãã¦ããã
M-x : byte-compile-file
Byte compile file: /usr/share/emacs/site-lisp/php-mode.el
ä¸æãåããªãã
ElScreenãåããªãã
elscreen.elã®(require 'alist)ã®é¨åã§ãalistãç¡ããã¨æãããã
alistã£ã¦ä½ï¼ã¨æã£ã¦èª¿ã¹ãã¨APELã¨ããã©ã¤ãã©ãªã«å
¥ã£ã¦ãã£ã½ãã®ã§æ¾ã£ã¦ããã
wget http://kanji.zinbun.kyoto-u.ac.jp/~tomo/lemi/dist/apel/apel-10.7.tar.gz mkdir /usr/share/emacs/site-lisp/apel cp apel-10.7/* /usr/share/emacs/site-lisp/apel/
PHPã®é¢æ°è£å®ããã¾ããããªã
php-manual-pathä¸ã«ãhtmlããã¥ã¢ã«ãç½®ãã¦ããã°ãM-Tabãã§è£å®ãã§ãããããã ãã©ä¸æããããªãã
visit-tags-tableãããã¨ãè¨ããã¦ãetagsãèªã¿è¾¼ãã§ããã¨è¨ãããã
http://ww1.netzologie.de/php/phpeditor-emacs.php ã«etagsãupããã¦ããã®ã§è²°ããæè¬ã
wget http://ww1.netzologie.de/php/dateien/phpetags.zip
unzip phpetags.zip
mv phpetags /usr/local/share/php/etags
çµå±htmlã®æ¹ã¯ä½¿ããªããã¨ã«ã
.emacsãä¿®æ£
ããããæ©ãã§æçµçã«ã§ãã.emacs
ElScreenã¯ãC-zããGNU Screenã¨ãã¶ã£ãã®ã§ãã©ããã£ã¦å
±åããããã ãã¼ï¼ã¨æãã¤ã¤çµå±ä¿çã*1
å¾ãputtyãã使ãã¨ãM-TabããWindowsã®è¡¨ç¤ºåæ¿ã«ãªã£ã¦ä½¿ããªãã£ãã®ã§ããM-jãã«ãã¦ã¿ãï¼ã©ããã§è¦ãï¼ã
;; Mule-UCS (require 'un-define) ;; èµ·åãé ãããã®ã§ã¨ããããjisx0213ã¯å¤ãã¦ã¿ã ;;(require 'jisx0213) (set-language-environment "Japanese") (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-clipboard-coding-system 'utf-8) ;; global (global-font-lock-mode t) (require 'font-lock) ;; php-mode (autoload 'php-mode "php-mode") (setq auto-mode-alist (cons '("\\.php\\'" . php-mode) auto-mode-alist)) (setq php-mode-force-pear t) (add-hook 'php-mode-user-hook '(lambda () (define-key php-mode-map "\M-j" 'php-complete-function) (define-key php-mode-map "\C-m" 'newline-and-indent) (c-toggle-auto-hungry-state 1) (setq php-manual-path "/usr/local/share/php/doc/html") (setq php-manual-url "http://www.phppro.jp/phpmanual/") (setq tags-file-name "/usr/local/share/php/etags/TAGS"))) ;; css-mode (autoload 'css-mode "css-mode") (setq auto-mode-alist (cons '("\\.css\\'" . css-mode) auto-mode-alist)) (setq cssm-indent-function #'cssm-c-style-indenter) (add-hook 'css-mode-hook '(lambda () (define-key cssm-mode-map (read-kbd-macro "M-j") 'cssm-complete-property))) ;; javascript-mode (add-to-list 'auto-mode-alist (cons "\\.js\\'" 'javascript-mode)) (autoload 'javascript-mode "javascript" nil t) (setq js-indent-level 4) ;; MMM-mode (require 'mmm-auto) (setq mmm-global-mode 'maybe) (setq mmm-submode-decoration-level 2) (set-face-bold-p 'mmm-default-submode-face t) (set-face-background 'mmm-default-submode-face "black") (mmm-add-classes '((embedded-css :submode css-mode :front "<style[^>]*>" :back "</style>"))) (mmm-add-mode-ext-class nil "\\.html\\'" 'embedded-css) ;; Subversion (autoload 'svn-status "psvn" nil t) ;; ElScreen (require 'elscreen) (if window-system (define-key elscreen-map "\C-z" 'iconify-or-deiconify-frame) (define-key elscreen-map "\C-z" 'suspend-emacs))
ã¨ããããåãããï¼ã£ã¦ã¬ãã«ã§ãã確èªãã¦ãªãã®ã§ãä»å¾ãã³ãã³æ¹è¯ãã¦ãããã
ããã«ãã¦ãEmacsã®è¨å®ã¯é£ããâ¦ã
*1:ã³ã¡ã³ãæ¬ã§æãã¦ããã ãã¾ããããããã¨ããããã¾ãã