Cursor and scrolling

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cursor and scrolling

kamil-7
Hi,

Could you tell me how turn off cursor's movement when I'm scrolling a
document ?

Example :
cursor's position  - line 8
now I want to check what is in line 256, so I'm scrolling page to see line
256, but cursor all the time stays in that page what I'm currently watching,
so it changes line 8 position.

is there any possibility change this feature ?

I want to have a cursor in constant position when I'm scrolling a document.
Any ideas ?

Thanks for help
Kamil


Reply | Threaded
Open this post in threaded view
|

Re: Cursor and scrolling

Tim Chase-2
> I want to have a cursor in constant position when I'm
> scrolling a document. Any ideas ?

AFAIK, Vim does not support this...the cursor is always on the
screen.  However, Vim does provide a bevy of methods for jumping
around in your file.

You can mark the location using "m" followed by a letter; scroll
around to your heart's content; and return to that location using
back-tick followed by the letter.

        :help m
        :he `

Additionlly, Vim automatically places several marks for you that
you can jump back to them without first dropping a mark. You can
return to the last place you made an insertion (`^) or the last
place you made any sort of change (`.) or even resume insertion
at the last place you were inserting (gi).

        :help `^
        :he `.
        :he gi

There are plenty of other marks for other uses as well as found in

        :help mark-motion

Just a few thoughts, as they're what I've used regularly to
replace the functionality of not having the cursor on the screen.

HTH,

-tim


Reply | Threaded
Open this post in threaded view
|

RE: Cursor and scrolling

jason heddings-2
How about <C-E> and <C-Y>?
 

-----Original Message-----
From: Tim Chase [mailto:[hidden email]]
Sent: Thursday, 15 September, 2005 06:26
To: Kamil
Cc: [hidden email]
Subject: Re: Cursor and scrolling

> I want to have a cursor in constant position when I'm scrolling a
> document. Any ideas ?

AFAIK, Vim does not support this...the cursor is always on the screen.
However, Vim does provide a bevy of methods for jumping around in your file.

You can mark the location using "m" followed by a letter; scroll around to
your heart's content; and return to that location using back-tick followed
by the letter.

        :help m
        :he `

Additionlly, Vim automatically places several marks for you that you can
jump back to them without first dropping a mark. You can return to the last
place you made an insertion (`^) or the last place you made any sort of
change (`.) or even resume insertion at the last place you were inserting
(gi).

        :help `^
        :he `.
        :he gi

There are plenty of other marks for other uses as well as found in

        :help mark-motion

Just a few thoughts, as they're what I've used regularly to replace the
functionality of not having the cursor on the screen.

HTH,

-tim





Reply | Threaded
Open this post in threaded view
|

Re: Cursor and scrolling

Tim Chase-2
> How about <C-E> and <C-Y>?

^E and ^Y along with things like "z.", "zt", "zb", etc all scroll
keeping the cursor within the window.  However, vim provides no
way to scroll to a distant point in your document without the
cursor following you.  Anything >= one page up/down will move the
cursor from its current location as the cursor must always be on
the screen.

If you only need to scroll up/down less than a screen height,
then yes, you can use ^E and ^W, as well as zt and zb for
convenient panning.

-tim




Reply | Threaded
Open this post in threaded view
|

Re: Cursor and scrolling

Robert Schols
In reply to this post by kamil-7
Kamil wrote:
> Hi,
>
> Could you tell me how turn off cursor's movement when I'm scrolling a
> document ?
>

See the voting page:
http://www.vim.org/sponsor/vote_results.php

With a rank of 40 out of 85:
"add option not to move the cursor when using a scrollbar".

Maybe you want to go and vote :)
Personally, I use the "bevy of methods" Tim Chase mentioned.

-- Robert