Friday, March 6, 2020

Visual Studio (VS) Code - How to view Tabs (tab characters) in a file



















To view Tab characters in a current file in VS Code, as in image above.
  1. Choose View->Render Whitespace 

Tab character by default are replaced by 4 spaces in Visual Studio Code. 

To make VS Code use Tabs instead of default spaces.
  1. Choose File->Preference->Settings.
  2. Search for "Tab" and a list options will include Insert Space and others
  3. Uncheck Insert Space

  4. Check your file, Tab character will be displayed as →   (right arrow).
Note for some files this maybe overwritten by Detect Indentation setting. Unchecked to disable.




See also - How to view control characters in Visual Studio Code
https://metadataconsulting.blogspot.com/2020/03/Visual-Studio-VS-Code-how-to-view-Control-Characters-SOH-STX-ETX-etc.html

No comments:

Post a Comment