Fedora 14 switched to man-db for handling man pages.
Ubuntu has been using it for ages.
On older versions of Fedora I was able to just
add this to my .bashrc to have full man page
functionality, (with drill down) using vim

export MANPAGER='bash -c "vim -MRn -c \"set ft=man nomod nolist nospell nonu\" \
-c \"nm q :qa!<CR>\" -c \"nm <end> G\" -c \"nm <home> gg\"</dev/tty <(col -b)"'

(if pasting that in a terminal make sure to \ the ! in the second line)

The above works fine for man-db too, except when using Ctrl-[
to drill down into sub man pages. In that case man-db will
run the output through $MANPAGER again, even though the
output is not a tty. That would cause various vim errors
and hangups.  I was able to work around this in my ~/.vimrc with:

augroup man
    au!
    "Ensure vim is not recursively invoked (man-db does this)
    "when doing ctrl-[ on a man page reference
    au FileType man let $MANPAGER=""
augroup END

So rather than doing that, the patch below
just does the same in man.vim

cheers,
Pádraig.

--- /usr/share/vim/vim73/ftplugin/man.vim       2010-11-29 10:00:14.392636934 
+0000
+++ man.vim     2010-11-29 10:00:07.233636869 +0000
@@ -15,6 +15,10 @@
   endif
   let b:did_ftplugin = 1

+  "Ensure vim is not recursively invoked (man-db does this)
+  "when doing ctrl-[ on a man page reference
+  let $MANPAGER=""
+
   " allow dot and dash in manual page name.
   setlocal iskeyword+=\.,-

-- 
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

Raspunde prin e-mail lui