I use Notepad++ and Aptana for editing my CakePHP code? Is there any way to get basic html syntax highlighting for CakePHP's .ctp template files? It's a lot harder for me without any coloring going on. Any ideas?
我使用Notepad ++和Aptana编辑CakePHP代码?有没有办法获得CakePHP的.ctp模板文件的基本html语法高亮?没有任何着色,对我来说要困难得多。有任何想法吗?
4 个解决方案
#1
Configuring in Aptana Editor
在Aptana编辑器中配置
Quoted from aptana docs
引自aptana docs
- From the Window menu, select Preferences..., and then choose General > Editors > File Associations.
- Add the appropriate file type.
- Next to the File Types list, click the Add button.
- In the New File Type pop-up window, type the appropriate file extension (e.g. ".ctp" or ".thtml").
- Click OK to add the New File Type to the List.
- Associate the new file type with Aptana.
- On the File Types list, select the file type that you just added.
- Next to the Editor Associations list, click the Add button.
- On the Editor Selection pop-up window, select the editor that you want to associate with your file type.
- Click OK to add the editor.
- The new is now associated with the specified file type.
- Click OK to apply your changes and close the Preferences window.
从Window菜单中,选择Preferences ...,然后选择General> Editors> File Associations。
添加适当的文件类型。
在“文件类型”列表旁边,单击“添加”按钮。
在“新建文件类型”弹出窗口中,键入相应的文件扩展名(例如“.ctp”或“.thtml”)。
单击“确定”将“新文件类型”添加到“列表”中。
将新文件类型与Aptana相关联。
在“文件类型”列表中,选择刚刚添加的文件类型。
在“编辑者关联”列表旁边,单击“添加”按钮。
在“编辑器选择”弹出窗口中,选择要与文件类型关联的编辑器。
单击“确定”以添加编辑器。
新的现在与指定的文件类型相关联。
单击“确定”以应用更改并关闭“首选项”窗口。
Check out this link
看看这个链接
#2
You probably just have to select Language -> Html in the menu bar. You can set the association in Settings -> Style Configurator -> Html
您可能只需在菜单栏中选择语言 - > Html。您可以在设置 - >样式配置器 - > Html中设置关联
#3
Settings -> Styler Configurator -> Language: HTML -> User ext: ctp
设置 - > Styler配置器 - >语言:HTML - >用户分机:ctp
done :-)
#4
Another little tip that I picked up on.....to get some basic syntax completion in Aptana:
我接受的另一个小提示.....在Aptana中获得一些基本的语法完成:
- Right Click on your Projects, Select Properties
- Goto the "Project Natures" tab and make sure that the PHP component is clicked (If not you will have to click it, close the properties window and reopen it)
- Next we're going to click on "PHP Buildpath" and select the "External Folders" tab
- Add the location of a plane jane CakePHP install
右键单击您的项目,选择属性
转到“Project Natures”选项卡并确保单击PHP组件(如果不是,则必须单击它,关闭属性窗口并重新打开它)
接下来,我们将单击“PHP Buildpath”并选择“外部文件夹”选项卡
添加平面简易CakePHP安装的位置
Let Aptana re-profile the project and viola....you have some syntax completion. It's not perfect....but it's better than nothing!
让Aptana重新描述项目和中提琴....你有一些语法完成。它并不完美......但它总比没有好!
#1
Configuring in Aptana Editor
在Aptana编辑器中配置
Quoted from aptana docs
引自aptana docs
- From the Window menu, select Preferences..., and then choose General > Editors > File Associations.
- Add the appropriate file type.
- Next to the File Types list, click the Add button.
- In the New File Type pop-up window, type the appropriate file extension (e.g. ".ctp" or ".thtml").
- Click OK to add the New File Type to the List.
- Associate the new file type with Aptana.
- On the File Types list, select the file type that you just added.
- Next to the Editor Associations list, click the Add button.
- On the Editor Selection pop-up window, select the editor that you want to associate with your file type.
- Click OK to add the editor.
- The new is now associated with the specified file type.
- Click OK to apply your changes and close the Preferences window.
从Window菜单中,选择Preferences ...,然后选择General> Editors> File Associations。
添加适当的文件类型。
在“文件类型”列表旁边,单击“添加”按钮。
在“新建文件类型”弹出窗口中,键入相应的文件扩展名(例如“.ctp”或“.thtml”)。
单击“确定”将“新文件类型”添加到“列表”中。
将新文件类型与Aptana相关联。
在“文件类型”列表中,选择刚刚添加的文件类型。
在“编辑者关联”列表旁边,单击“添加”按钮。
在“编辑器选择”弹出窗口中,选择要与文件类型关联的编辑器。
单击“确定”以添加编辑器。
新的现在与指定的文件类型相关联。
单击“确定”以应用更改并关闭“首选项”窗口。
Check out this link
看看这个链接
#2
You probably just have to select Language -> Html in the menu bar. You can set the association in Settings -> Style Configurator -> Html
您可能只需在菜单栏中选择语言 - > Html。您可以在设置 - >样式配置器 - > Html中设置关联
#3
Settings -> Styler Configurator -> Language: HTML -> User ext: ctp
设置 - > Styler配置器 - >语言:HTML - >用户分机:ctp
done :-)
#4
Another little tip that I picked up on.....to get some basic syntax completion in Aptana:
我接受的另一个小提示.....在Aptana中获得一些基本的语法完成:
- Right Click on your Projects, Select Properties
- Goto the "Project Natures" tab and make sure that the PHP component is clicked (If not you will have to click it, close the properties window and reopen it)
- Next we're going to click on "PHP Buildpath" and select the "External Folders" tab
- Add the location of a plane jane CakePHP install
右键单击您的项目,选择属性
转到“Project Natures”选项卡并确保单击PHP组件(如果不是,则必须单击它,关闭属性窗口并重新打开它)
接下来,我们将单击“PHP Buildpath”并选择“外部文件夹”选项卡
添加平面简易CakePHP安装的位置
Let Aptana re-profile the project and viola....you have some syntax completion. It's not perfect....but it's better than nothing!
让Aptana重新描述项目和中提琴....你有一些语法完成。它并不完美......但它总比没有好!