Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Tab positions

dondilworth
New Contributor II
1,200 Views

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?

0 Kudos
1 Solution
Les_Neilson
Valued Contributor II
1,200 Views
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

View solution in original post

0 Kudos
5 Replies
joerg_kuthe
Novice
1,200 Views
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
0 Kudos
Vadim_M_Intel
Employee
1,200 Views
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.
0 Kudos
dondilworth
New Contributor II
1,200 Views
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?)
0 Kudos
Les_Neilson
Valued Contributor II
1,201 Views
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
0 Kudos
dondilworth
New Contributor II
1,200 Views
Question is answered, thank you.
0 Kudos
Reply