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

Re: Mapping for help-files only

Expand Messages
  • Dan Sharp
    ... to set it for just the help files. To unset it, though, you probably still need to use your WinLeave autocmd from above. You should be able to change the
    Message 1 of 2 , May 30, 2001
      At 10:39 AM 5/30/2001 +0200, Strohhäcker, Bernd wrote:
      >Meanwhile I noticed that the problem seems to be using of the
      >backslashes. I now use:
      >
      >:autocmd! BufRead c:/uti/vim/vim60ah/runtime/doc/*.txt map <CR> <C-]>
      >:autocmd! winenter c:/uti/vim/vim60ah/runtime/doc/*.txt map <CR> <C-]>
      >:autocmd! winleave c:/uti/vim/vim60ah/runtime/doc/*.txt unmap <CR>
      >
      >What, until now, seems to work.
      >Is this a correct way to handle the mapping
      >or exists a better way ?

      Try:

      :autocmd! FileType help map <CR> <C-]>

      to set it for just the help files. To unset it, though, you probably still
      need to use your WinLeave autocmd from above. You should be able to change
      the path to $VIMRUNTIME/doc/*.txt to make it a little more flexible, though.

      Dan Sharp
    Your message has been successfully submitted and would be delivered to recipients shortly.