0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00
goweol 8cfe52e6fb
man.vim: Recognise hyphenated-at-eol cross-references (#12609)
Manual pages requested for output may undergo formatting
arranged by some roff-descendant program. Lines longer
than MANWIDTH or COLUMNS or real-estate width of a device
(with support for horizontal scrolling considered) can be
divided at either blank characters and/or at groups of word
characters (syllables) according to supported hyphenation
rules (although page authors are free to disable hyphenation
or prevent particular words from being hyphenated).

Groff‘s manual describes it as follows:

    5.1.2 Hyphenation

    Since the odds are not great for finding a set of words, for
    every output line, which fit nicely on a line without
    inserting excessive amounts of space between words, gtroff
    hyphenates words so that it can justify lines without
    inserting too much space between words. It uses an internal
    hyphenation algorithm (a simplified version of the algorithm
    used within TeX) to indicate which words can be hyphenated
    and how to do so. When a word is hyphenated, the first part
    of the word is added to the current filled line being output
    (with an attached hyphen), and the other portion is added to
    the next line to be filled.

It would be expedient for autoload/dist/man.vim (along with
syntax/man.vim‘s highlighting and ftplugin/man.vim‘s Ctrl-],
\K mappings) to allow for hyphenation of cross-references
to manual pages.

For example,

  # Launch Vim [v9.0; patched: 1-1378, 1499] as follows:
  MANWIDTH=80 vim --not-a-term +MANPAGER '+Man man' '+/conv(1)' '+norm B'

  # Press Ctrl-] with cursor on _m_: "... use man‐
  # conv(1) directly."_______________________[^]
  #
  # (Man v2.11.2)

  # Launch Vim as follows:
  MANWIDTH=80 vim --not-a-term +MANPAGER '+Man git' '+/config(1)' '+norm B'

  # Press Ctrl-] with cursor on _g_: "... in git-
  # config(1) for a more ..."_______________[^]
  #
  # (Git v2.39.2)

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2023-08-17 23:13:29 +02:00
..
2023-02-02 13:59:48 +00:00
2023-02-02 13:59:48 +00:00
2021-10-04 21:32:54 +01:00
2017-03-05 17:04:09 +01:00
2021-01-11 19:40:15 +01:00
2022-08-08 15:42:38 +01:00
2021-09-09 21:55:11 +02:00
2021-09-09 21:55:11 +02:00
2021-09-09 21:55:11 +02:00
2020-12-10 21:11:27 +01:00
2017-03-05 17:04:09 +01:00
2020-01-25 13:27:42 +01:00
2010-01-06 20:54:52 +01:00
2022-04-27 15:25:03 +01:00
2017-12-17 17:17:07 +01:00
2021-07-28 20:10:16 +02:00
2017-03-05 17:04:09 +01:00
2021-11-07 20:27:04 +00:00
2011-12-30 13:11:27 +01:00
2020-05-07 18:56:00 +02:00
2020-11-05 20:41:49 +01:00
2020-11-05 20:41:49 +01:00
2021-09-09 21:55:11 +02:00
2020-10-11 13:57:40 +02:00
2018-01-28 22:47:25 +01:00
2022-07-29 21:36:21 +01:00
2021-11-16 19:18:26 +00:00
2023-02-02 13:59:48 +00:00
2016-09-25 22:11:48 +02:00
2016-10-11 08:57:33 +02:00
2020-11-05 20:41:49 +01:00
2019-09-27 19:34:08 +02:00
2022-07-01 18:45:04 +01:00
2017-03-05 17:04:09 +01:00
2017-11-02 22:58:42 +01:00
2019-09-27 19:34:08 +02:00
2022-07-25 15:42:07 +01:00
2020-03-19 20:37:11 +01:00
2015-10-13 23:21:27 +02:00
2022-11-09 21:21:04 +00:00
2020-11-29 14:36:24 +01:00
2020-11-29 14:36:24 +01:00
2017-03-05 17:04:09 +01:00
2010-01-06 20:54:52 +01:00
2016-09-22 22:33:02 +02:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-11-30 20:27:52 +01:00
2021-09-09 21:55:11 +02:00
2010-05-14 23:24:24 +02:00
2022-09-27 17:30:34 +01:00
2021-10-04 21:32:54 +01:00
2022-04-27 15:25:03 +01:00
2022-03-30 10:51:39 +01:00
2017-09-19 22:06:03 +02:00
2018-01-28 22:47:25 +01:00
2017-03-05 17:04:09 +01:00
2019-03-24 15:09:13 +01:00
2022-06-17 15:42:40 +01:00
2008-06-24 21:16:56 +00:00
2018-02-09 22:00:53 +01:00
2022-06-03 21:59:47 +01:00
2022-08-15 18:51:32 +01:00
2021-08-29 21:55:35 +02:00
2017-03-05 17:04:09 +01:00
2022-12-06 18:20:10 +00:00
2021-09-09 21:55:11 +02:00
2013-03-07 13:20:54 +01:00
2020-01-25 13:27:42 +01:00
2021-12-16 14:41:10 +00:00
2018-02-09 22:00:53 +01:00
2021-09-09 21:55:11 +02:00
2019-12-19 22:12:03 +01:00
2017-03-05 17:04:09 +01:00
2016-02-04 20:57:07 +01:00
2019-10-26 19:53:45 +02:00
2020-01-25 13:27:42 +01:00
2023-02-02 13:59:48 +00:00
2023-02-02 13:59:48 +00:00
2023-02-02 13:59:48 +00:00
2023-02-20 20:44:55 +00:00
2017-03-05 17:04:09 +01:00
2023-02-02 13:59:48 +00:00
2022-09-27 17:30:34 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2018-02-27 14:53:30 +01:00
2022-06-17 15:42:40 +01:00
2021-12-05 21:54:04 +00:00
2006-03-25 22:06:54 +00:00
2004-06-13 20:20:40 +00:00
2004-06-13 20:20:40 +00:00
2020-02-15 21:41:42 +01:00
2023-02-20 20:44:55 +00:00
2021-03-31 20:07:33 +02:00
2022-06-26 12:21:15 +01:00
2010-01-06 20:54:52 +01:00
2021-12-24 13:18:38 +00:00
2023-05-14 18:50:25 +01:00
2021-01-02 16:39:53 +01:00
2020-10-26 21:12:46 +01:00
2017-03-05 17:04:09 +01:00
2020-06-07 21:07:18 +02:00
2020-01-25 13:27:42 +01:00
2022-10-03 18:04:35 +01:00
2022-03-30 10:51:39 +01:00
2017-03-05 17:04:09 +01:00
2020-01-25 13:27:42 +01:00
2022-07-06 13:18:11 +01:00
2023-02-20 20:44:55 +00:00
2021-09-09 21:55:11 +02:00
2017-09-19 22:06:03 +02:00
2023-02-02 13:59:48 +00:00
2023-08-15 23:05:00 +02:00
2021-05-02 17:19:11 +02:00
2017-03-05 17:04:09 +01:00
2023-02-20 20:44:55 +00:00
2021-11-16 19:18:26 +00:00
2022-09-04 17:45:43 +01:00
2022-09-18 13:04:22 +01:00
2022-08-30 20:26:34 +01:00
2021-08-29 21:55:35 +02:00
2021-01-02 16:39:53 +01:00
2022-01-08 21:51:59 +00:00
2022-09-10 13:13:14 +01:00
2022-01-08 21:51:59 +00:00
2019-12-05 22:47:25 +01:00
2022-09-10 13:13:14 +01:00
2017-11-02 22:58:42 +01:00
2022-01-08 21:51:59 +00:00
2021-11-16 19:18:26 +00:00
2023-02-20 20:44:55 +00:00
2023-04-22 22:40:14 +01:00
2021-09-21 20:09:51 +02:00
2021-03-31 20:07:33 +02:00
2021-02-13 18:14:48 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2021-06-13 19:02:49 +02:00
2022-09-27 17:30:34 +01:00
2019-12-05 22:47:25 +01:00
2021-09-09 21:55:11 +02:00
2022-09-27 17:30:34 +01:00
2020-10-11 13:57:40 +02:00
2021-11-07 20:27:04 +00:00
2022-12-31 15:30:45 +00:00
2022-09-27 17:30:34 +01:00
2019-09-27 19:34:08 +02:00
2023-04-22 22:40:14 +01:00
2017-03-05 17:04:09 +01:00
2023-02-20 20:44:55 +00:00
2022-07-29 21:36:21 +01:00
2020-10-11 13:57:40 +02:00
2007-05-05 17:54:07 +00:00
2022-06-17 15:42:40 +01:00
2021-09-09 21:55:11 +02:00
2021-11-21 21:13:36 +00:00
2017-03-05 17:04:09 +01:00
2022-06-17 15:42:40 +01:00
2019-11-20 22:31:13 +01:00
2022-06-17 15:42:40 +01:00
2023-08-13 10:25:41 +02:00
2019-11-17 15:55:14 +01:00
2020-03-19 20:37:11 +01:00
2022-06-09 20:45:54 +01:00
2022-06-09 20:45:54 +01:00
2019-11-17 15:55:14 +01:00
2011-06-19 05:09:16 +02:00
2019-09-20 14:38:13 +02:00
2021-07-07 20:26:08 +02:00
2021-08-14 21:25:52 +02:00
2015-06-09 19:44:55 +02:00
2014-06-12 21:46:14 +02:00
2023-02-02 13:59:48 +00:00
2023-04-22 22:40:14 +01:00
2017-03-05 17:04:09 +01:00
2020-10-11 13:57:40 +02:00
2020-11-29 14:36:24 +01:00
2017-03-05 17:04:09 +01:00
2021-02-27 16:38:07 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-03-19 15:18:53 +00:00
2021-11-16 19:18:26 +00:00
2017-03-05 17:04:09 +01:00
2023-04-22 22:40:14 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2018-08-11 18:00:22 +02:00
2020-10-26 21:12:46 +01:00
2022-09-18 13:04:22 +01:00
2023-05-14 18:50:25 +01:00
2013-08-03 18:35:36 +02:00
2022-09-18 13:04:22 +01:00
2021-04-17 16:31:09 +02:00
2021-04-17 16:31:09 +02:00
2022-06-12 22:15:57 +01:00
2013-09-05 22:13:31 +02:00
2017-03-05 17:04:09 +01:00
2013-08-03 18:35:36 +02:00
2022-11-09 21:21:04 +00:00
2013-02-13 16:15:55 +01:00
2017-03-05 17:04:09 +01:00
2020-01-25 13:27:42 +01:00
2022-10-16 13:11:12 +01:00
2022-04-27 15:25:03 +01:00
2022-06-14 17:41:28 +01:00
2019-06-10 22:47:40 +02:00
2022-11-23 23:46:31 +00:00
2023-06-10 21:40:39 +01:00
2021-02-13 18:14:48 +01:00
2022-08-15 18:51:32 +01:00
2010-05-14 23:24:24 +02:00
2017-12-24 13:22:00 +01:00
2021-09-09 21:55:11 +02:00
2020-10-26 21:12:46 +01:00
2017-03-05 17:04:09 +01:00
2022-11-09 21:21:04 +00:00
2020-10-26 21:12:46 +01:00
2022-08-15 18:51:32 +01:00
2015-01-25 13:02:57 +01:00
2012-02-04 21:59:01 +01:00
2022-06-17 15:42:40 +01:00
2019-08-31 16:20:32 +02:00
2017-08-27 16:52:01 +02:00
2019-10-16 22:35:02 +02:00
2017-03-05 17:04:09 +01:00
2023-05-14 18:50:25 +01:00
2022-04-08 17:45:08 +01:00
2023-04-22 22:40:14 +01:00
2020-09-19 18:50:13 +02:00
2023-02-02 13:59:48 +00:00
2018-04-06 11:14:11 +02:00
2022-12-06 18:20:10 +00:00
2021-03-31 20:07:33 +02:00
2022-11-18 21:49:57 +00:00
2021-09-09 21:55:11 +02:00
2022-11-23 23:46:31 +00:00
2021-01-02 16:39:53 +01:00
2021-01-02 16:39:53 +01:00
2022-04-18 15:36:40 +01:00
2022-10-28 20:47:54 +01:00
2020-08-07 19:54:59 +02:00
2020-05-12 22:49:12 +02:00
2021-07-28 20:10:16 +02:00
2017-03-05 17:04:09 +01:00
2020-11-21 13:16:30 +01:00
2008-06-24 20:39:31 +00:00
2022-06-17 15:42:40 +01:00
2018-07-21 05:56:22 +02:00
2021-09-21 20:09:51 +02:00
2008-06-24 22:58:06 +00:00
2018-01-28 22:47:25 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-09-27 17:30:34 +01:00
2022-06-17 15:42:40 +01:00
2023-02-20 20:44:55 +00:00
2021-03-13 13:28:13 +01:00
2021-09-09 21:55:11 +02:00
2007-05-05 17:54:07 +00:00
2021-01-11 19:40:15 +01:00
2020-11-05 20:41:49 +01:00
2017-03-05 17:04:09 +01:00
2021-04-07 21:07:20 +02:00
2021-04-07 21:07:20 +02:00
2021-04-17 16:31:09 +02:00
2022-11-18 21:49:57 +00:00
2023-02-27 15:49:53 +00:00
2023-04-22 22:40:14 +01:00
2022-01-29 22:20:48 +00:00
2017-03-05 17:04:09 +01:00
2023-02-27 15:49:53 +00:00
2023-02-27 15:49:53 +00:00
2017-03-05 17:04:09 +01:00
2022-08-30 20:26:34 +01:00
2021-04-21 18:09:37 +02:00
2018-11-04 14:45:49 +01:00
2021-04-17 16:31:09 +02:00
2022-01-23 12:07:04 +00:00
2018-07-29 15:07:52 +02:00
2021-08-14 21:25:52 +02:00
2022-12-06 18:20:10 +00:00
2020-03-14 08:19:51 +01:00
2019-09-27 19:34:08 +02:00
2023-02-27 15:49:53 +00:00
2017-03-05 17:04:09 +01:00
2013-04-05 22:26:15 +02:00
2021-04-21 18:09:37 +02:00
2020-10-26 21:12:46 +01:00
2021-11-16 19:18:26 +00:00
2020-01-25 13:27:42 +01:00
2020-10-26 21:12:46 +01:00
2018-08-28 22:58:02 +02:00
2020-04-10 22:10:56 +02:00
2020-10-26 21:12:46 +01:00
2022-03-30 10:51:39 +01:00
2017-08-27 16:52:01 +02:00
2022-03-19 15:18:53 +00:00
2017-05-27 16:45:17 +02:00
2022-01-23 12:07:04 +00:00
2021-08-14 21:25:52 +02:00
2015-09-25 20:34:21 +02:00
2019-12-05 22:47:25 +01:00
2010-01-06 20:54:52 +01:00
2022-10-16 13:11:12 +01:00
2022-06-17 15:42:40 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2021-01-02 16:39:53 +01:00
2021-09-09 21:55:11 +02:00
2023-04-22 22:40:14 +01:00
2017-03-05 17:04:09 +01:00
2020-12-23 13:56:35 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2020-01-25 13:27:42 +01:00
2022-04-08 17:45:08 +01:00
2018-01-28 22:47:25 +01:00
2022-09-27 17:30:34 +01:00
2020-05-26 21:20:45 +02:00
2021-09-09 21:55:11 +02:00
2018-06-24 20:42:01 +02:00
2021-12-05 21:54:04 +00:00
2022-09-18 13:04:22 +01:00
2022-10-16 13:11:12 +01:00
2022-11-18 21:49:57 +00:00
2022-11-18 21:49:57 +00:00
2021-09-09 21:55:11 +02:00
2022-01-29 22:20:48 +00:00
2023-06-10 21:40:39 +01:00
2021-03-31 20:07:33 +02:00
2010-05-14 23:24:24 +02:00
2023-06-10 21:40:39 +01:00
2020-12-23 13:56:35 +01:00
2017-03-05 17:04:09 +01:00
2015-10-13 23:21:27 +02:00
2020-01-25 13:27:42 +01:00
2022-06-14 17:41:28 +01:00
2022-06-17 15:42:40 +01:00
2018-12-09 20:43:55 +01:00
2021-11-16 19:18:26 +00:00
2021-10-16 15:23:36 +01:00
2018-09-02 21:07:30 +02:00
2017-03-05 17:04:09 +01:00
2022-04-27 15:25:03 +01:00
2021-12-16 14:41:10 +00:00
2021-01-25 21:14:57 +01:00
2020-10-26 21:12:46 +01:00
2022-03-30 10:51:39 +01:00
2021-10-16 15:23:36 +01:00
2023-02-02 13:59:48 +00:00
2017-03-05 17:04:09 +01:00
2022-06-17 15:42:40 +01:00
2022-06-14 17:41:28 +01:00
2022-06-14 17:41:28 +01:00
2022-06-14 17:41:28 +01:00
2022-08-15 18:51:32 +01:00
2022-08-15 18:51:32 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2016-09-06 22:12:34 +02:00
2023-08-09 16:50:52 +02:00
2017-03-05 17:04:09 +01:00
2015-03-05 21:21:19 +01:00
2013-06-24 22:22:18 +02:00
2013-11-03 21:14:31 +01:00
2018-05-17 17:04:55 +02:00
2023-06-10 21:40:39 +01:00
2013-11-03 21:14:31 +01:00
2015-03-05 21:21:19 +01:00
2019-07-31 21:07:14 +02:00
2021-12-05 21:54:04 +00:00
2022-09-18 13:04:22 +01:00
2020-04-10 22:10:56 +02:00
2023-05-14 18:50:25 +01:00
2008-06-24 21:16:56 +00:00
2019-08-08 22:15:18 +02:00
2022-12-06 18:20:10 +00:00
2022-06-09 20:45:54 +01:00
2022-05-07 21:54:03 +01:00
2022-05-07 21:54:03 +01:00
2004-06-13 20:20:40 +00:00
2004-07-19 20:55:54 +00:00
2004-06-13 20:20:40 +00:00
2008-06-24 21:56:24 +00:00
2023-02-02 13:59:48 +00:00
2004-06-13 20:20:40 +00:00
2017-03-05 17:04:09 +01:00
2020-10-26 21:12:46 +01:00
2020-01-25 13:27:42 +01:00
2021-12-24 13:18:38 +00:00
2017-03-05 17:04:09 +01:00
2017-02-17 22:47:16 +01:00
2023-06-10 21:40:39 +01:00
2011-06-19 05:09:16 +02:00
2022-06-14 17:41:28 +01:00
2010-01-06 20:54:52 +01:00
2020-01-21 22:33:58 +01:00
2020-01-25 13:27:42 +01:00
2020-01-25 13:27:42 +01:00
2019-09-11 22:56:44 +02:00
2022-12-06 18:20:10 +00:00
2014-12-06 23:33:00 +01:00
2022-12-06 18:20:10 +00:00
2022-09-10 13:13:14 +01:00

