Tab stop

From Wikipedia, the free encyclopedia
A ruler depicting tab stops in a word processor

A tab stop on a typewriter is a location where the carriage movement is halted by an adjustable end stop. Tab stops are set manually, and pressing the tab key causes the carriage to go to the next tab stop. In text editors on a computer, the same concept is implemented simplistically with automatic, fixed tab stops.

Modern word processors generalize this concept by offering tab stops that have an alignment attribute and cause the text to be automatically aligned at left, at right or center of the tab stop itself. Such tab stops are paragraph-specific properties and can be moved to a different location in any moment, or even removed.

Sometimes, placeholders in code snippets are also called "tab stops" because the user can cycle through them by pressing the tab key.[1]

Types of tab stops[]

A tab stop is a horizontal position which is set for placing and aligning text on a page. There are at least five kinds of tab stops in general usage in word processing or in Microsoft Word.

Left
text extends to the right from the tab stop.
Center
text is centered at the tab stop.
Right
text extends to the left from the tab stop until the tab's space is filled, and then the text extends to the right.
Decimal
text before the decimal point extends to the left, and text after the decimal point extends to the right.
Bar
a vertical line at the specified position on each line in a document.

Dynamic tab stops[]

Some desktop publishing software supports tab stops whose positions are set globally and dynamically by the position of a specific character in a line of text. Adobe InDesign supports this with a non-printing "indent to here" character. Other software uses "elastic" tab stops,[2] each of which moves to fit the widest piece of text in the previous column. This can be useful for viewing source code and tabular data. Third-party plug-ins add this functionality to numerous text editors and IDEs, including Visual Studio,[3][4] Atom,[5] and Notepad++.[6] Elastic tab stops are also used by Go's tabwriter package[7] to reformat code.

See also[]

References[]

  1. ^ "Snippets". TextMate 1.5.1 Manual. Retrieved 1 November 2021.
  2. ^ Elastic tabstops
  3. ^ Always Aligned Archived 2017-10-05 at the Wayback Machine
  4. ^ Always Aligned repository
  5. ^ Elastic Tabstops package for Atom
  6. ^ Elastic Tabstops plugin for Notepad++
  7. ^ Go (programming language) tabwriter package


Retrieved from ""