Wednesday, December 3, 2014

Re: The window to be chosen for quickfix

On 2014-12-02, Marcin Szamotulski wrote:
> On 19:20 Mon 01 Dec 2014, neknekneknek wrote:
> > Hi, I've encountered a weird behaviour of quickfix so let me ask
> > a few questions.
> >
> > When I open a quickfix window with :copen, the quickfix window
> > is opened at the bottom right and the corresponding source code
> > is opened at the just upper window. The source code window seems
> > to be opened at the right most, even when I have vertically
> > splitted windows!
> > For example, I vetically split the window with :vnew twice. I
> > have three vertically splitted windows and the cursor at the
> > left most window. I open the quickfix window with :copen. Then
> > the quickfix window is opened at the most bottom right and the
> > corresponding source code is opened at the right most window. I
> > want it to be opened at the active window.
> > I actually asked at another place and I got an answer. Just open
> > the quickfix with :leftabove copen. Then the current window is
> > used and all things are happy.
> >
> > The question is
> > 1. Why the quickfix window is always opened at most right
> > bottom? Why the corresponding code is opened at the
> > right-most window? When vertically splitted, it's more
> > reasonable to be opened at the current window, isn't it? Is
> > this a bug or a documented behaviour?
> > 2. Why does :leftabove fix the behaviour? Is this a reasonable
> > solution? Is there any other answer?
> > 3. Can you open a quickfix window with full width (just like
> > :botright copen) while the corresponding code is opened at
> > the active window? This is the most preferable behaviour
> > that I want.
> >
> > Thanks in advance.
> > Regards
> > itchyny
>
> Ad. 1) This is explicitly mentioned in the doc's just below the
> description of :lwindow command.
>
> Ad. 2) When you open quick fix window it is always docked at the
> bottom, that's why `:lefta cope` will open it on the left but
> below.
>
> I didn't understood what do you want to achieve in 3.

For 3, I think itchyny means the following.

The user is editing in the left window of a split display.

+-----------+-----------+
| active | |
| window | |
| | |
| | |
| | |
| | |
+-----------+-----------+

The user then executes :copen. The quickfix window should open at
the bottom and be full-width.

+-----------+-----------+
| | |
| | |
| | |
| | |
+-----------+-----------+
| quickfix window |
+-----------+-----------+

Further, hitting Enter on any line in the quickfix window should
open that target in the window that was active at the time the
:copen command was executed. In this case, that would be the left
window.

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

No comments:

Post a Comment