How to get proper text-color-highlighting for Fortran 90 in Sublime Text 2?

Timur B picture Timur B · Dec 5, 2012 · Viewed 18.6k times · Source

There are a couple of links on sublime forum, on how to get Sublime Text 2 to work with Fortran 90 here http://www.sublimetext.com/forum/viewtopic.php?f=4&t=770, but they don't quite seem to work as the comment identifier "!" is not treated well.

I quickly assembled a solution using the original suggested Punchcard.tmLanguage file and modifying the first block in dictionary to treat "!" as comment (available here: https://gist.github.com/4209445).

Sublime Text 2 is a great text editor and having it support Fortran might be helpful for many people in Theoretical physics and Finance. So if anyone knows a better solution, please let me know.

Thanks!

Answer

bananafish picture bananafish · Dec 5, 2012

The plugin at the fortran.tmBundle works for me. I created a Fortran subfolder in Packages and put all the files in the tmBundle there (not just the .tmLanguage files). It selects Fortran - Punchcard as the default type for .for and Fortran - Modern for .f90 files. These both treat ! just fine on my system - what problem are you having?