.scss.erb aptana/eclipse 中 scss 的扩展语法高亮显示
如果我的 scss 文件中有一些 eRuby,我需要将扩展名设为 *.scss.erb。但是,这样做会导致语法突出显示 *.erb 而不是 *.scss。有没有办法让 Eclipse 更智能地确定语法突出显示,或者至少允许像 notepad++ 那样手动分配语法?
到目前为止,我发现的唯一解决方法是将文件重命名为 *.scss,打开它,然后将其重命名回 *.erb,以便稍后正确处理。
If I have some eRuby in a scss file, I need to make the extension *.scss.erb. However, doing so causes the sytax highlighting for *.erb rather than *.scss. Is there any way to get eclipse to determine the syntax highlighting more intelligently or at least allow manual syntax assignment like in notepad++?
The only workaround I've found so far is to rename the file *.scss, open it, then rename it back to *.erb so it gets processed correctly later on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该有。
您要做的就是转到“首选项”>“一般>编辑>文件关联并为 *.scss.erb 扩展设置默认编辑器,但是 Eclipse 中存在一个错误,该错误会阻止文件与多个句点关联:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168573
我解决该问题的方法方法是右键单击 Project Explorer 中的源文件并转到“打开方式”>“其他...并从那里选择 Sass Source Editor。
There should be.
What you would do is go to Preferences > General > Editors > File Associations and set the default editor for your *.scss.erb extensions, however there's a bug in Eclipse that prevents file associations with more than one period:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168573
The way I get around the issue is by right clicking the source file in Project Explorer and going to Open With > Other... and selecting Sass Source Editor from there.