वीर

27 มีนาคม 2008

Emacs + CakePHP

Filed under: Uncategorized — Tags: , , , , , , — वीर @ 09:20

Given that Emacs and CakePHP are installed on Ubuntu 7.10. At first, Emacs does not high-light php code and also php template that are used in CakePHP.  So I installed php-mode by this command:

aptitude install php-mode

Then I can edit php code with syntax highlighting. However tab-size for CakePHP source code seem to be 4 but Emacs default is 8. So I add these to the file .emacs:

(setq default-tab-width 4)

(setq c-basic-offset 4)

Even .php files are highlighted but .ctp files, which is template, are not highlighted. So I add file-mode association list by editting .emacs again:

 (setq auto-mode-alist
(cons ‘(”\\.ctp$” . php-mode)
auto-mode-alist))

emacs_cakephp.png

I hope these modifications are adequate for developing software with CakePHP and Emacs. :-)

No Comments Yet »

ยังไม่มีความคิดเห็นใดๆ

RSS feed สำหรับความคิดเห็นในกระทู้นี้ TrackBack URI

เขียนความคิดเห็นของคุณ

บลอกที่ WordPress.com .