Thursday, December 4, 2014

Re: The window to be chosen for quickfix

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.

Best,
Christian
--
Gewalt ist die letzte Zuflucht des Unfähigen.
-- Isaac Asimov

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: