Let's say I'm on line 100 of myfile.txt. I type 200-G to move to line 200. Is there a shortcut to move the cursor back to line 100?
I wish for this all the time, given that I usually don't note the line number (100) before I jump to line 200. I just know I want to go back.
In case this doesn't make sense, I'm asking for vim's line equivalent of git checkout -.
CTRL + O
See :help jumplist for more informations about cursor location.
I use '' (two single quotes) to move to the beginning of the previous line. If you want to return to the previous column as well, then press two backtics ``
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