How to make (EPIC perl) plugin on eclipse do syntax coloring for a file that does not have the extension .pl

I need to work on a file that, for various reasons, cannot be renamed to the .pl extension. So far, I have worked by creating a private version, changing its name to have a .pl extension, and then copying it again after the changes. Now it is becoming cumbersome and making mistakes. Is there any way to make perl epic / eclipse syntax color .pl file

+5
source share
3 answers

To associate a file extension with Epic Perl in Eclipse, go to: Window > Settings > General > Editors > File Associations .

If you see the extension you are looking for, are listed in the "File Types:" section, go to step 2.

Step 1: To the right of the "File Types:" field, click Add . Now enter * followed by the extension name. For example, to add .txt, enter * .txt, then click OK .

2: " :" . " :" . Epic Perl Editor . , " Epic Perl" " :" .

, .pl Epic Perl.

+6

Perl, . , , "ln" .pl .

+3

" ", , .

, , , , @Joe , . -, № 39 10 . wild-cards , . perl.

, perl, my-perl-executable-name, mac :

  • :

    [Menu] Eclipse -> Preferences ->
    [Tree] General -> Content Types -> [Pane] Content Types

  • " " Perl:

    [Tree] Text -> Perl Source File

  • " " .

    [button] (click) Add…
    [Dialog]-> Content Type text box -> (type) my-perl-executable-name
    [Dialog]-> [button] (click) OK
    [Pane]-> [button] (click) OK

  • Close and open the file again my-perl-executable-name. Now it should be highlighted with syntax.

Note. This solution may not work if your specific file name already has an “Assigned Content Type”, especially if it contains an extension (that is, my-executable.txt is not a good executable name).

+2
source

All Articles