Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
When toggling folds with zi, any folds expanding above the current line cause the current line to disorientingly jump to a different place on the screen.
How can I keep the current line fixed in the same place while toggling folds?
Instead of zi you should use zo to open a fold and zc to close it or za to toggle the fold. These commands never make the current line jump for me.
Note that these commands have a recursive equivalent: zC, zO and zA
Required, but never shown
7 months ago
27 days ago