Mercurial > vim
comparison runtime/plugin/manpager.vim @ 29087:f3ec3c57e070
Update runtime files.
Commit: https://github.com/vim/vim/commit/016188fd8a30cfbaca3faa0daea9a47138dc5c4b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 6 20:52:59 2022 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Jun 2022 23:30:03 +0200 |
parents | 29ec2c198c8d |
children | 1e9e9d89f0ee |
comparison
equal
deleted
inserted
replaced
29086:7674e8558378 | 29087:f3ec3c57e070 |
---|---|
1 " Vim plugin for using Vim as manpager. | 1 " Vim plugin for using Vim as manpager. |
2 " Maintainer: Enno Nagel <ennonagel+vim@gmail.com> | 2 " Maintainer: Enno Nagel <ennonagel+vim@gmail.com> |
3 " Last Change: 2020 Aug 05 | 3 " Last Change: 2022 Jun 05 |
4 | 4 |
5 command! -nargs=0 MANPAGER call s:ManPager() | delcommand MANPAGER | 5 command! -nargs=0 MANPAGER call s:ManPager() | delcommand MANPAGER |
6 | 6 |
7 function! s:ManPager() | 7 function s:ManPager() |
8 set nocompatible | 8 " global options, keep these to a minimum to avoid side effects |
9 if &compatible | |
10 set nocompatible | |
11 endif | |
9 if exists('+viminfofile') | 12 if exists('+viminfofile') |
10 set viminfofile=NONE | 13 set viminfofile=NONE |
11 endif | 14 endif |
12 set noswapfile | 15 set noswapfile |
13 | 16 |
25 call cursor(1, 1) | 28 call cursor(1, 1) |
26 let n = search(".*(.*)", "c") | 29 let n = search(".*(.*)", "c") |
27 if n > 1 | 30 if n > 1 |
28 exe "1," . n-1 . "d" | 31 exe "1," . n-1 . "d" |
29 endif | 32 endif |
30 setlocal nomodified readonly | 33 setlocal nomodifiable nomodified readonly nowrite |
31 | 34 |
32 syntax on | 35 syntax on |
33 endfunction | 36 endfunction |