[REQUEST] tab_size=None keeps and doesn't replace tab-characters
See original GitHub issueHave you checked the issues for a similar suggestions? I have googled, but couldn’t find any discussion naming this issue.
I have found no way to set tab_size in the console to None, meaning that tab-characters should not be replaced and kept as-is.
Give as much detail as you can. Example code of how you would like it to work would help.
What I’d like to achieve is the ability to print a csv-table with tabulators as delimiters. Yet I have found no way to do that using rich - all tabulator-characters are replaced with a varying amount of spaces.
>>> from rich.console import Console
>>> c = Console(tab_size=None)
>>> c.print("a\tb")
a b
>>> print("a\t") # I'd like to have an option to get this output from rich as well
a\tb
What problem do you have that this feature would solve? I may be able to suggest an existing way of solving it.
In rich text it should be possible to print a tab-character as-is 😃.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
bug: tabSize affects indentation #10339 - microsoft/vscode
When getting the new `indentSize` option programatically, it always returns a numeric value (just as `tabSize` does when set to the deprecated "auto"...
Read more >Visual Studio replace tab with 4 spaces? - Stack Overflow
Change Tab to use "Insert Spaces" instead of "Keep Tabs". ... the options of the tab size in Visual Studio but it still...
Read more >Tabs and indents settings does not work
Go to Settings and change indentation to Tab; Go back to file and press Enter so it creates new line (e.g. after opening...
Read more >Add option to control tab width when viewing files - GitLab
Tabulation character (0x09, \t) is always rendered with a width of 8 spaces, but many projects use 4 spaces for the width of...
Read more >Options, Text Editor, All Languages, Tabs - Visual Studio ...
When selected, indent operations insert only space characters, not TAB characters. If the Indent size is set to 5, for example, then five...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That completely does the trick! Thank you very much for your fast answer
tor. 26. mai 2022, 17:01 skrev Will McGugan @.***>:
Did I solve your problem?
Why not buy the devs a coffee to say thanks?