mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
runtime(manpager): avoid readonly prompt
fixes: #15103 closes: #15106 Signed-off-by: Enno <Konfekt@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
9554ace1d9
commit
9d85d4dcf9
@ -1,6 +1,6 @@
|
|||||||
" Vim plugin for using Vim as manpager.
|
" Vim plugin for using Vim as manpager.
|
||||||
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
|
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
|
||||||
" Last Change: 2022 Oct 17
|
" Last Change: 2024 Jul 03
|
||||||
|
|
||||||
if exists('g:loaded_manpager_plugin')
|
if exists('g:loaded_manpager_plugin')
|
||||||
finish
|
finish
|
||||||
@ -20,9 +20,6 @@ function s:ManPager()
|
|||||||
endif
|
endif
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
" Make this an unlisted, readonly scratch buffer
|
|
||||||
setlocal buftype=nofile noswapfile bufhidden=hide nobuflisted readonly
|
|
||||||
|
|
||||||
" Ensure text width matches window width
|
" Ensure text width matches window width
|
||||||
setlocal foldcolumn& nofoldenable nonumber norelativenumber
|
setlocal foldcolumn& nofoldenable nonumber norelativenumber
|
||||||
|
|
||||||
@ -45,6 +42,9 @@ function s:ManPager()
|
|||||||
" Finished preprocessing the buffer, prevent any further modifications
|
" Finished preprocessing the buffer, prevent any further modifications
|
||||||
setlocal nomodified nomodifiable
|
setlocal nomodified nomodifiable
|
||||||
|
|
||||||
|
" Make this an unlisted, readonly scratch buffer
|
||||||
|
setlocal buftype=nofile noswapfile bufhidden=hide nobuflisted readonly
|
||||||
|
|
||||||
" Set filetype to man even if ftplugin is disabled
|
" Set filetype to man even if ftplugin is disabled
|
||||||
setlocal filetype=man
|
setlocal filetype=man
|
||||||
runtime ftplugin/man.vim
|
runtime ftplugin/man.vim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user