• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Browsers
    • Gaming
    • Hardware
    • Internet
    • iPhone
    • Linux
    • macOS
    • Office
    • Reviews
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About
How to Configure the Tab Width in Sublime Text 3

How to Configure the Tab Width in Sublime Text 3

September 15, 2020 by Mel Hawthorne Leave a Comment

One of the ever-present arguments between developers in many programming languages is how to correctly indent code. Many developers choose to indent code with one or more spaces, while others prefer to use tabs. Both options have their benefits, with spaces offering a consistent level of indentation; while tabs are explicitly designed for use in indentation, allow developers to configure how a single tab displays, and make it much less likely to run into half-indentation.

Tip: Half-indentation is an issue where two documents use a different number of spaces to indent. For example, if you use a single space to indent content in one document, then copy code from double-space indented code, they won’t be compatible. With tabs, this isn’t really an issue, as tabs are wide enough that no-one uses double-tab indentation.

Any decent development environment, such as Sublime Text 3 allows developers to set how wide they want tab characters to appear. This is primarily a personal preference issue, as it makes no difference to the actual code, a single tab character is used no matter if that tab is configured to take the same amount of space as two, three, or more spaces.

To configure the tab width in Sublime Text 3, click on “View” in the top bar, then click on “Indentation” in the drop-down list. Next, in the second level of the drop-down list select the width you want a tab to take up. Sublime Text 3 defaults to tabs being four spaces wide.

Tip: If you prefer using spaces for indentation, you can enable the “Indent Using Spaces” option at the top of the tab width menu. This will convert any press of the tab key to the number of spaces specified.

Click on “View” in the top bar, then click on “Indentation”, and select a tab width from the second level of the drop-down list.

You Might Also Like

  • Fix Sublime Text Does Not Autocomplete
    Fix Sublime Text Does Not Autocomplete
  • Troubleshooting Sublime Text Not Responding
    Troubleshooting Sublime Text Not Responding
  • How to Change the Theme in Sublime Text 3
    How to Change the Theme in Sublime Text 3
  • How to Hide the Minimap in Sublime Text 3
    How to Hide the Minimap in Sublime Text 3
  • Find and Replace in Sublime Text 3
    Find and Replace in Sublime Text 3
  • How to View Multiple Documents at Once in Sublime Text 3
    How to View Multiple Documents at Once in Sublime Text 3

Filed Under: Software

Reader Interactions

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • What is SMPS?
  • How to Find Watched Videos on Facebook in 2023
  • How to View Facebook Memories in 2023
  • How to Fix Google Maps Voice Directions Not Working
  • What Happens to Messages When You Permanently Delete Facebook
  • How to Connect Bluetooth Headphones to Steam Deck
  • How to Reset Root Password on Steam Deck
  • How to Update Steam Deck

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

© Copyright 2023 Guiding Tech Media · All Rights Reserved · Privacy