On 2014-12-04, Christian Brabandt wrote:
> Hi Gary!
> 
> On Mi, 03 Dez 2014, Gary Johnson wrote:
> 
> >     nnoremap <buffer> <CR> :call QfEnter()<CR>
> > 
> >     function! QfEnter()
> >         let l:lnum = line('.')
> >         wincmd p
> >         exe 'cc' l:lnum
> >     endfunction
> > 
> > I put that in ~/.vim/after/ftplugin/qf.vim.  The map will therefor
> > apply only to the quickfix window.
> 
> Thanks for that.
> 
> > 
> > Someone commented in another thread a while back that the quickfix
> > error number was not always the same as the quickfix window line
> > number, but that assumption has always worked for me.
> 
> I suppose this could happen for multi-line errorlists? But I have never 
> used them, so it should be okay for me.

I don't know.  I don't currently use a compiler that generates
multi-line errors.

I think it may be because I always put %-G%.%# at the end of
'errorformat' and 'grepformat' so that the number of errors reported
by :grep or :make always agrees with the number of lines in the
quickfix list.

Regards,
Gary

-- 
-- 
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/d/optout.

Reply via email to