This directory contains Vim scripts for syntax highlighting.

These scripts are not for a language, but are used by Vim itself:

syntax.vim	Used for the ":syntax on" command.  Uses synload.vim.

manual.vim	Used for the ":syntax manual" command.  Uses synload.vim.

synload.vim	Contains autocommands to load a language file when a certain
		file name (extension) is used.  And sets up the Syntax menu
		for the GUI.

nosyntax.vim	Used for the ":syntax off" command.  Undo the loading of
		synload.vim.

The "shared" directory contains generated files and what is used by more than
one syntax.


A few special files:

2html.vim	Converts any highlighted file to HTML (GUI only).
colortest.vim	Check for color names and actual color on screen.
hitest.vim	View the current highlight settings.
whitespace.vim  View Tabs and Spaces.


If you want to write a syntax file, read the docs at ":help usr_44.txt".

If you make a new syntax file which would be useful for others, please send it
to the vim-dev mailing list <vim-dev@vim.org>.  Include instructions for
detecting the file type for this language, by file name extension or by
checking a few lines in the file. And please write the file in a portable way,
see ":help 44.12".

If you have remarks about an existing file, send them to the maintainer of
that file.  Only when you get no response send a message to the vim-dev
mailing list: <vim-dev@vim.org>.

If you are the maintainer of a syntax file and make improvements, send the new
version to the vim-dev mailing list: <vim-dev@vim.org>

For further info see ":help syntax" in Vim.