Sublime Forum

Fortran syntax highlighting

#1

First of all, congratulations Jon this is an impressive effort given that it’s a one-man job! (Folks over at Lifehacker agree too).

I was looking all afternoon for a decent Windows editor with Fortran syntax highlighting; turns out this is rather difficult to come by. Could I please request that you add a Fortran 90/95 syntax highlight feature? Thanks

1 Like

ST2 freezes for some (Fortran?) multi-line comments
#2

i second this feature request!

0 Likes

#3

You can get Fortran syntax highlighting by downloading the .tmLanguage file from svn.textmate.org/trunk/Bundles/F … /Syntaxes/, and placing it under Packages/User (or something else, such as Packages/Fortran), which you can navigate to from the Preferences/Browse Packages menu. You’ll have to restart Sublime Text after placing it there.

0 Likes

#4

Hello Jon, that link is broken. How do I enable Fortran support in ST2?

0 Likes

#5

mok,

use this link instead: https://github.com/textmate/fortran.tmbundle

0 Likes

#6

I have downloaded the .tmLanguage file from the link above, but when I place it in Packages/Fortran and restart Sublime Text, I still do not have an option to select Fortran syntax. Any help would be appreciated to solve this problem. (I am using Mac OS X Lion if that helps.)

0 Likes

#7

I guess the reason is that,
the tmLanguage you download is a HTML format file,
while the syntax highlight file for Sublime is in the format of XML.
e.g. some modification to the tmLanguage file is required before it takes effect.
As an elementary user to Sublime Text 2, I cannot do it so far.
Anyone who could make these modifications will be highly appreciated. :smile:

0 Likes

#8

dowload this file raw.github.com/textmate/fortran … tmLanguage
to …/Packages/Fortran/Fortran%20-%20Punchcard.tmLanguage

and restart. You may need to change the sintax for a file via the statusbar menu. Also you can select “Open all with current extension as…”

0 Likes

#9

Hi everyone,

I have just found out about Sublime Text 2, and I’m really impressed! The only problem is that I can’t make some Fortran things to work with it. I don’t know what happened, but yesterday I have downloaded the bundle from
github.com/textmate/fortran.tmbundle
and I have used the syntax highlighting for the Fortran - Modern without any problems. Today, I’m trying to open some of my .f90 files, but the program freezes! Sometimes, I manage to open and use the Modern SH, but others, it doesn’t work. I still didn’t find out how to reproduce. Is anyone having this problem? Or have an idea of what that must be?

I can use the Fortran - Punchcard, but the problem is that it doesn’t work with comments for the Fortran 90 files (if I have comments with apostrophes and quotes, the highlighting gets completely messed up, and I can’t use the “c” to toggle comments.)

0 Likes

#10

How would I do this for Sublime Text 3? It seems that the Language folders have become .sublime-package files.

0 Likes

#11

[quote=“filipesmg”]Hi everyone,

I have just found out about Sublime Text 2, and I’m really impressed! The only problem is that I can’t make some Fortran things to work with it. I don’t know what happened, but yesterday I have downloaded the bundle from
github.com/textmate/fortran.tmbundle
and I have used the syntax highlighting for the Fortran - Modern without any problems. Today, I’m trying to open some of my .f90 files, but the program freezes! Sometimes, I manage to open and use the Modern SH, but others, it doesn’t work. I still didn’t find out how to reproduce. Is anyone having this problem? Or have an idea of what that must be?

I can use the Fortran - Punchcard, but the problem is that it doesn’t work with comments for the Fortran 90 files (if I have comments with apostrophes and quotes, the highlighting gets completely messed up, and I can’t use the “c” to toggle comments.)[/quote]

Hi, I am admittedly Sublime n00b. I am having precisely this problem, i.e. the editor freezes when using the TextMate Fortran syntax bundle. Does anyone know if there was a resolution?

0 Likes

#12

I just discovered the MinimalFortran package, and the concept of Package Control. Thanks!

0 Likes

#13

Down load any of the “tm bundle” versions above. Simply change the extension to .sublime-package. Sublime package files are zip archives that have been renamed.

0 Likes