Tuesday, February 21, 2012

Re: Using z in vim

On Tue, 21 Feb 2012, Ven Tadipatri wrote:

> Hi,
>
> There should be a way to make the current line that you're on
> scroll to the top of the screen right? I've googled for "vim
> scrolling" or "vim z". Apparently Google's search is not case
> sensitive.

Use Vim's built-in help:

:help z

gets you the list of all commands starting with z. Similarly for:

:help g
:help CTRL-W
:help [

(Those are the ones that have the most "overloaded" behavior.)


> On a somewhat related note, I notice that ZZ will quit. But isn't that
> exactly what :wq does? What's the difference?

ZZ is faster and easier to type. (Hold shift with right pinky, tap 'z'
twice with left.) Also, it's equivalent to :x, not :wq. The help for
:x explains:

"""
Like ":wq", but write only when changes have been made.
"""

--
Best,
Ben

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

No comments:

Post a Comment