Mercurial > vim
annotate runtime/plugin/manpager.vim @ 19483:0d3dcb4476ba v8.2.0299
patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Commit: https://github.com/vim/vim/commit/8ed04587d3cd53e29be20fde9c36e619ea7da4dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 22 19:07:28 2020 +0100
patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Problem: Vim9: ISN_STORE with argument not tested. Some cases in tv2bool()
not tested.
Solution: Add tests. Add test_unknown() and test_void().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 22 Feb 2020 19:15:04 +0100 |
parents | 167a030448fa |
children | 29ec2c198c8d |
rev | line source |
---|---|
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Vim plugin for using Vim as manpager. |
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " Maintainer: Enno Nagel <ennonagel+vim@gmail.com> |
13231 | 3 " Last Change: 2018 Feb 04 |
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
13231 | 5 command! -nargs=0 MANPAGER call s:ManPager() | delcommand MANPAGER |
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
13231 | 7 function! s:ManPager() |
8 set nocompatible | |
9 if exists('+viminfofile') | |
10 set viminfofile=NONE | |
11 endif | |
12 set noswapfile | |
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
13231 | 14 setlocal ft=man |
15 runtime ftplugin/man.vim | |
16 setlocal buftype=nofile bufhidden=hide iskeyword+=: modifiable | |
17 | |
18 " Emulate 'col -b' | |
19 silent keepj keepp %s/\v(.)\b\ze\1?//ge | |
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 |
13231 | 21 " Remove empty lines above the header |
22 call cursor(1, 1) | |
23 let n = search(".*(.*)", "c") | |
24 if n > 1 | |
25 exe "1," . n-1 . "d" | |
26 endif | |
27 setlocal nomodified readonly | |
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
13231 | 29 syntax on |
9037
d07035f84f0d
commit https://github.com/vim/vim/commit/b20545f2a718d4f19c3f609fd11c0ca4eff450ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 endfunction |