aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-01-03 10:07:43 +0000
committerGitHub <noreply@github.com>2023-01-03 10:07:43 +0000
commit5841a97500bffa5a2b9eed2eb41025f5587790ba (patch)
tree7df7a9a5612e134080f67ff8b4db5b795f4a26b0 /runtime/doc
parent7b76a3e7992bffca758b2e52548d2f483a45eaf6 (diff)
downloadrneovim-5841a97500bffa5a2b9eed2eb41025f5587790ba.tar.gz
rneovim-5841a97500bffa5a2b9eed2eb41025f5587790ba.tar.bz2
rneovim-5841a97500bffa5a2b9eed2eb41025f5587790ba.zip
feat!: remove hardcopy
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/eval.txt19
-rw-r--r--runtime/doc/help.txt5
-rw-r--r--runtime/doc/index.txt1
-rw-r--r--runtime/doc/news.txt11
-rw-r--r--runtime/doc/options.txt58
-rw-r--r--runtime/doc/pi_netrw.txt9
-rw-r--r--runtime/doc/print.txt629
-rw-r--r--runtime/doc/quickref.txt8
-rw-r--r--runtime/doc/usr_06.txt57
-rw-r--r--runtime/doc/usr_toc.txt3
-rw-r--r--runtime/doc/various.txt4
-rw-r--r--runtime/doc/vi_diff.txt4
-rw-r--r--runtime/doc/vim_diff.txt12
13 files changed, 36 insertions, 784 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 8dd79d45a4..151036529d 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1718,17 +1718,13 @@ v:charconvert_to
Only valid while evaluating the 'charconvert' option.
*v:cmdarg* *cmdarg-variable*
-v:cmdarg This variable is used for two purposes:
- 1. The extra arguments ("++p", "++enc=", "++ff=") given to
- a file read/write command. This is set before an
- autocommand event for a file read/write command is
- triggered. There is a leading space to make it possible to
- append this variable directly after the read/write command.
- Note: "+cmd" isn't included here, because it will be
- executed anyway.
- 2. When printing a PostScript file with ":hardcopy" this is
- the argument for the ":hardcopy" command. This can be used
- in 'printexpr'.
+v:cmdarg
+ The extra arguments ("++p", "++enc=", "++ff=") given to a file
+ read/write command. This is set before an autocommand event
+ for a file read/write command is triggered. There is a
+ leading space to make it possible to append this variable
+ directly after the read/write command. Note: "+cmd" isn't
+ included here, because it will be executed anyway.
*v:collate* *collate-variable*
v:collate The current locale setting for collation order of the runtime
@@ -1926,7 +1922,6 @@ v:fname_in The name of the input file. Valid while evaluating:
'charconvert' file to be converted
'diffexpr' original file
'patchexpr' original file
- 'printexpr' file to be printed
And set to the swap file name for |SwapExists|.
*v:fname_out* *fname_out-variable*
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 9cf0ea69f2..07f898f99c 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -169,11 +169,6 @@ DEVELOPING NVIM
|dev-style| Development style guidelines
|debug.txt| Debugging Vim itself
-------------------------------------------------------------------------------
-OTHER
-
-|print.txt| For your briefcase and fax machine
-
*standard-plugin-list*
Standard plugins ~
|matchit.txt| Extended |%| matching
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 66353e05f3..a6aa036b55 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1310,7 +1310,6 @@ tag command action ~
|:grepadd| :grepa[dd] like :grep, but append to current list
|:gui| :gu[i] start the GUI
|:gvim| :gv[im] start the GUI
-|:hardcopy| :ha[rdcopy] send text to the printer
|:help| :h[elp] open a help window
|:helpclose| :helpc[lose] close one help window
|:helpgrep| :helpg[rep] like ":grep" but searches help files
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 1a242e9128..ffc8ce2c88 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -34,6 +34,17 @@ The following changes may require adaptations in user config or plugins.
See https://github.com/neovim/neovim/pull/20545 for more information.
+• `:hardcopy` is now removed (see |hardcopy| and |nvim-features-removed|):
+ - Commands removed:
+ - `:hardcopy`
+ - Options removed:
+ - `printdevice`
+ - `printencoding`
+ - `printexpr`
+ - `printfont`
+ - `printheader`
+ - `printmbcharset`
+
==============================================================================
NEW FEATURES *news-features*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index f4eb49953d..ee6c14e73f 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -163,7 +163,7 @@ halved and when you expect the backslashes to be kept. The third gives a
result which is probably not what you want. Avoid it.
*add-option-flags* *remove-option-flags*
- *E539* *E550* *E551* *E552*
+ *E539*
Some options are a list of flags. When you want to add a flag to such an
option, without changing the existing ones, you can do it like this: >
:set guioptions+=a
@@ -4681,58 +4681,6 @@ A jump table for the options with a short description can be found at |Q_op|.
set. It's normally not set directly, but by using one of the commands
|:ptag|, |:pedit|, etc.
- *'printdevice'* *'pdev'*
-'printdevice' 'pdev' string (default empty)
- global
- The name of the printer to be used for |:hardcopy|.
- See |pdev-option|.
- This option cannot be set from a |modeline| or in the |sandbox|, for
- security reasons.
-
- *'printencoding'* *'penc'*
-'printencoding' 'penc' string (default empty, except for some systems)
- global
- Sets the character encoding used when printing.
- See |penc-option|.
-
- *'printexpr'* *'pexpr'*
-'printexpr' 'pexpr' string (default: see below)
- global
- Expression used to print the PostScript produced with |:hardcopy|.
- See |pexpr-option|.
- This option cannot be set from a |modeline| or in the |sandbox|, for
- security reasons.
-
- *'printfont'* *'pfn'*
-'printfont' 'pfn' string (default "courier")
- global
- The name of the font that will be used for |:hardcopy|.
- See |pfn-option|.
-
- *'printheader'* *'pheader'*
-'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
- global
- The format of the header produced in |:hardcopy| output.
- See |pheader-option|.
-
- *'printmbcharset'* *'pmbcs'*
-'printmbcharset' 'pmbcs' string (default "")
- global
- The CJK character set to be used for CJK output from |:hardcopy|.
- See |pmbcs-option|.
-
- *'printmbfont'* *'pmbfn'*
-'printmbfont' 'pmbfn' string (default "")
- global
- List of font names to be used for CJK output from |:hardcopy|.
- See |pmbfn-option|.
-
- *'printoptions'* *'popt'*
-'printoptions' 'popt' string (default "")
- global
- List of items that control the format of the output of |:hardcopy|.
- See |popt-option|.
-
*'pumblend'* *'pb'*
'pumblend' 'pb' number (default 0)
global
@@ -5004,7 +4952,6 @@ A jump table for the options with a short description can be found at |Q_op|.
pack/ packages |:packadd|
parser/ |treesitter| syntax parsers
plugin/ plugin scripts |write-plugin|
- print/ files for printing |postscript-print-encoding|
query/ |treesitter| queries
rplugin/ |remote-plugin| scripts
spell/ spell checking files |spell|
@@ -6126,7 +6073,6 @@ A jump table for the options with a short description can be found at |Q_op|.
o N Byte number in file of byte under cursor, first byte is 1.
Mnemonic: Offset from start of file (with one added)
O N As above, in hexadecimal.
- N N Printer page number. (Only works in the 'printheader' option.)
l N Line number.
L N Number of lines in buffer.
c N Column number (byte index).
@@ -6407,7 +6353,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the |:retab| command, and the 'softtabstop' option.
Note: Setting 'tabstop' to any other value than 8 can make your file
- appear wrong in many places, e.g., when printing it.
+ appear wrong in many places.
The value must be more than 0 and less than 10000.
There are four main ways to use tabs in Vim:
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 9de1233979..5167b4baf7 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -2419,15 +2419,6 @@ from the current window (where one does the mf) to the target.
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
-MARKED FILES: PRINTING *netrw-mp* {{{2
- (See |netrw-mf| and |netrw-mr| for how to mark files)
- (uses the local marked file list)
-
-When "mp" is used, netrw will apply the |:hardcopy| command to marked files.
-What netrw does is open each file in a one-line window, execute hardcopy, then
-close the one-line window.
-
-
MARKED FILES: SOURCING *netrw-ms* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
(uses the local marked file list)
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
deleted file mode 100644
index ef3e47d32c..0000000000
--- a/runtime/doc/print.txt
+++ /dev/null
@@ -1,629 +0,0 @@
-*print.txt* Nvim
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-
-
-Printing *printing*
-
- Type |gO| to see the table of contents.
-
-==============================================================================
-1. Introduction *print-intro*
-
-On MS-Windows Vim can print your text on any installed printer. On other
-systems a PostScript file is produced. This can be directly sent to a
-PostScript printer. For other printers a program like ghostscript needs to be
-used.
-
-Note: If you have problems printing with |:hardcopy|, an alternative is to use
-|:TOhtml| and print the resulting html file from a browser.
-
- *:ha* *:hardcopy* *E237* *E238* *E324*
-:[range]ha[rdcopy][!] [arguments]
- Send [range] lines (default whole file) to the
- printer.
-
- On MS-Windows a dialog is displayed to allow selection
- of printer, paper size etc. To skip the dialog, use
- the [!]. In this case the printer defined by
- 'printdevice' is used, or, if 'printdevice' is empty,
- the system default printer.
-
- For systems other than MS-Windows, PostScript is
- written in a temp file and 'printexpr' is used to
- actually print it. Then [arguments] can be used by
- 'printexpr' through |v:cmdarg|. Otherwise [arguments]
- is ignored. 'printoptions' can be used to specify
- paper size, duplex, etc.
- Note: If you want PDF, there are tools such as
- "ps2pdf" that can convert the PostScript to PDF.
-
-:[range]ha[rdcopy][!] >{filename}
- As above, but write the resulting PostScript in file
- {filename}.
- Things like "%" are expanded |cmdline-special|
- Careful: An existing file is silently overwritten.
- On MS-Windows use the "print to file" feature of the
- printer driver.
-
-Progress is displayed during printing as a page number and a percentage. To
-abort printing use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).
-
-Printer output is controlled by the 'printfont' and 'printoptions' options.
-'printheader' specifies the format of a page header.
-
-The printed file is always limited to the selected margins, irrespective of
-the current window's 'wrap' or 'linebreak' settings. The "wrap" item in
-'printoptions' can be used to switch wrapping off.
-The current highlighting colors are used in the printout, with the following
-considerations:
-1) The normal background is always rendered as white (i.e. blank paper).
-2) White text or the default foreground is rendered as black, so that it shows
- up!
-3) If 'background' is "dark", then the colours are darkened to compensate for
- the fact that otherwise they would be too bright to show up clearly on
- white paper.
-
-==============================================================================
-2. Print options *print-options*
-
-Here are the details for the options that change the way printing is done.
-For generic info about setting options see |options.txt|.
-
- *pdev-option*
-'printdevice' 'pdev' string (default empty)
- global
-This defines the name of the printer to be used when the |:hardcopy| command
-is issued with a bang (!) to skip the printer selection dialog. On Win32, it
-should be the printer name exactly as it appears in the standard printer
-dialog.
-If the option is empty, then vim will use the system default printer for
-":hardcopy!"
-
- *penc-option* *E620*
-'printencoding' 'penc' String (default empty, except for:
- Windows: cp1252,
- Macintosh: mac-roman,
- HPUX: hp-roman8)
- global
-Sets the character encoding used when printing. This option tells Vim which
-print character encoding file from the "print" directory in 'runtimepath' to
-use.
-
-This option will accept any value from |encoding-names|. Any recognized names
-are converted to Vim standard names - see 'encoding' for more details. Names
-not recognized by Vim will just be converted to lower case and underscores
-replaced with '-' signs.
-
-If 'printencoding' is empty or Vim cannot find the file then it will use
-'encoding' (if it is set an 8-bit encoding) to find the print character
-encoding file. If Vim is unable to find a character encoding file then it
-will use the "latin1" print character encoding file.
-
-When 'encoding' is set to a multibyte encoding, Vim will try to convert
-characters to the printing encoding for printing (if 'printencoding' is empty
-then the conversion will be to latin1). If no conversion is possible then
-printing will fail. Any characters that cannot be converted will be replaced
-with upside down question marks.
-
-Two print character encoding files are provided to support default Mac and
-HPUX character encodings and are used by default on these platforms. Code page
-1252 print character encoding is used by default on the Windows platform.
-
- *pexpr-option*
-'printexpr' 'pexpr' String (default: see below)
- global
-Expression that is evaluated to print the PostScript produced with
-|:hardcopy|.
-The file name to be printed is in |v:fname_in|.
-The arguments to the ":hardcopy" command are in |v:cmdarg|.
-The expression must take care of deleting the file after printing it.
-When there is an error, the expression must return a non-zero number.
-If there is no error, return zero or an empty string.
-The default for non MS-Windows systems is to simply use "lpr" to print the
-file: >
-
- system(['lpr']
- + (empty(&printdevice)?[]:['-P', &printdevice])
- + [v:fname_in])
- .. delete(v:fname_in)
- + v:shell_error
-
-On MS-Dos and MS-Windows machines the default is to copy the file to the
-currently specified printdevice: >
-
- system(['copy', v:fname_in, empty(&printdevice)?'LPT1':&printdevice])
- .. delete(v:fname_in)
-
-If you change this option, using a function is an easy way to avoid having to
-escape all the spaces. Example: >
-
- :set printexpr=PrintFile(v:fname_in)
- :function PrintFile(fname)
- : call system("ghostview " .. a:fname)
- : call delete(a:fname)
- : return v:shell_error
- :endfunc
-
-Be aware that some print programs return control before they have read the
-file. If you delete the file too soon it will not be printed. These programs
-usually offer an option to have them remove the file when printing is done.
- *E365*
-If evaluating the expression fails or it results in a non-zero number, you get
-an error message. In that case Vim will delete the file. In the default
-value for non-MS-Windows a trick is used: Adding "v:shell_error" will result
-in a non-zero number when the system() call fails.
-
-If the expression starts with s: or |<SID>|, then it is replaced with the
-script ID (|local-function|). Example: >
- set printexpr=s:MyPrintFile()
- set printexpr=<SID>SomePrintFile()
-<
-This option cannot be set from a |modeline| or in the |sandbox|, for security
-reasons.
-
- *pfn-option* *E613*
-'printfont' 'pfn' string (default "courier")
- global
-This is the name of the font that will be used for the |:hardcopy| command's
-output. It has the same format as the 'guifont' option, except that only one
-font may be named, and the special "guifont=*" syntax is not available.
-
-In the Win32 GUI version this specifies a font name with its extra attributes,
-as with the 'guifont' option.
-
-For other systems, only ":h11" is recognized, where "11" is the point size of
-the font. When omitted, the point size is 10.
-
- *pheader-option*
-'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
- global
-This defines the format of the header produced in |:hardcopy| output. The
-option is defined in the same way as the 'statusline' option. The same simple
-header is used when this option is empty.
-
- *pmbcs-option*
-'printmbcharset' 'pmbcs' string (default "")
- global
-Sets the CJK character set to be used when generating CJK output from
-|:hardcopy|. The following predefined values are currently recognised by Vim:
-
- Value Description ~
- Chinese GB_2312-80
- (Simplified) GBT_12345-90
- MAC Apple Mac Simplified Chinese
- GBT-90_MAC GB/T 12345-90 Apple Mac Simplified
- Chinese
- GBK GBK (GB 13000.1-93)
- ISO10646 ISO 10646-1:1993
-
- Chinese CNS_1993 CNS 11643-1993, Planes 1 & 2
- (Traditional) BIG5
- ETEN Big5 with ETen extensions
- ISO10646 ISO 10646-1:1993
-
- Japanese JIS_C_1978
- JIS_X_1983
- JIS_X_1990
- MSWINDOWS Win3.1/95J (JIS X 1997 + NEC +
- IBM extensions)
- KANJITALK6 Apple Mac KanjiTalk V6.x
- KANJITALK7 Apple Mac KanjiTalk V7.x
-
- Korean KS_X_1992
- MAC Apple Macintosh Korean
- MSWINDOWS KS X 1992 with MS extensions
- ISO10646 ISO 10646-1:1993
-
-Only certain combinations of the above values and 'printencoding' are
-possible. The following tables show the valid combinations:
-
- euc-cn gbk ucs-2 utf-8 ~
- Chinese GB_2312-80 x
- (Simplified) GBT_12345-90 x
- MAC x
- GBT-90_MAC x
- GBK x
- ISO10646 x x
-
- euc-tw big5 ucs-2 utf-8 ~
- Chinese CNS_1993 x
- (Traditional) BIG5 x
- ETEN x
- ISO10646 x x
-
- euc-jp sjis ucs-2 utf-8 ~
- Japanese JIS_C_1978 x x
- JIS_X_1983 x x
- JIS_X_1990 x x x
- MSWINDOWS x
- KANJITALK6 x
- KANJITALK7 x
-
- euc-kr cp949 ucs-2 utf-8 ~
- Korean KS_X_1992 x
- MAC x
- MSWINDOWS x
- ISO10646 x x
-
-To set up the correct encoding and character set for printing some
-Japanese text you would do the following; >
- :set printencoding=euc-jp
- :set printmbcharset=JIS_X_1983
-
-If 'printmbcharset' is not one of the above values then it is assumed to
-specify a custom multibyte character set and no check will be made that it is
-compatible with the value for 'printencoding'. Vim will look for a file
-defining the character set in the "print" directory in 'runtimepath'.
-
- *pmbfn-option*
-'printmbfont' 'pmbfn' string (default "")
- global
-This is a comma-separated list of fields for font names to be used when
-generating CJK output from |:hardcopy|. Each font name has to be preceded
-with a letter indicating the style the font is to be used for as follows:
-
- r:{font-name} font to use for normal characters
- b:{font-name} font to use for bold characters
- i:{font-name} font to use for italic characters
- o:{font-name} font to use for bold-italic characters
-
-A field with the r: prefix must be specified when doing CJK printing. The
-other fontname specifiers are optional. If a specifier is missing then
-another font will be used as follows:
-
- if b: is missing, then use r:
- if i: is missing, then use r:
- if o: is missing, then use b:
-
-Some CJK fonts do not contain characters for codes in the ASCII code range.
-Also, some characters in the CJK ASCII code ranges differ in a few code points
-from traditional ASCII characters. There are two additional fields to control
-printing of characters in the ASCII code range.
-
- c:yes Use Courier font for characters in the ASCII
- c:no (default) code range.
-
- a:yes Use ASCII character set for codes in the ASCII
- a:no (default) code range.
-
-The following is an example of specifying two multibyte fonts, one for normal
-and italic printing and one for bold and bold-italic printing, and using
-Courier to print codes in the ASCII code range but using the national
-character set: >
- :set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,c:yes
-<
- *popt-option*
-'printoptions' 'popt' string (default "")
- global
-This is a comma-separated list of items that control the format of the output
-of |:hardcopy|:
-
- left:{spec} left margin (default: 10pc)
- right:{spec} right margin (default: 5pc)
- top:{spec} top margin (default: 5pc)
- bottom:{spec} bottom margin (default: 5pc)
- {spec} is a number followed by "in" for inches, "pt"
- for points (1 point is 1/72 of an inch), "mm" for
- millimeters or "pc" for a percentage of the media
- size.
- Weird example:
- left:2in,top:30pt,right:16mm,bottom:3pc
- If the unit is not recognized there is no error and
- the default value is used.
-
- header:{nr} Number of lines to reserve for the header.
- Only the first line is actually filled, thus when {nr}
- is 2 there is one empty line. The header is formatted
- according to 'printheader'.
- header:0 Do not print a header.
- header:2 (default) Use two lines for the header
-
- syntax:n Do not use syntax highlighting. This is faster and
- thus useful when printing large files.
- syntax:y Do syntax highlighting.
- syntax:a (default) Use syntax highlighting if the printer appears to be
- able to print color or grey.
-
- number:y Include line numbers in the printed output.
- number:n (default) No line numbers.
-
- wrap:y (default) Wrap long lines.
- wrap:n Truncate long lines.
-
- duplex:off Print on one side.
- duplex:long (default) Print on both sides (when possible), bind on long
- side.
- duplex:short Print on both sides (when possible), bind on short
- side.
-
- collate:y (default) Collating: 1 2 3, 1 2 3, 1 2 3
- collate:n No collating: 1 1 1, 2 2 2, 3 3 3
-
- jobsplit:n (default) Do all copies in one print job
- jobsplit:y Do each copy as a separate print job. Useful when
- doing N-up postprocessing.
-
- portrait:y (default) Orientation is portrait.
- portrait:n Orientation is landscape.
- *a4* *letter*
- paper:A4 (default) Paper size: A4
- paper:{name} Paper size from this table:
- {name} size in cm size in inch ~
- 10x14 25.4 x 35.57 10 x 14
- A3 29.7 x 42 11.69 x 16.54
- A4 21 x 29.7 8.27 x 11.69
- A5 14.8 x 21 5.83 x 8.27
- B4 25 x 35.3 10.12 x 14.33
- B5 17.6 x 25 7.17 x 10.12
- executive 18.42 x 26.67 7.25 x 10.5
- folio 21 x 33 8.27 x 13
- ledger 43.13 x 27.96 17 x 11
- legal 21.59 x 35.57 8.5 x 14
- letter 21.59 x 27.96 8.5 x 11
- quarto 21.59 x 27.5 8.5 x 10.83
- statement 13.97 x 21.59 5.5 x 8.5
- tabloid 27.96 x 43.13 11 x 17
-
- formfeed:n (default) Treat form feed characters (0x0c) as a normal print
- character.
- formfeed:y When a form feed character is encountered, continue
- printing of the current line at the beginning of the
- first line on a new page.
-
-The item indicated with (default) is used when the item is not present. The
-values are not always used, especially when using a dialog to select the
-printer and options.
-Example: >
- :set printoptions=paper:letter,duplex:off
-
-==============================================================================
-3. PostScript Printing *postscript-printing*
- *E455* *E456* *E457* *E624*
-Provided you have enough disk space there should be no problems generating a
-PostScript file. You need to have the runtime files correctly installed (if
-you can find the help files, they probably are).
-
-There are currently a number of limitations with PostScript printing:
-
-- 'printfont' - The font name is ignored (the Courier family is always used -
- it should be available on all PostScript printers) but the font size is
- used.
-
-- 'printoptions' - The duplex setting is used when generating PostScript
- output, but it is up to the printer to take notice of the setting. If the
- printer does not support duplex printing then it should be silently ignored.
- Some printers, however, don't print at all.
-
-- 8-bit support - While a number of 8-bit print character encodings are
- supported it is possible that some characters will not print. Whether a
- character will print depends on the font in the printer knowing the
- character. Missing characters will be replaced with an upside down question
- mark, or a space if that character is also not known by the font. It may be
- possible to get all the characters in an encoding to print by installing a
- new version of the Courier font family.
-
-- Multi-byte support - Currently Vim will try to convert multibyte characters
- to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
- empty). Any characters that are not successfully converted are shown as
- unknown characters. Printing will fail if Vim cannot convert the multibyte
- to the 8-bit encoding.
-
-==============================================================================
-4. Custom 8-bit Print Character Encodings *postscript-print-encoding*
- *E618* *E619*
-To use your own print character encoding when printing 8-bit character data
-you need to define your own PostScript font encoding vector. Details on how
-to define a font encoding vector is beyond the scope of this help file, but
-you can find details in the PostScript Language Reference Manual, 3rd Edition,
-published by Addison-Wesley and available in PDF form at
-https://www.adobe.com/. The following describes what you need to do for Vim to
-locate and use your print character encoding.
-
-i. Decide on a unique name for your encoding vector, one that does not clash
- with any of the recognized or standard encoding names that Vim uses (see
- |encoding-names| for a list), and that no one else is likely to use.
-ii. Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
- 'runtimepath' and rename it with your unique name.
-iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
- with your unique name (don't forget the line starting %%Title:), and
- modify the array of glyph names to define your new encoding vector. The
- array must have exactly 256 entries or you will not be able to print!
-iv. Within Vim, set 'printencoding' to your unique encoding name and then
- print your file. Vim will now use your custom print character encoding.
-
-Vim will report an error with the resource file if you change the order or
-content of the first 3 lines, other than the name of the encoding on the line
-starting %%Title: or the version number on the line starting %%Version:.
-
-[Technical explanation for those that know PostScript - Vim looks for a file
-with the same name as the encoding it will use when printing. The file
-defines a new PostScript Encoding resource called /VIM-name, where name is the
-print character encoding Vim will use.]
-
-==============================================================================
-5. PostScript CJK Printing *postscript-cjk-printing*
- *E673* *E674* *E675*
-
-Vim supports printing of Chinese, Japanese, and Korean files. Setting up Vim
-to correctly print CJK files requires setting up a few more options.
-
-Each of these countries has many standard character sets and encodings which
-require that both be specified when printing. In addition, CJK fonts normally
-do not have the concept of italic glyphs and use different weight or stroke
-style to achieve emphasis when printing. This in turn requires a different
-approach to specifying fonts to use when printing.
-
-The encoding and character set are specified with the 'printencoding' and
-'printmbcharset' options. If 'printencoding' is not specified then 'encoding'
-is used as normal. If 'printencoding' is specified then characters will be
-translated to this encoding for printing. You should ensure that the encoding
-is compatible with the character set needed for the file contents or some
-characters may not appear when printed.
-
-The fonts to use for CJK printing are specified with 'printmbfont'. This
-option allows you to specify different fonts to use when printing characters
-which are syntax highlighted with the font styles normal, italic, bold and
-bold-italic.
-
-Please read your printer documentation on how to install new fonts.
-
-CJK fonts can be large containing several thousand glyphs, and it is not
-uncommon to find that they only contain a subset of a national standard. It
-is not unusual to find the fonts to not include characters for codes in the
-ASCII code range. If you find half-width Roman characters are not appearing
-in your printout then you should configure Vim to use the Courier font the
-half-width ASCII characters with 'printmbfont'. If your font does not include
-other characters then you will need to find another font that does.
-
-Another issue with ASCII characters, is that the various national character
-sets specify a couple of different glyphs in the ASCII code range. If you
-print ASCII text using the national character set you may see some unexpected
-characters. If you want true ASCII code printing then you need to configure
-Vim to output ASCII characters for the ASCII code range with 'printmbfont'.
-
-It is possible to define your own multibyte character set although this
-should not be attempted lightly. A discussion on the process if beyond the
-scope of these help files. You can find details on CMap (character map) files
-in the document 'Adobe CMap and CIDFont Files Specification, Version 1.0',
-available from https://www.adobe.com as a PDF file.
-
-==============================================================================
-6. PostScript Printing Troubleshooting *postscript-print-trouble*
- *E621*
-Usually the only sign of a problem when printing with PostScript is that your
-printout does not appear. If you are lucky you may get a printed page that
-tells you the PostScript operator that generated the error that prevented the
-print job completing.
-
-There are a number of possible causes as to why the printing may have failed:
-
-- Wrong version of the prolog resource file. The prolog resource file
- contains some PostScript that Vim needs to be able to print. Each version
- of Vim needs one particular version. Make sure you have correctly installed
- the runtime files, and don't have any old versions of a file called prolog
- in the print directory in your 'runtimepath' directory.
-
-- Paper size. Some PostScript printers will abort printing a file if they do
- not support the requested paper size. By default Vim uses A4 paper. Find
- out what size paper your printer normally uses and set the appropriate paper
- size with 'printoptions'. If you cannot find the name of the paper used,
- measure a sheet and compare it with the table of supported paper sizes listed
- for 'printoptions', using the paper that is closest in both width AND height.
- Note: The dimensions of actual paper may vary slightly from the ones listed.
- If there is no paper listed close enough, then you may want to try psresize
- from PSUtils, discussed below.
-
-- Two-sided printing (duplex). Normally a PostScript printer that does not
- support two-sided printing will ignore any request to do it. However, some
- printers may abort the job altogether. Try printing with duplex turned off.
- Note: Duplex prints can be achieved manually using PS utils - see below.
-
-- Collated printing. As with Duplex printing, most PostScript printers that
- do not support collating printouts will ignore a request to do so. Some may
- not. Try printing with collation turned off.
-
-- Syntax highlighting. Some print management code may prevent the generated
- PostScript file from being printed on a black and white printer when syntax
- highlighting is turned on, even if solid black is the only color used. Try
- printing with syntax highlighting turned off.
-
-A safe printoptions setting to try is: >
-
- :set printoptions=paper:A4,duplex:off,collate:n,syntax:n
-
-Replace "A4" with the paper size that best matches your printer paper.
-
-==============================================================================
-7. PostScript Utilities *postscript-print-util*
-
-7.1 Ghostscript
-
-Ghostscript is a PostScript and PDF interpreter that can be used to display
-and print on non-PostScript printers PostScript and PDF files. It can also
-generate PDF files from PostScript.
-
-Ghostscript will run on a wide variety of platforms. Information on
-Ghostscript can be found at:
-
- http://www.ghostscript.com/
-
-Support for a number of non PostScript printers is provided in the
-distribution as standard, but if you cannot find support for your printer
-check the Ghostscript site for other printers not included by default.
-
-
-7.2 Ghostscript Previewers.
-
-The interface to Ghostscript is very primitive so a number of graphical front
-ends have been created. These allow easier PostScript file selection,
-previewing at different zoom levels, and printing. Check supplied
-documentation for full details.
-
-ALTERNATE DUPLEX PRINTING
-
-It is possible to achieve a poor man's version of duplex printing using the PS
-utility psselect. This utility has options -e and -o for printing just the
-even or odd pages of a PS file respectively.
-
-First generate a PS file with the ":hardcopy" command, then generate new
-files with all the odd and even numbered pages with: >
-
- psselect -o test.ps odd.ps
- psselect -e test.ps even.ps
-
-Next print odd.ps with your platform's normal print command. Then take the
-print output, turn it over and place it back in the paper feeder. Now print
-even.ps with your platform's print command. All the even pages should now
-appear on the back of the odd pages.
-
-There are a couple of points to bear in mind:
-
-1. Position of the first page. If the first page is on top of the printout
- when printing the odd pages then you need to reverse the order that the odd
- pages are printed. This can be done with the -r option to psselect. This
- will ensure page 2 is printed on the back of page 1.
- Note: it is better to reverse the odd numbered pages rather than the even
- numbered in case there are an odd number of pages in the original PS file.
-
-2. Paper flipping. When turning over the paper with the odd pages printed on
- them you may have to either flip them horizontally (along the long edge) or
- vertically (along the short edge), as well as possibly rotating them 180
- degrees. All this depends on the printer - it will be more obvious for
- desktop ink jets than for small office laser printers where the paper path
- is hidden from view.
-
-
-==============================================================================
-8. Formfeed Characters *printing-formfeed*
-
-By default Vim does not do any special processing of formfeed control
-characters. Setting the 'printoptions' formfeed item will make Vim recognize
-formfeed characters and continue printing the current line at the beginning
-of the first line on a new page. The use of formfeed characters provides
-rudimentary print control but there are certain things to be aware of.
-
-Vim will always start printing a line (including a line number if enabled)
-containing a formfeed character, even if it is the first character on the
-line. This means if a line starting with a formfeed character is the first
-line of a page then Vim will print a blank page.
-
-Since the line number is printed at the start of printing the line containing
-the formfeed character, the remainder of the line printed on the new page
-will not have a line number printed for it (in the same way as the wrapped
-lines of a long line when wrap in 'printoptions' is enabled).
-
-If the formfeed character is the last character on a line, then printing will
-continue on the second line of the new page, not the first. This is due to
-Vim processing the end of the line after the formfeed character and moving
-down a line to continue printing.
-
-Due to the points made above it is recommended that when formfeed character
-processing is enabled, printing of line numbers is disabled, and that form
-feed characters are not the last character on a line. Even then you may need
-to adjust the number of lines before a formfeed character to prevent
-accidental blank pages.
-
-==============================================================================
- vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index da136ade16..d0088f5b9b 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -821,14 +821,6 @@ Short explanation of each option: *option-list*
'previewheight' 'pvh' height of the preview window
'previewpopup' 'pvp' use popup window for preview
'previewwindow' 'pvw' identifies the preview window
-'printdevice' 'pdev' name of the printer to be used for :hardcopy
-'printencoding' 'penc' encoding to be used for printing
-'printexpr' 'pexpr' expression used to print PostScript for :hardcopy
-'printfont' 'pfn' name of the font to be used for :hardcopy
-'printheader' 'pheader' format of the header used for :hardcopy
-'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
-'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
-'printoptions' 'popt' controls the format of :hardcopy output
'pumheight' 'ph' maximum number of items to show in the popup menu
'pumwidth' 'pw' minimum width of the popup menu
'pyxversion' 'pyx' Python version used for pyx* commands
diff --git a/runtime/doc/usr_06.txt b/runtime/doc/usr_06.txt
index 8eda33b4f0..755e6e816a 100644
--- a/runtime/doc/usr_06.txt
+++ b/runtime/doc/usr_06.txt
@@ -14,8 +14,7 @@ screen.
|06.2| No or wrong colors?
|06.3| Different colors
|06.4| With colors or without colors
-|06.5| Printing with colors
-|06.6| Further reading
+|06.5| Further reading
Next chapter: |usr_07.txt| Editing more than one file
Previous chapter: |usr_05.txt| Set your settings
@@ -191,59 +190,7 @@ buffer, set the 'syntax' option: >
:set syntax=ON
<
==============================================================================
-*06.5* Printing with colors *syntax-printing*
-
-In the MS-Windows version you can print the current file with this command: >
-
- :hardcopy
-
-You will get the usual printer dialog, where you can select the printer and a
-few settings. If you have a color printer, the paper output should look the
-same as what you see inside Vim. But when you use a dark background the
-colors will be adjusted to look good on white paper.
-
-There are several options that change the way Vim prints:
- 'printdevice'
- 'printheader'
- 'printfont'
- 'printoptions'
-
-To print only a range of lines, use Visual mode to select the lines and then
-type the command: >
-
- v100j:hardcopy
-
-"v" starts Visual mode. "100j" moves a hundred lines down, they will be
-highlighted. Then ":hardcopy" will print those lines. You can use other
-commands to move in Visual mode, of course.
-
-This also works on Unix, if you have a PostScript printer. Otherwise, you
-will have to do a bit more work. You need to convert the text to HTML first,
-and then print it from a web browser.
-
-Convert the current file to HTML with this command: >
-
- :TOhtml
-
-In case that doesn't work: >
-
- :source $VIMRUNTIME/syntax/2html.vim
-
-You will see it crunching away, this can take quite a while for a large file.
-Some time later another window shows the HTML code. Now write this somewhere
-(doesn't matter where, you throw it away later):
->
- :write main.c.html
-
-Open this file in your favorite browser and print it from there. If all goes
-well, the output should look exactly as it does in Vim. See |2html.vim| for
-details. Don't forget to delete the HTML file when you are done with it.
-
-Instead of printing, you could also put the HTML file on a web server, and let
-others look at the colored text.
-
-==============================================================================
-*06.6* Further reading
+*06.5* Further reading
|usr_44.txt| Your own syntax highlighted.
|syntax| All the details.
diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt
index c61bb55c26..dd0d5784f5 100644
--- a/runtime/doc/usr_toc.txt
+++ b/runtime/doc/usr_toc.txt
@@ -111,8 +111,7 @@ Read this from start to end to learn the essential commands.
|06.2| No or wrong colors?
|06.3| Different colors
|06.4| With colors or without colors
- |06.5| Printing with colors
- |06.6| Further reading
+ |06.5| Further reading
|usr_07.txt| Editing more than one file
|07.1| Edit another file
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index cd178cfbbb..e13d892fd6 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -102,9 +102,7 @@ g8 Print the hex values of the bytes used in the
*:p* *:pr* *:print* *E749*
:[range]p[rint] [flags]
Print [range] lines (default current line).
- Note: If you are looking for a way to print your text
- on paper see |:hardcopy|. In the GUI you can use the
- File.Print menu entry.
+ In the GUI you can use the File.Print menu entry.
See |ex-flags| for [flags].
The |:filter| command can be used to only show lines
matching a pattern.
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index cef2859eb5..afabddb7f9 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -337,10 +337,6 @@ Viminfo.
The 'viminfo' option can be set to select which items to store in the
.viminfo file. This is off by default.
-Printing. |printing|
- The |:hardcopy| command sends text to the printer. This can include
- syntax highlighting.
-
Mouse support. |mouse-using|
The mouse is supported in the GUI version, in an xterm for Unix, for
BSDs with sysmouse, for Linux with gpm, and for Win32. It can be used
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 46d620e461..bb3b670b24 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -549,6 +549,7 @@ Aliases:
Commands:
:fixdel
+ :hardcopy
:helpfind
:mode (no longer accepts an argument)
:open
@@ -655,6 +656,12 @@ Options:
Use |g8| or |ga|. See |mbyte-combining|.
*'maxmem'* Nvim delegates memory-management to the OS.
*'maxmemtot'* Nvim delegates memory-management to the OS.
+ *'printdevice'*
+ *'printencoding'*
+ *'printexpr'*
+ *'printfont'*
+ *'printheader'*
+ *'printmbcharset'*
*'prompt'* *'noprompt'*
*'remap'* *'noremap'*
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
@@ -732,5 +739,10 @@ Cscope:
*cscope*
Cscope support has been removed in favour of LSP based solutions.
+Hardcopy:
+ *hardcopy*
+ `:hardcopy` was removed. Instead, use `:TOhtml` and print the resulting HTML
+ using a web browser or some other HTML viewer.
+
==============================================================================
vim:tw=78:ts=8:sw=2:et:ft=help:norl: