Tab positions

Tab positions

I have a mixed-language project with C++ and fixed-format Fortran files.  I want the tabs to be set at 6 for the first one, and every 4 thereafter.  That way a tab gets me to column 7, and then my indents are reasonable at four each.  I cannot get the editor in Visual Studio to do that.  If I set the tab at 6, then everything works but my indents are larger than they need to be.  If I set it at 4, then a tab in column 1 does not go to column 7.  There is an "indent" setting, but it doesn't seem to do anything.

Any suggestions?

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Create/use a fixed form file (ending: .for). This causes the 1st tab to jump to column 7 and then any following tab will have the spacing as defined in the options. Maybe this comes close to what you are looking for.

Jörg Kuthe
QT software

The first tab size is always 7. Pressing any digit symbol in this position places this digit into 6 column as a continuation mark. Tab size defined in Tools->Options is used for positions after 7.

I can't get it to work. The options under tools->Options are Tab size and Indent size. I've tried every combination. If I set the indent size at 6, then a tab in column 1 goes to 7, as hoped. But then all tabs everywhere are mod(6), even though the Tab size setting is 4. If I set the indent at 4, then a tab in column 1 goes to 5, not 7.

I want a tab in column 1 to jump 6 spaces, and tabs thereafter to jump mod(4). Is it possible? (I have a mixed-language project; is that an issue here?)

Best Reply

Quote:

dondilworth wrote:

I want a tab in column 1 to jump 6 spaces, and tabs thereafter to jump mod(4). Is it possible?


No it is not possible to specify mixed tab indentation in the VS editor (other than possibly setting up macros but I have never done that so can't help there)
Les

Question is answered, thank you.

Leave a Comment

Please sign in to add a comment. Not a member? Join today