Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
How to redraw screen putting specific line at top without moving cursor
MWE
5
4
3
2
1
0
Go to the end of the file: G
.
Question
Using spacemacs, how do I put the line with 3
at the top of the screen
without moving the cursor?
With moving the cursor that would be: 3k
zt
G
.
Notes
I use relative line numbering which explains the organization of the
MWE. I was thinking 3zt
would work but it doesn't behave as intended.
1 answer
The best I've come up with since, when the line in question is often returned to, is to go mark the line you want up top with mz
and the line you are working on with mw
.
Returning your workspace to order then becomes: 'z
zt
'w
.
0 comment threads