Mercurial > vim
comparison runtime/ftplugin/man.vim @ 19968:1908e92b02fd
Update runtime files
Commit: https://github.com/vim/vim/commit/d1caa941d876181aae0ebebc6ea954045bf0da24
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 10 22:10:56 2020 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 10 Apr 2020 22:15:05 +0200 |
parents | 350e1d3131d8 |
children | 18043e7ab449 |
comparison
equal
deleted
inserted
replaced
19967:f11b9ed4f9e1 | 19968:1908e92b02fd |
---|---|
1 " Vim filetype plugin file | 1 " Vim filetype plugin file |
2 " Language: man | 2 " Language: man |
3 " Maintainer: SungHyun Nam <goweol@gmail.com> | 3 " Maintainer: SungHyun Nam <goweol@gmail.com> |
4 " Last Change: 2020 Mar 25 | 4 " Last Change: 2020 Apr 6 |
5 " (fix by Jason Franklin) | |
6 | 5 |
7 " To make the ":Man" command available before editing a manual page, source | 6 " To make the ":Man" command available before editing a manual page, source |
8 " this script from your startup vimrc file. | 7 " this script from your startup vimrc file. |
9 | 8 |
10 " If 'filetype' isn't "man", we must have been called to only define ":Man". | 9 " If 'filetype' isn't "man", we must have been called to only define ":Man". |
203 if !exists('s:env_has_u') | 202 if !exists('s:env_has_u') |
204 call system('env -u x true') | 203 call system('env -u x true') |
205 let s:env_has_u = (v:shell_error == 0) | 204 let s:env_has_u = (v:shell_error == 0) |
206 endif | 205 endif |
207 let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat' | 206 let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat' |
207 let env_cmd .= ' GROFF_NO_SGR=1' | |
208 let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b' | 208 let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b' |
209 silent exec "r !" . man_cmd | 209 silent exec "r !" . man_cmd |
210 | 210 |
211 if unsetwidth | 211 if unsetwidth |
212 let $MANWIDTH = '' | 212 let $MANWIDTH = '' |