1

While reading vim info motion marker says:

|`quote|   `"           go to the position when last editing this file
|`.|       `.           go to the position of the last change in this file

Above two shortcuts seem to be same. I tried both on a new file. first is taking me to the start of file(incorrect, unexpected behaviour), while later is working correctly as written. What is difference between two shortcuts?

2

You seem to have misread / miscopied the information. Let's revisit the :help topics:

'"  `"            To the cursor position when last exiting the current
                  buffer.  Defaults to the first character of the first
                  line.

This is about exiting (or leaving) the buffer. The second sentence also explains the behavior on a new file.

'.  `.            To the position where the last change was made.

Only this mark is about modifications. Also handy: gi, which jumps to the last insert position and goes to insert mode.

1

'" -> goes to the line you edited last '. -> hilights the curly braces { } in which your last edit took place.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.