Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add map to redraw text of manpage #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ View man pages in vim. Grep for the man pages.
specially highlighted references to other man pages i.e. `printf(3)`), also
defined for other tag mappings like `g_Ctrl-]`, `Ctrl-W_Ctrl-]` etc.
- `K` - same as `Ctrl-]`
- `R` - redraw manpage text, useful after a vertical resize
- `Ctrl-T` - jump \*back* to the previous man page
- `gx` - open a link under cursor in a browser
([vim feature](http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#netrw-gx))
Expand Down
1 change: 1 addition & 0 deletions autoload/man.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function! man#get_page(split_type, ...)
call s:get_new_or_existing_man_window(a:split_type)
call man#helpers#set_manpage_buffer_name(page, sect)
call man#helpers#load_manpage_text(page, sect)
execute "nnoremap <buffer><silent> R :call man#helpers#load_manpage_text('".page."','".sect."')<CR>"
endfunction

function! s:manpage_exists(sect, page)
Expand Down
3 changes: 3 additions & 0 deletions doc/man.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ CTRL-] Jump to man page for a word under cursor (all the
*man-K*
K Same as |man-CTRL-]|.

*man-R*
R Redraw the man page, useful after vertical resize.

*man-CTRL-T*
CTRL-T Jump back to the previous man page.

Expand Down