在无扩展名文件上突出显示 Eclipse 语法?

Eclipse syntax highlighting on extensionless files?(在无扩展名文件上突出显示 Eclipse 语法?)

本文介绍了在无扩展名文件上突出显示 Eclipse 语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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?

解决方案

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.

这篇关于在无扩展名文件上突出显示 Eclipse 语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:在无扩展名文件上突出显示 Eclipse 语法?

基础教程推荐