diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-30 18:35:19 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-09-30 18:35:19 +0200 |
commit | 3999aa755e28302b03b1a8db5ecd9cf627c01de9 (patch) | |
tree | 0ac3a89c324f8916741c9f1471e6892810ea27e0 | |
parent | 6c496db4b75eff9cb5fc417222e83511e7e0ca15 (diff) | |
download | rneovim-3999aa755e28302b03b1a8db5ecd9cf627c01de9.tar.gz rneovim-3999aa755e28302b03b1a8db5ecd9cf627c01de9.tar.bz2 rneovim-3999aa755e28302b03b1a8db5ecd9cf627c01de9.zip |
man.vim: set $MANWIDTH=999
On some systems, mandoc disallows $MANWIDTH greater than 1000.
E.g. FreeBSD:
https://github.com/freebsd/freebsd/blob/b7d613ae8a2fc1530d33aff53a1a678d284bfeec/contrib/mandoc/manpath.c#L312
closes #9065
-rw-r--r-- | runtime/autoload/man.vim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 1c25368a68..21f2dfc58a 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -149,9 +149,9 @@ function! s:system(cmd, ...) abort endfunction function! s:get_page(path) abort - " Disable hard-wrap by setting $MANWIDTH to a high value. - " Use soft wrap instead (ftplugin/man.vim sets 'wrap', 'breakindent'). - let manwidth = 9999 + " Disable hard-wrap by using a big $MANWIDTH (max 1000 on some systems #9065). + " We use soft wrap: ftplugin/man.vim sets wrap/breakindent/…. + let manwidth = 999 " Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db). " http://comments.gmane.org/gmane.editors.vim.devel/29085 " Set MAN_KEEP_FORMATTING so Debian man doesn't discard backspaces. @@ -168,9 +168,9 @@ function! s:put_page(page) abort silent keepjumps 1delete _ endwhile " XXX: nroff justifies text by filling it with whitespace. That interacts - " badly with our use of $MANWIDTH=9999. Hack around this by using a fixed + " badly with our use of $MANWIDTH=999. Hack around this by using a fixed " size for those whitespace regions. - silent! keeppatterns keepjumps %s/\s\{999,}/\=repeat(' ', 10)/g + silent! keeppatterns keepjumps %s/\s\{199,}/\=repeat(' ', 10)/g 1 lua require("man").highlight_man_page() setlocal filetype=man |