question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support rendering of tab characters in terminal

See original GitHub issue

Downstream: https://github.com/Microsoft/vscode/issues/29523

node -e "console.log('a\tb')" should output an actual tab. This means it’s considered a single character by the selection logic and that it’s copied as a \t char not several spaces. This probably won’t be too difficult to deal with by leveraging and improving upon the double width char code.

This is supported by gnome-terminal, Terminal.app and iTerm2.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

7reactions
hansvonncommented, Jan 27, 2019

@Tyriar It depends on what perspective you come from. At least for me I expect tabs to be copied when that was what I pushed to the console. I often do this when I want to generate tab delimited data using powershell. As it is now I use regex to replace spaces with tabs which is just another step.

I can understand where you are coming from in how consoles used to function. I can also understand how many other things you all have to work on. I appreciate all the good work!

2reactions
daiyamcommented, Aug 21, 2021

I’m finding this issue annoying when printing (cat) a file containing tab characters. I will try to make a PR to fix that issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewing Tab Separated Values on the Terminal (it doesn't ...
E.g. if you TAB over existing characters, those characters remain there and are not wiped out (not replaced by spaces). Wow. It works....
Read more >
how to get less to show tabs as tabs? - Unix Stack Exchange
@ilkkachu I am using Terminal in Ubuntu. It renders tabs as tabs: I can copy them intact from more , tail , head...
Read more >
Microsoft Windows Gets an Open Source Terminal with Tabs ...
An Ubuntu tab in Windows Terminal showing Unicode and emoji characters. The text rendering is hardware accelerated, using DirectWrite and ...
Read more >
What do \t and \b do? - Stack Overflow
\t is the tab character, and is doing exactly what you're anticipating based on the action ...
Read more >
3 Ways to Customize Your Windows Terminal
Its main features include multiple tabs, panes, Unicode and UTF-8 character support, a GPU accelerated text rendering engine, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found