Murukesh Mohanan wrote: > > Typically man pages have bold and underlines displayed using |x\bx| > and |_\bx|, |\b| being the backspace and |x| the letter in question > (Thomas Dickey talks about this in this Unix & Linux post > <http://unix.stackexchange.com/a/271553/70524>). That's what makes > using just |vim -| as the manpager annoying. The workaround I have > seen posted in a number of places is to filter out the backspaces, and > the characters that would have been printed over. Typically: > > |MANPAGER='col -b | vim -' | > > There's no reason to do this with |col -b|, of course. You could do > something like: > > if !empty($MAN_PN) > autocmd StdinReadPost * set ft=man | file $MAN_PN | call PrepManPager() > endif > > And |PrepManPager()| defined in some suitable place: > > function! PrepManPager() > setlocal modifiable > %s/.\b\(.\)/\1/g > 1 > setlocal nomodified > setlocal nomodifiable > endfunction > ------------------------------------------------------------------------ > > Aside: > > In the Unix & Linux post mentioned above, I'd posted my method, which > involves keeping the backspaces and concealing them, instead of > removing them. Personally, I feel the loss of functionality in > searching is balanced by the added syntax highlighting I can do with > the backspaces retained. There are manpages for which the standard > |syntax/man.vim| is useless, because it has no way to know what the > actual page would have highlighted. (Pick any C++ STL manpage, for > example.) If anyone's interested, here's how I use conceal for this > <https://github.com/murukeshm/vim-manpager/blob/master/after/syntax/man.vim>. > > Have you tried ManPageView? I use the kornshell, but it should work with bash also:
# man: {{{2 function man { gv -c "Man $*" -c "sil! only" } then man printf brings up ManPageView in vim. (you can get ManPageView from http://www.drchip.org/astronaut/vim/index.html#MANPAGEVIEW). Regards, Chip Campbell -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.