Mercurial > vim
comparison runtime/ftplugin/man.vim @ 7992:78106b0f2c56
commit https://github.com/vim/vim/commit/cbebd4879cc78e670d79b2c57dc33d7b911c962a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 7 23:02:56 2016 +0100
Updated runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 07 Feb 2016 23:15:05 +0100 |
parents | 17333ebd2bbd |
children | cd9c4bbe1d03 |
comparison
equal
deleted
inserted
replaced
7991:689d10b97db7 | 7992:78106b0f2c56 |
---|---|
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: 2015 Nov 24 | 4 " Last Change: 2016 Feb 04 |
5 | 5 |
6 " 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 |
7 " this script from your startup vimrc file. | 7 " this script from your startup vimrc file. |
8 | 8 |
9 " 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". |
158 " Avoid warning for editing the dummy file twice | 158 " Avoid warning for editing the dummy file twice |
159 setl buftype=nofile noswapfile | 159 setl buftype=nofile noswapfile |
160 | 160 |
161 setl ma nonu nornu nofen | 161 setl ma nonu nornu nofen |
162 silent exec "norm 1GdG" | 162 silent exec "norm 1GdG" |
163 let $MANWIDTH = winwidth(0) | 163 if empty($MANWIDTH) |
164 let $MANWIDTH = winwidth(0) | |
165 endif | |
164 silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b" | 166 silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b" |
165 " Remove blank lines from top and bottom. | 167 " Remove blank lines from top and bottom. |
166 while getline(1) =~ '^\s*$' | 168 while getline(1) =~ '^\s*$' |
167 silent keepj norm ggdd | 169 silent keepj norm ggdd |
168 endwhile | 170 endwhile |