Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 783
chtenb Avatar asked Dec 06 '25 19:12

chtenb


1 Answers

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).

like image 176
paxdiablo Avatar answered Dec 08 '25 09:12

paxdiablo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!