mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
man.vim: prefer cmd-line to normal-mode commands
This commit is contained in:
parent
42e710eacb
commit
091ef2fbe4
@ -49,7 +49,7 @@ function man#get_page(...) abort
|
|||||||
let thiswin = winnr()
|
let thiswin = winnr()
|
||||||
wincmd b
|
wincmd b
|
||||||
if winnr() > 1
|
if winnr() > 1
|
||||||
exe "norm! " . thiswin . "\<C-W>w"
|
exec thiswin . 'wincmd w'
|
||||||
while 1
|
while 1
|
||||||
if &filetype ==# 'man'
|
if &filetype ==# 'man'
|
||||||
break
|
break
|
||||||
@ -76,10 +76,10 @@ function man#get_page(...) abort
|
|||||||
silent exec 'r!/usr/bin/man '.s:cmd(sect, page).' | col -b'
|
silent exec 'r!/usr/bin/man '.s:cmd(sect, page).' | col -b'
|
||||||
" Remove blank lines from top and bottom.
|
" Remove blank lines from top and bottom.
|
||||||
while getline(1) =~# '^\s*$'
|
while getline(1) =~# '^\s*$'
|
||||||
silent keepjumps norm! gg"_dd
|
silent keepjumps 1delete _
|
||||||
endwhile
|
endwhile
|
||||||
while getline('$') =~# '^\s*$'
|
while getline('$') =~# '^\s*$'
|
||||||
silent keepjumps norm! G"_dd
|
silent keepjumps $delete _
|
||||||
endwhile
|
endwhile
|
||||||
setlocal nomodified
|
setlocal nomodified
|
||||||
setlocal filetype=man
|
setlocal filetype=man
|
||||||
|
Loading…
Reference in New Issue
Block a user