Re: Directing which window is changed with :copen
Hi, On Fri, Oct 20, 2017 at 7:24 PM, Tim Chasewrote: > On 2017-10-20 21:04, 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. > > Digging a little further, it's not quite as capricious/malicious as > I'd thought. The help does state that it will open in the window > immediately above the quickfix window. It just usually happens that > the window I want to preserve is in that position at the bottom of > my window-stack. I did also encounter ^W_ which seems to solve > most of my problems. Though it would be nice to be able to choose > which window the default tromped. > Yes. As you found out, the window just above the quickfix window is used to open a selected file. The 'switchbuf' option can be used to control which windows/buffers are used by the quickfix jump commands. It currently doesn't have a 'useprev' option to use the previous window. - Yegappan -- -- 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.
Re: Directing which window is changed with :copen
On 2017-10-20 21:04, 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. Digging a little further, it's not quite as capricious/malicious as I'd thought. The help does state that it will open in the window immediately above the quickfix window. It just usually happens that the window I want to preserve is in that position at the bottom of my window-stack. I did also encounter ^W_ which seems to solve most of my problems. Though it would be nice to be able to choose which window the default tromped. -tim -- -- 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.
Re: Directing which window is changed with :copen
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.
Directing which window is changed with :copen
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, -tim -- -- 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.