From 6050d3f15dea67759afa4bcc68a3cd9feeaabe98 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Sun, 7 Aug 2016 17:30:05 -0400 Subject: man.vim: handle 'gdefault' (#5182) Fixes #5181 --- runtime/autoload/man.vim | 2 +- runtime/ftplugin/man.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 332ec63761..a3632a10c3 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -91,7 +91,7 @@ function! s:read_page(sect, name) abort let b:manwidth = s:manwidth() silent execute 'read!env MANWIDTH='.b:manwidth s:man_cmd s:man_args(a:sect, a:name) " remove all the backspaced text - silent keeppatterns keepjumps %substitute,.\b,,ge + silent execute 'keeppatterns keepjumps %substitute,.\b,,e'.(&gdefault?'':'g') while getline(1) =~# '^\s*$' silent keepjumps 1delete _ endwhile diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 08d5da0fe4..614e1cb161 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -11,7 +11,7 @@ let s:pager = 0 if has('vim_starting') let s:pager = 1 " remove all those backspaces - silent keeppatterns keepjumps %substitute,.\b,,ge + silent execute 'keeppatterns keepjumps %substitute,.\b,,e'.(&gdefault?'':'g') if getline(1) =~# '^\s*$' silent keepjumps 1delete _ else -- cgit