LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to get the cursor position line at the mid of the windows in vim? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-the-cursor-position-line-at-the-mid-of-the-windows-in-vim-798403/)

cola 03-28-2010 05:33 AM

How to get the cursor position line at the mid of the windows in vim?
 
Suppose the cursor position line at bottom or top.
What's the vim command to get the cursor position line at the mid of the windows in vim?

Maligree 03-28-2010 06:14 AM

M to get to the middle line, then gm to get to the middle column?

cola 03-28-2010 06:24 AM

Quote:

Originally Posted by Maligree (Post 3915281)
M to get to the middle line, then gm to get to the middle column?

No,this is not what i'm looking for.
Suppose the cursor is at the line number 35.
35 is the last line number of that window/page.
Now i want to get this line number 35 at the middle of that window/page.

And there will be same number of lines above and bottom the line number 35.

I know about H,M,L.

grail 03-28-2010 06:25 AM

cola ... I am curious if you have man and / or access to the internet to search?

I only ask as you have asked several questions recently related to vim and as far as I can tell most
would have been easily answered by one of the two methods I mention above.

Just a thought

perforser 03-28-2010 06:48 AM

zz does what you want

cola 03-28-2010 10:18 AM

Thanks.


All times are GMT -5. The time now is 02:25 AM.