是否有可能让每个项目的格式化程序影响 Aptana 中的 Tab 键策略?
我正在尝试设置 Aptana 以便能够为不同的项目使用不同的 PHP 格式化规则。例如,我从事 Drupal 和 Codigniter 项目。 Drupal 编码标准需要 2 个制表符空格。 Codeigniter 想要一个显示为 4 个空格的选项卡。
我认为实现这一目标的方法如下:
- 项目>属性
- 从左侧选项中选择“格式化程序”
- 单击“启用项目特定设置”
- 单击加号按钮创建新配置文件(例如,将其称为 Drupal)
- 从下面的列表中选择“PHP” “预览:”
- 单击编辑按钮铅笔
- 选择缩进选项卡并将制表符策略设置为“仅空格”,缩进大小为 2,制表符大小为 2
- 单击“确定”两次以应用更改。
然后我重新启动 Aptana 以确保新设置适用。但是,无论我做什么,它似乎仍然使用“窗口”>“窗口”中设置的设置。首选项>一般>编辑>文本编辑器(显示的制表符宽度、为制表符插入空格)。
I'm trying to setup Aptana to be able to have different PHP formatting rules for different projects. For instance I work on both Drupal and Codigniter projects. Drupal coding standard wants 2 spaces for tabs. Codeigniter wants a single tab that shows up as 4 spaces.
The way I would think to make this happen is as follows:
- Project > Properties
- Select "Formatter" from options on the left
- Click "Enable project specific settings"
- Click the plus button to create a new profile (eg. call it Drupal)
- Select "PHP" from the list below "Preview:"
- Click the edit button pencil
- Select the indentation tab and set the Tab policy to "Spaces only" with indentation size to 2 and Tab size to 2
- Click Ok twice to apply the changes.
Then I restart Aptana just to make sure the new settings apply. However no matter what I do it still seems to use the settings that are set in Window > Preferences > General > Editors > Text Editors (Displayed tab width, Insert spaces for tabs).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论