Example. To jump back to line # 300 or previous position press CTRL-O (press and hold Ctrl key and press letter O). To jump back forwards press CTRL-I (press and hold Ctrl key and press letter I).
Press ^ to move the cursor to the start of the current line. Press $ to move the cursor to the end of the current line.
Type "gg" in command mode. This brings the cursor to the first line.
Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line.
Try g ; and g ,. They jump backward and forward in the changelist.
See :help changelist
for more details.
I use CTRL-O and CTRL-I to jump back and forth between recent points in files. It also goes through certain motion commands, but I find it usually takes me back to where I was editing.
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