Loading ...
Sorry, an error occurred while loading the content.
 

Re: How can I open help in the current window?

Expand Messages
  • Thiago de Arruda
    ... As I decribed in my previous email, I managed to get a working solution by placing this code in my vimrc: function! OpenHelpInCurrentWindow(topic) view
    Message 1 of 13 , Apr 24, 2013
      On 04/24, Edward Beckett wrote:
      > hmm... well if you get an answer do tell... your work flow does sound
      > rather convenient...

      As I decribed in my previous email, I managed to get a working solution by
      placing this code in my vimrc:

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

      Then with <leader>h or :Help you can open a help topic in the current window
    Your message has been successfully submitted and would be delivered to recipients shortly.