MacVim not working correctly: WARNING: terminal is not fully functional

macvimvim

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

When pressing <K> 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!

Best Answer

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