Monday, November 14, 2016

Re: Command z doesn't work

On 14/11/2016 12:56 p.m., Bryan Richter wrote:
> On Sat, Nov 12, 2016 at 01:22:31PM -0800, lylez wrote:
>> On Tuesday, November 8, 2016 at 9:51:05 AM UTC-8, andalou wrote:
>>
>>> I'm using vim 80.069 on Windows with defaults.vim enabled.
>>>
>>> When pressing z<CR>, the cursor line is supposed to get to top of
>>> window, but is placed 5 lines below the top.
>>>
>>> Many thanks in advance,
>>>
>>> -- Cesar
>>
>> Folks, this is a classic example of a bug masquerading as a
>> feature. Not only does the z-<CR> functionality not work, but I can't
>> even move the cursor above the fifth line being displayed by pressing
>> the k key, unless the file is scrolled all the way to the top.
>
> To respectfully offer the counter position, this is a feature that
> ensures the cursor line is surrounded by lines of context whenever
> possible.
>
> What has changed between vim 7 and 8 is that the maintainers have
> switched from one point of view to the other.
>
> I don't see any way to reconcile the two points of view other than to
> provide an option to allow either position. Thankfully, that is already
> done.
>

What do you read if you do ':help z'?
You get:

--------------------
|z<CR>| z<CR> redraw, cursor line to top of window,
cursor on first non-blank
--------------------

Where is top of window?
Is it five lines after the top?

--
Cesar

--
--
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: