Skip to content

Commit

Permalink
add map to redraw text of manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
jebaum committed Feb 13, 2015
1 parent b326e13 commit 9e33b1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
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

0 comments on commit 9e33b1b

Please sign in to comment.