307

What was the original historical use of the vertical tab character (\v in the C language, ASCII 11)?

Did it ever have a key on a keyboard? How did someone generate it?

Is there any language or system still in use today where the vertical tab character does something interesting and useful?

3
  • 11
    Great explanation here: en.wikipedia.org/wiki/Tab_key
    – Zabba
    Commented Aug 1, 2010 at 2:44
  • 3
    I've been using it in .vsv files so I don't have to think about how to quote textual data in my fields.
    – Ron
    Commented Jul 17, 2012 at 15:31
  • 2
    If you're considering such a thing for delimiter-separated values like CSV & TSV, take a look at ASCII's four information separator characters, designed for four levels of hierarchy: 0x1c (file separator ^\), 0x1d (group separator ^]), 0x1e (record separator ^^), and 0x1f (unit separator ^_). I think these didn't get better adoption because they're non-printing, but \v (0x0b, ^K) might render as \n\t and be even worse. Vim shows vertical tabs and information separators by their control codes.
    – Adam Katz
    Commented Oct 20, 2022 at 15:42

10 Answers 10

280

Vertical tab was used to speed up printer vertical movement. Some printers used special tab belts with various tab spots. This helped align content on forms. VT to header space, fill in header, VT to body area, fill in lines, VT to form footer. Generally it was coded in the program as a character constant. From the keyboard, it would be CTRL-K.

I don't believe anyone would have a reason to use it any more. Most forms are generated in a printer control language like postscript.

@Talvi Wilson noted it used in python '\v'.

print("hello\vworld")

Output:

hello
     world

The above output appears to result in the default vertical size being one line. I have tested with perl "\013" and the same output occurs. This could be used to do line feed without a carriage return on devices with convert linefeed to carriage-return + linefeed.

11
  • 16
    It could also be use to scroll the screen quickly. Useful in the days of 300 Baud. Commented Aug 1, 2010 at 3:08
  • 9
    And some data providers like TechData use it in CSV files to replace \n.
    – Wiliam
    Commented Nov 12, 2013 at 9:05
  • 2
    @BillThor: Great, but what was the exact specification of VT? What did it actually do? I assume, based on your description, that it moved the imaginary "cursor" vertically down to the next "vertical tab" position. But did it also return the cursor to the beginning of the line? Or did it keep the X position of the cursor unchanged? Commented Nov 8, 2014 at 15:57
  • 3
    @AnderyT I believe the specification was to advance to the next tab stop down. Any horizontal movement would depend on the device. Line-feed was specified to advance to the next line, some devices would perform a carriage return as well, others would just advance the line and continue printing at the next character position. The stty onlret option provided consistent behavior by adding a carriage return to any line feeds.
    – BillThor
    Commented Nov 8, 2014 at 16:28
  • 2
    @ValentinHeinitz Interesting re-purposing of the <VT>. There are control characters that are meant for that purpose such as <SOH> (start of heading), <SOT> (start of text) and the separator characters <FS>, <GS>, <RS>, and <FS>, all of which may be more obscure than <VT>.
    – BillThor
    Commented Jul 30, 2015 at 13:41
79

Microsoft Word uses VT as a line separator in order to distinguish it from the normal new line function, which is used as a paragraph separator.

5
  • 13
    So, this is shift-enter? Commented Mar 5, 2014 at 0:34
  • @dan04: Can you please update the link to the Microsoft Wordk KB article? Commented Aug 27, 2015 at 19:09
  • 2
    This does also apply to OneNote (and probably every other MS Office Product with Word-like input). And contrary to @PraveenKumar, it does this when hitting Shift+Enter, not Ctrl+Enter. The latter does nothing, at least in my case.
    – Gerrit-K
    Commented Mar 17, 2017 at 10:45
  • @paulroho in Word, yes, in OneNote, no. I'm afraid that my previous statement about "probably every other MS Office Product with Word-like input" is not correct, as OneNote's input is not really an MS Office integration but rather a lookalike ... nevertheless, my second statement should still be valid: Shift+Enter inserts VT, not Ctrl+Enter (which inserts page break in Word and nothing in OneNote).
    – Gerrit-K
    Commented Apr 19, 2017 at 7:00
  • In Google Docs/Sheets/Slides/etc., the same thing holds true. The keyboard shortcut is Shift+Enter. Commented Mar 27, 2019 at 0:38
24

In the medical industry, VT is used as the start of frame character in the MLLP/LLP/HLLP protocols that are used to frame HL-7 data, which has been a standard for medical exchange since the late 80s and is still in wide use.

17

It was used during the typewriter era to move down a page to the next vertical stop, typically spaced 6 lines apart (much the same way horizontal tabs move along a line by 8 characters).

In modern day settings, the vt is of very little, if any, significance.

15

The ASCII vertical tab (\x0B)is still used in some databases and file formats as a new line WITHIN a field. For example:

6

I have found that the VT char is used in pptx text boxes at the end of each line shown in the box in oder to adjust the text to the size of the box. It seems to be automatically generated by powerpoint (not introduced by the user) in order to move the text to the next line and fix the complete text block to the text box. In the example below, in the position of §:

"This is a text §
inside a text box"
3

A vertical tab was the opposite of a line feed i.e. it went upwards by one line. It had nothing to do with tab positions. If you want to prove this, try it on an RS232 terminal.

1
  • 1
    I had hoped to have used the vertical tab in Python to navigate the console screen in Microsoft Windows console. But library msvcrt.putch(b'\v') does not operate so.
    – DevPlayer
    Commented Feb 2, 2019 at 17:22
2

I believe it's still being used, not sure exactly. There might be even a key combination of it.

As English is written Left to Right, Arabic Right to Left, there are languages in world that are also written top to bottom. In that case a vertical tab might be useful same as the horizontal tab is used for English text.

I tried searching, but couldn't find anything useful yet.

1
  • 11
    I thought of this, but then dismissed it because in vertical languages a normal tab would be semantically appropriate. Commented May 2, 2014 at 16:13
2

Similar to R0byn's experience (answer now hidden), I was experimenting with a Powerpoint slide presentation and dumped out the main body of text on the slide, finding that all the places where one would typically find carriage return (ASCII 13/0x0d/^M) or line feed/new line (ASCII 10/0x0a/^J) characters, it uses vertical tab (ASCII 11/0x0b/^K) instead, presumably for the exact reason that dan04 described above for Word: to serve as a "newline" while staying within the same paragraph. Good question though as I totally thought this character would be as useless as a teletype terminal today.

0

I tried this code:

print("hello\vbanana")

on the Python 3.10.11 IDLE and got:

hellobanana

Then, I tried the same code in the command prompt and got:

hello
banana

So in some places, it renders as a weird character and on others it renders exactly like a newline. Note that I ran this on a Windows 11 computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.