On Friday, October 20, 2017 at 9:04:29 PM UTC-5, Tim Chase wrote:
> Long a nagging annoyance, I figured it's time to ask.  I frequently
> will do a :vimgrep on a term under the cursor, but want the resulting
> navigation to open in a new window.
> 
>   $ vim somefile.c
>   :echo 'In my main code window'
>   :new
>   :echo 'I want my vimgrep results HERE'
>   :vimgrep /pattern/ *.[ch]
>   :copen
> 
> Navigating to my desired entry in the quickfix list and hitting Enter
> on the desired line ends up navigating in my original "main code"
> window, not in the window I ":copen"ed.
> 
> 1)  how to I know which window the Enter will impact?  Vim seems to
> have an uncanny ability to choose the one I *least* want to change.
> 
> 2)  how can I tell Vim which window I want the resulting quick-fix
> "Enter" navigation to go into?
> 
> Thanks,

Do :copen, then put the cursor in the window you want, then jump directly to 
the quickfix window (e.g. with CTRL-W_b). After that the correct window should 
be used.

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

Reply via email to