VIM: Jump Back To Previous or Last Cursor Position

In vim, you can jump back to your previous or last cursor position by using the '' (two single quotes) command. The '' command takes you to the position where your cursor was before your last jump.

For example, if you are editing a file and you move the cursor to a different location, you can press the '' command to jump back to the previous cursor position. If you want to move back to the position before the previous jump, you can press the '' command again.

Note that the '' command only works within a single editing session. When you close and reopen a file, the previous cursor positions are not remembered.

Leave a Comment