> You can use the BufEnter or BufNew autocmd and test whether
> the 'buftype' option is set to 'quickfix' for the current buffer.
> 
> - Yegappan
I did this script, but it doesn't work. I open the quickfix window
with :cope . I have to leave the quickfix window and come back to
trigger the event BufEnter. Which event should I add?

function! RaiseEnter()"<<<
        if getbufvar("", "&buftype") == "quickfix"
                nunmap <CR>
        endif
endfunction     
">>>
function! KillEnter()"<<<
        if getbufvar("", "&buftype") == "quickfix"
                nmap <CR> <Nop>
        endif
endfunction
">>>
au BufEnter * call RaiseEnter()
au BufLeave * call KillEnter()

Any advices?
Thanks

Alberto

Reply via email to