Tapatalk

tab stop value vs. indent spaces?

tab stop value vs. indent spaces?

601
Advanced UserAdvanced User
601

    May 23, 2006#1

    Can someone explain the difference between these two things? I understand that if "Use spaces instead of tabs" is not checked, then Indent Spaces has no effect and the Tab Stop Value is used. But even when I do have "Use spaces instead of tabs" checked, I don't see any visible difference.

    I have my Tab Stop Value set to 10, and Indent Space set to 4. But whether I press TAB or simply press Enter to line up an indentation block, it's always four spaces. So when does the 10 apply?

    The way it's working for me right now, it seems like if "Use spaces instead of tabs" is checked, then it always uses the Indent Spaces value; if it's not checked, it always uses Tab Stop Value. So why have two separate choices when only one is being used? I see no way that both values are being used at the same time, and I don't even understand *how* they are supposed to be used.

    I thought maybe the Indent Spaces only applied when auto-indenting, and that Tab Stop Value applied when explicitly pressing the TAB key, but even this isn't the case.

    I hope someone can explain!

    Thanks! :)
    John

    6,685587
    Grand MasterGrand Master
    6,685587

      May 24, 2006#2

      I think, it is quite good explained in the help of UE/UES. But I give you an example.

      My colleague prefers for indentation hard tabs with a tab stop value of 4. I prefer spaces with only 1 space. (Yes, that's extrem, but with the power of syntax highlighting I like it because it avoids horizontal scrolling although I can write long conditions even inside 4th or 5th if{..}.) Now following situation occurs: I have to write code into a source file of my colleague.

      With the tab stop value of 4 and the indent spaces of 1 I can still read the source of my colleague without any problem because the existing tabs are displayed with 4 spaces. And my new code added is with my prefered setting of 1 space. If my colleague later opens the modified source, he can still read his source and also my source without any formating problem (and it can be easily detected which part of the code is write by me).

      Editing of HTML files downloaded from a website is also a situation where I use different values for tab stops and indent spaces. Some HTML files use only spaces (like my ones), some uses tabs. In this situation different settings for the already existing tabs makes also sense.

      The different settings are also useful for the functions "Tabs to Spaces" and "Spaces to Tabs (All/Leading)".

      Well, if you are the creator of a file or the file you edit does not already contain tabs and you never use the "Spaces to Tabs" function, then with the setting "Use spaces in place of tabs" the tab stop value is not really for interest for your personal need.
      Best regards from an UC/UE/UES for Windows user from Austria

      601
      Advanced UserAdvanced User
      601

        May 24, 2006#3

        Mofi wrote:I think, it is quite good explained in the help of UE/UES. But I give you an example.
        I disagree. I read it several times and I thought it made sense, but after doing a little testing I still don't *see* any effect of these two settings combined.
        Mofi wrote:With the tab stop value of 4 and the indent spaces of 1 I can still read the source of my colleague without any problem because the existing tabs are displayed with 4 spaces. And my new code added is with my prefered setting of 1 space. If my colleague later opens the modified source, he can still read his source and also my source without any formating problem (and it can be easily detected which part of the code is write by me).
        So your tab stop value is 4, indent spaces is 1 and you have spaces in place of tabs. What would his settings be?

        Am I to assume, then, that the value of these two settings only matters when sharing files? That they aren't something that a single person can use to make a difference between tabs and indentation?

        6,685587
        Grand MasterGrand Master
        6,685587

          May 25, 2006#4

          JohnJSal wrote:So your tab stop value is 4, indent spaces is 1 and you have spaces in place of tabs. What would his settings be?
          He uses a tab stop value of 4, indent spaces are set also to 4 but are not used because he has not checked "Use spaces in place of tabs". He works always with tabs for indentation.
          JohnJSal wrote:Am I to assume, then, that the value of these two settings only matters when sharing files? That they aren't something that a single person can use to make a difference between tabs and indentation?
          Correct. Except you insert real tabs into your files although "Use spaces in place of tabs" is active. Inserting tabs can be done with this setting with the ASCII table, a template or macro, by pasting it from the clipboard or with Insert Literal Character, but not by pressing the tab key.
          Best regards from an UC/UE/UES for Windows user from Austria