Re: Mapping for help-files only
- At 10:39 AM 5/30/2001 +0200, Strohhäcker, Bernd wrote:
>Meanwhile I noticed that the problem seems to be using of theTry:
>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 ?
: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.