Vim Recall繁體中文

Send text to the printer

:hardcopy

Example

Normal 0 / 2

Send text to the printer.

Output file

example.ps
absent
Before & after

Before

Output file

example.ps
absent

After

PostScript output

example.ps
PostScript document containing the buffer line hello
Print destination
file; no printer job

Documentation-backed illustration. non-Windows Vim with +postscript and an available font/encoding setup; example.ps does not exist. :hardcopy >example.ps renders the buffer into a PostScript file; it does not invoke a printer for this form. Primary help: :hardcopy.

Sample buffer
hello
Cursor on line 1, column 1
Details & Vim help

Send text to the printer. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :ha[rdcopy] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.