Skip to content

Commit cb31db1

Browse files
committed
add map to redraw text of manpage
1 parent 02a9fcd commit cb31db1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ View man pages in vim. Grep for the man pages.
2525
specially highlighted references to other man pages i.e. `printf(3)`), also
2626
defined for other tag mappings like `g_Ctrl-]`, `Ctrl-W_Ctrl-]` etc.
2727
- `K` - same as `Ctrl-]`
28+
- `R` - redraw manpage text, useful after a vertical resize
2829
- `Ctrl-T` - jump \*back* to the previous man page
2930
- `gx` - open a link under cursor in a browser
3031
([vim feature](http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#netrw-gx))

autoload/man.vim

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function! man#get_page(split_type, ...)
3737
call s:get_new_or_existing_man_window(a:split_type)
3838
call man#helpers#set_manpage_buffer_name(page, sect)
3939
call man#helpers#load_manpage_text(page, sect)
40+
execute "nnoremap <buffer><silent> R :call man#helpers#load_manpage_text('".page."','".sect."')<CR>"
4041
endfunction
4142

4243
function! s:manpage_exists(sect, page)

doc/man.txt

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ CTRL-] Jump to man page for a word under cursor (all the
9191
*man-K*
9292
K Same as |man-CTRL-]|.
9393

94+
*man-R*
95+
R Redraw the man page, useful after vertical resize.
96+
9497
*man-CTRL-T*
9598
CTRL-T Jump back to the previous man page.
9699

0 commit comments

Comments
 (0)