是否有可能让每个项目的格式化程序影响 Aptana 中的 Tab 键策略?

发布于 2024-12-05 18:52:12 字数 507 浏览 0 评论 0原文

我正在尝试设置 Aptana 以便能够为不同的项目使用不同的 PHP 格式化规则。例如,我从事 Drupal 和 Codigniter 项目。 Drupal 编码标准需要 2 个制表符空格。 Codeigniter 想要一个显示为 4 个空格的选项卡。

我认为实现这一目标的方法如下:

  1. 项目>属性
  2. 从左侧选项中选择“格式化程序”
  3. 单击“启用项目特定设置”
  4. 单击加号按钮创建新配置文件(例如,将其称为 Drupal)
  5. 从下面的列表中选择“PHP” “预览:”
  6. 单击编辑按钮铅笔
  7. 选择缩进选项卡并将制表符策略设置为“仅空格”,缩进大小为 2,制表符大小为 2
  8. 单击“确定”两次以应用更改。

然后我重新启动 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:

  1. Project > Properties
  2. Select "Formatter" from options on the left
  3. Click "Enable project specific settings"
  4. Click the plus button to create a new profile (eg. call it Drupal)
  5. Select "PHP" from the list below "Preview:"
  6. Click the edit button pencil
  7. Select the indentation tab and set the Tab policy to "Spaces only" with indentation size to 2 and Tab size to 2
  8. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文