Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Comments on How to jump to original mark after overwriting

Parent

How to jump to original mark after overwriting

+3
−1

MWE

In Vim:

  1. mm.
  2. o ESC
  3. mm (by accident, meant mn).

Question

How do I jump to the original mark m set in action 1.?

Edit

I'm sorry, what I meant was you issue mm when you meant 'm. (It almost happened to me again.) Both are legitimate.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+4
−0

As far as I know, you can't. Each mark refers to a single location; if you change this location with the m command, the previous location is lost. There is no concept of a "mark value history" which can be accessed by the user.

Your best bet, if you want to avoid accidentally overwriting a mark, is to use a mark name which is hard to type accidentally on your keyboard. E.g. instead of using mm (which could happen easily due to key chatter or double-tapping), use mq or mz (assuming a QWERTY layout).

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Ah, that's unfortunate. Yes `mm` was more of an example, but good suggestion considering. (1 comment)
Ah, that's unfortunate. Yes `mm` was more of an example, but good suggestion considering.
mcp‭ wrote over 2 years ago

Ah, that's unfortunate. Yes mm was more of an example, but good suggestion considering.