(This question is posted in vim_mac user group in Google, but I did not get a solution)

When pressing on keyword, in terminal vim it will produce the man page correctly. However, in MacVim, it generates a warning:

WARNING: terminal is not fully functional 

The ANSI control sequence is then display and not correctly escaped. A screenshot can be found here.

Help needed, thanks!

link|improve this question
feedback

2 Answers

The ConqueTerm Vim plugin provides GUI-based instances of Vim with a fairly robust terminal emulation. It requires Vim 7.0+ (7.3+ for Windows) compiled with +python or +python3; MacVim satisfies these requirements.

Here is a function and binding that re-implements the functionality of the normal-mode K command using ConqueTerm (you can put it in your .vimrc):

:function! ConqueMan()
    let cmd = &keywordprg . ' '
    if cmd ==# 'man ' || cmd ==# 'man -s '
        if v:count > 0
            let cmd .= v:count . ' '
        else
            let cmd = 'man '
        endif
    endif
    let cmd .= expand('<cword>')
    execute 'ConqueTermSplit' cmd
:endfunction
:map K :<C-U>call ConqueMan()<CR>
:ounmap K
link|improve this answer
Looks nice! Nevertheless it looks a bit weird under MacVim with a colorful output. – Ivan Z. Xiao Jun 1 '11 at 21:00
Perfect! and has insert mode too. – sunkencity Sep 18 '11 at 7:59
feedback

This can't be solved without a lot of programming because, as that thread states, MacVim creates its own "terminal" that does not conform to any terminfo entries, hence less cannot handle using it properly. You can try poking $TERM in MacVim via :set term=..., but I don't think that there's any value that would be appropriate for MacVim.

If you have some graphical man page viewer you could set it as keywordprg. See :h keywordprg for more details.

link|improve this answer
Hi, I did try setting the term, but still. It doesn't work. However setting keywordprg seems to be a reasonable workaround. After some search I cannot find a good alternative to man, though... – Ivan Z. Xiao May 29 '11 at 4:22
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.