Tab Question

Hello everyone

In TCC options | advanced I have my TAB Width set to 3. However, if I TYPE eRen.tcclib, one of my library functions, which uses tabs for indentation, it looks like it uses 8. How is the Tab Width setting used? Am I doing something wrong? I expected the tabs to be of the set width.

Thanks,

Michael


Code:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: eRen - rename in place with command line edit
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
eRen {
        setlocal

        GetOpt %*

        :: Turn on Debugging if -D provided
        if defined OPTION_D set DEBUG=1

        iff %PARAM_0 EQ 1 then
                DebugPrint "Filename Given:  %PARAM_1"

                :: Make sure the provided file exists
                iff not exist %PARAM_1 then
                        EchoColor RED "eRen Usage Error - '%PARAM_1' Does Not Exist"
                        gosub Usage
                        goto EndProgram
                endiff

                set NewFileName=%@filename[%@Replace[\,,%PARAM_1]]
                eset NewFileName
                DebugPrint "New Filename: %NewFileName"
                DebugPrint "Rename Command: '%PARAM_1' '%NewFileName'"
                ren "%PARAM_1" "%NewFileName"
        else
                echocolor RED "eRen Usage Error - One Filename Parameter Needed"
                gosub Usage
                goto EndProgram
        endiff

        :EndProgram
        DebugPrint "Cleaning up and exiting..."
        unset NewFileName
        if defined OPTION_D unset DEBUG
        endlocal
        quit

        :Usage
                echo.
                echo Usage: eRen [-D] filename
                echo   -D:  Turns on eRen's Debug Mode
        return
}
 
Mar 18, 2010
68
1
If you use the LIST command to show your file, that tab setting should take effect. The TYPE command is little more than "copy file to console", which expands tabs as you see.
 
Thanks Larry, but I'm not sure I get it. Somewhere in TCC it must convert the tab in the file to X amount of display characters. It's odd to me that that wouldn't take the setting into account.

BTW, I don't care about CMD compatibility....

Michael
 
May 20, 2008
11,411
99
Syracuse, NY, USA
Thanks Larry, but I'm not sure I get it. Somewhere in TCC it must convert the tab in the file to X amount of display characters. It's odd to me that that wouldn't take the setting into account.

BTW, I don't care about CMD compatibility....

Michael
As Larry said. It does, but only in LIST. And that setting affects only LIST. See he help for the OPTION tab with that setting.
 
Mar 18, 2010
68
1
... Somewhere in TCC it must convert the tab in the file to X amount of display characters. ...
Given your above-quoted assumption, your puzzlement is sensible. But the assumption is false. The TYPE command simply copies the file content to the console (as I stated.) It is the conhost.exe program, (distributed with Windows), which is deciding how the tabs should should be rendered. (See a recent thread, "In console, tabs are rendered with non-uniform tab-stop spacing ", for Rexx's assertion of this fact, which I can confirm having seen the effects of using a conhost.exe replacement.)
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Tab (^t) in @FILEWRITE's text Support 2
D TCC tab detaching & restarting Support 3
Joe Caverly Changing the TAB key Support 10
fpefpe bash.exe as a tab Support 0
C How to? Mouse support in WSL when in Take Command Tab Support 2
P How to enable \ with tab completion Support 4
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
Joe Caverly Tab from clipboard Support 6
Joe Caverly Clone a TCC Tab Support 9
R New Cloud Storage Tab in TCC options causing problems Support 0
CWBillow PowerShell tab as Admin Support 2
vefatica TYPE resets console tab settings Support 14
CWBillow TCMD PowerShell Tab elevated Support 6
CWBillow Take Command tab as PowerShell Support 3
CWBillow TCMD Tab Defs Support 4
L WAD In console, tabs are rendered with non-uniform tab-stop spacing Support 16
Emilio III TCMD Tab titles on Insider Windows Support 2
P Run as Admin tab in non-elevated Take Command session? Support 9
CWBillow Powershell tab in TCMD? Support 2
Phileosophos Startup tab layout Support 2
M How to? How to set a default TITLE for newly opened tab? Support 2
R How to? Change TCMD tab font size in window menu Support 3
D Get tab position and size Support 6
C Running PowerShell_ISE in a Tab Support 7
D How cut in TCC tab window Support 5
C How to? run a BTM in elevated, inv tcc tab window Support 9
D Take Command tab only uses half of window Support 1
rps Tab clone problem Support 2
C MONITOR commands alter tab title when triggered Support 0
D Tab completion differences with cmd.exe Support 3
H lua Causes Take Command Tab to Exit Support 5
vefatica Tab completion? Support 4
D How to? How to show variables expanded in the log tab Support 3
I tab completion with directory commands Support 7
R Fixed v17.0.54 Tab->COMSPEC Dialog Box Issue Support 2
vefatica Fixed Crash removing toolbar tab Support 1
I v16 Spawning a PowerShell tab Support 3
Jay Sage Getting Quote Characters into a Toolbar Tab Support 12
Jay Sage "New Tab" Strangeness Support 2
rps Command Input Window tab completion broken Support 7
David Wilbanks How to make new tab open in same directory as previous tab? Support 4
tmaynard How to? Any way to run a command in a new tab at startup? Support 18
A How to? Frozen session tab with "ERROR: The file is either empty or does not contain the valid choices." Support 19
W Opening a new tab takes forever to get the command prompt Support 5
Joe Caverly VIEW window in a TCC tab window problems Support 5
B WAD tab navigation broken Support 3
D Console window titles / tab caption Support 4
Joe Caverly New Tab In TCMD Changes TCC Window Size Support 1
vefatica Fixed TCMD tab horizontal scroll bar Support 5
fpefpe How to? start command /tab option/switch Support 6

Similar threads