4

I tried to set a mark using a digit: m1 and apparently that does not work, because later I typed `1 and I think it opened the last opened file or something else, I'm not sure.

What does m1 do?

Are marks restricted to letters?

  • 2
    To be clear, is that a backtick ` or an apostrophe '? The two are different. – Nic Hartley Jul 10 '16 at 20:41
13

You can jump to numbered marks, but you can't set them directly. According to :h mark-motions:

Numbered marks '0 to '9 are quite different. They can not be set directly. They are only present when using a viminfo file viminfo-file. Basically '0 is the location of the cursor when you last exited Vim, '1 the last but one time, etc. Use the "r" flag in 'viminfo' to specify files for which no Numbered mark should be stored. See viminfo-file-marks.

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.