chtenb
chtenb

Reputation: 16184

What is the use case of marks?

Both Sublime Text 2 and VIM have a feature called marks. However, I've not been able to find a use case for it. It feels like everything you can do with it can also be done with other things, often even better.

So the question is: what is the use case of marks?

Upvotes: 3

Views: 191

Answers (1)

paxdiablo
paxdiablo

Reputation: 881423

If you mean marking text lines as in vim, I use it quite a bit.

For example, if you want to quickly go look at something else, you can use ma to mark the current line as a, then go check out something else in the file, then return to where you were with a simple 'a.

Similarly, if you want to delete an unknown number of lines between your current position and somewhere else, use ma, go to that "somewhere else, and just use d'a.

There are many more things you can do with them (such as changing text between your current position and a mark), those two are just the most common ones I use (and I use them a lot).

Upvotes: 7

Related Questions