Mercurial > vim
comparison runtime/ftplugin/man.vim @ 20317:2334bf788e8a
Update runtime files
Commit: https://github.com/vim/vim/commit/2cfb4a2a7248eeb40112bb482ab5b15f01b20433
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 7 18:56:00 2020 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 May 2020 19:00:05 +0200 |
parents | 56265f711890 |
children | 661eb972cb22 |
comparison
equal
deleted
inserted
replaced
20316:495753de724b | 20317:2334bf788e8a |
---|---|
1 " Vim filetype plugin file | 1 " Vim filetype plugin file |
2 " Language: man | 2 " Language: man |
3 " Maintainer: Jason Franklin <vim@justemail.net> | 3 " Maintainer: Jason Franklin <vim@justemail.net> |
4 " Previous Maintainer: SungHyun Nam <goweol@gmail.com> | 4 " Maintainer: SungHyun Nam <goweol@gmail.com> |
5 " Last Change: 2020 Apr 30 | 5 " Last Change: 2020 May 07 |
6 | 6 |
7 " To make the ":Man" command available before editing a manual page, source | 7 " To make the ":Man" command available before editing a manual page, source |
8 " this script from your startup vimrc file. | 8 " this script from your startup vimrc file. |
9 | 9 |
10 " If 'filetype' isn't "man", we must have been called to only define ":Man". | 10 " If 'filetype' isn't "man", we must have been called to only define ":Man". |
204 call system('env -u x true') | 204 call system('env -u x true') |
205 let s:env_has_u = (v:shell_error == 0) | 205 let s:env_has_u = (v:shell_error == 0) |
206 endif | 206 endif |
207 let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat' | 207 let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat' |
208 let env_cmd .= ' GROFF_NO_SGR=1' | 208 let env_cmd .= ' GROFF_NO_SGR=1' |
209 let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' 2>/dev/null | col -b' | 209 let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b' |
210 silent exec "r !" . man_cmd | 210 silent exec "r !" . man_cmd |
211 | 211 |
212 if unsetwidth | 212 if unsetwidth |
213 let $MANWIDTH = '' | 213 let $MANWIDTH = '' |
214 endif | 214 endif |