0

I would like to change the font color at 72-column width in Visual Studio 2010. All options I see have it changing at 80. I am aware of the guide-lines option but I'd prefer to change the font color.

Any pointers are very much appreciated.

Thanks, -Sachin

sachin
  • 1
  • @HighPerformanceMark, I don't do much FORTRAN but most of my group does. We build on many outdated compilers/systems to catch various issues with accuracy,programming etc so the 72-column limit comes from that. I am merely trying to find a solution to a problem where someone checks in a line of code with 74 columns and breaks our nightly builds. Yes it is strange that folks still code in fixed-format using VS2010 but you have no clue how hard it was to get them to move from Compaq Visual FORTRAN ;) – sachin Sep 28 '14 at 00:06

1 Answers1

0

The default in Intel Visual Fortran is to change the color at column 72. You didn't say whose Fortran you are using (I know of three that support VS2010.)

enter image description here

If you set the project property Language > Fixed form line length to 80, then it will change at 80 (you have to close and reopen the file to see this.)

Community
  • 1
  • 1
Steve Lionel
  • 6,972
  • 18
  • 31
  • I am using Intel FORTRAN 2011. I do see that the font backrgound changes to gray and the font color changes to green. But at 80 the background changes to bright yellow and the font color red. This is what I want to happen at column 72. – sachin Feb 13 '15 at 01:41
  • I don't see that behavior when I go past column 80. If your intent is to alert you when you go past the statement field, turn on the compiler option /warn:truncated_source (Fortran >Diagnostics > Language Usage Warnings > Warn When Truncating Source Line) and the compiler will complain if you go past column 72 (or whatever you have the statement width set to.) – Steve Lionel Feb 13 '15 at 16:01
  • Thanks Steve. I will pursue that. Meanwhile I discovered that Tools->Options->Environment->Fonts&Colors where one is supposed to be able to change the font properties for "Fortran Beyond End of Line" & "Fortran Beyong End of Line Meta". But this does not work. I changed the font to what I wanted. I thought that in conjunction with the project property language - fixed form line length it should change the behavior in the text editor as I typed but it did not (even after restarting VS). This would have been the ideal solution for us since (sigh) some developers don't look closely at warnings. – sachin Feb 13 '15 at 18:11
  • A colleague found out that "Fortran Sequence Number" is the setting we need to change and we tested it and it works! I thought "beyond end of line" was the one but it was not. – sachin Feb 13 '15 at 19:24