Eclipse syntax highlighting on extensionless files?

风格不统一 提交于 2019-12-19 10:17:59

问题


I have a perl CGI script that needs to have a specific extensionless filename to run correctly from the software that uses it. I'm using Eclipse 3.7.0 on Ubuntu 11.04 Linux as my IDE, and it's not highlighting syntax on the file nor using the limited autocomplete features (like adding a second closing tag for things like quotes and various brackets). Right click> properties on the file reveals that the OS seems to know it's a perl script, but Eclipse evidently does not. Can I somehow tell Eclipse to use the perl syntax highlighter for all extensionless files? Or, failing that, for this specific file?


回答1:


Found the solution to this, thought I might throw it in here if someone has a similar problem later and runs into this.

What I did was create a link to the script, and gave the link a .pl extension. This happily caused Eclipse to parse the syntax correctly. Problem solved.



来源:https://stackoverflow.com/questions/7122886/eclipse-syntax-highlighting-on-extensionless-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!