OK I finally managed to get fully working and will post here in case anyone is
interested, just put the code in vimrc and you can quickly invoke help in the
current window by pressing <leader>h:

    function! OpenHelpInCurrentWindow(topic)
      view $VIMRUNTIME/doc/help.txt
      setl filetype=help
      setl buftype=help
      setl nomodifiable
      exe 'keepjumps help ' . a:topic
    endfunction

    command! -nargs=? -complete=help Help call OpenHelpInCurrentWindow(<q-args>)

    nnoremap <silent> <leader>h :view +1 $VIMRUNTIME/doc/help.txt

Thanks for everyone's tips

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to