Skip to main content



      Home
Home » Newcomers » Newcomers » Force syntax coloring
Force syntax coloring [message #146846] Wed, 05 April 2006 05:36 Go to next message
Eclipse UserFriend
Originally posted by: j.westra.takumi-tech.com

Hi all,

I would like to know how I can force a certain kind of syntax coloring on
a file, i.e. tell Eclipse to consider file x as e.g. a Pyhon file.

We have executable python scripts without the .py extension. Eclipse does
not see it's python, and just displays it as any textfile, without syntax
coloring. It should be easy to tell Eclipse to color it as any python file.
Re: Force syntax coloring [message #146852 is a reply to message #146846] Wed, 05 April 2006 06:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hendrik_maryns.despammed.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jurjen Westra schreef:
> Hi all,
>
> I would like to know how I can force a certain kind of syntax coloring
> on a file, i.e. tell Eclipse to consider file x as e.g. a Pyhon file.
>
> We have executable python scripts without the .py extension. Eclipse
> does not see it's python, and just displays it as any textfile, without
> syntax coloring. It should be easy to tell Eclipse to color it as any
> python file.

RMB on file, Open with..., choose Python editor.

If those executables have a consistent extension other than .py, you
could define a new file association. Type those last two words in the
preferences filter.

H.
- --
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEM5cce+7xMGD3itQRAmq0AJ9TFURghcCvSkHSIa4/QFkRak64QgCf XMAM
5Yfgo4tl8FWq5IkUYmVOHiE=
=85/M
-----END PGP SIGNATURE-----
Re: Force syntax coloring [message #146855 is a reply to message #146852] Wed, 05 April 2006 06:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: j.westra.takumi-tech.com

That does not work: I only have the options Text Editor, System Editor and
Default Editor. I am using Eclipse 3.1.2. Is choosing the python editor a
feature of newer versions? I do have python syntax coloring when I open a
py file.

In general, executable scripts could have been written in any scripting
language (the first line with #! gives it away to the system), so I can
not make a new file association (we also use perl a lot).
Re: Force syntax coloring [message #146858 is a reply to message #146855] Wed, 05 April 2006 07:34 Go to previous message
Eclipse UserFriend
Originally posted by: hendrik_maryns.despammed.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jurjen Westra schreef:
> That does not work: I only have the options Text Editor, System Editor
> and Default Editor. I am using Eclipse 3.1.2. Is choosing the python
> editor a feature of newer versions?

You?re right. You will first have to add the Python editor as an editor
for this kind of files. If they have no ending, I don?t know of a way,
if they have all kind of different endings, you can enter the ending *.*
in file associations, and add the Python editor to that.

Also have a look at the content-type preferences, it might help.

H.
- --
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEM6tCe+7xMGD3itQRAoP9AJ9sEN4xRlkKXOD9icKLinSRYZzbbgCb Bbf1
3PcaWPyWebLZgRtLOu3qm90=
=jVvZ
-----END PGP SIGNATURE-----
Previous Topic:Modifying the java editor
Next Topic:Creating a new Editor
Goto Forum:
  


Current Time: Thu Jun 05 16:57:50 EDT 2025

Powered by FUDForum. Page generated in 0.07629 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top