縮進

2011-11-17 32 views
1

的Emacs/Aquamacs PHP模式和選項卡我不能讓我的Aquamacs 2.4(Emacs的)遵循Kohana的風格:縮進

的Emacs在PHP模式替換標籤用空格。我想禁用它並使用製表符來縮進。

我試過很多這樣的解決方案,但沒有工作對我來說:

(require 'php-mode) 
(setq php-mode-force-pear t) 
(add-hook 'php-mode-hook 
     '(lambda() 
     (setq indent-tabs-mode t) 
     (setq tab-width 4) 
     (setq c-basic-offset 4))) 

讚賞任何幫助。

謝謝, 大衛

回答

0

如果您正在尋找標籤縮進和空格的排列,那麼你可以使用SmartTabs。
--->是一個選項卡,.是空格)

function example() 
{ 
--->command(); 

--->if ($condition) 
--->{ 
--->--->$arr = array('One', 
--->--->.............'Two'); // Tabs for indent, spaces for alignment. 
--->--->other_command(); 
--->} 
} 

emacswiki見和 github安裝細節。