It happens to me many times that I want to look at other parts of the code while writing a statement, but whenever I scroll the page and the cursor reaches the bottom or top of the page it starts scrolling with the page, which means I have to search for the line I have been writing in. This is really annoying. Any idea if this can be disabled or not?
It can't be disabled, but if you were writing a statement and want to get quickly back to where you were, just hit gi and you'll get back to where you were doing your last insert.
Another useful vim trick is setting marks. m{a-zA-Z} set a mark {a-zA-Z} at cursor position. You can then send the cursor (and the window) back there by `{a-zA-Z}.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With