2

Reading the manuals, seems to me that marks and tags are the same thing, only difference is that mark names can be [a-zA-Z] values, while tags can be alphanumeric. If I'm wrong, what is the difference between them?

2

Both specify certain points in a file and give you commands to jump there and as such they are the same.

But marks are created by vim. Either explicitly by hand with m or automatically by vim (for the last selected text, the last position where you entered insert mode and so on).

Tags on the other hand are read from the tags file which is normally created by an external command. The idea is that you have some sofisticated program like ctags that parses your source code and writes positions for declarations and definitions into the tags file. Vim reads the tags file and lets you easily jump to intresting points in your code base.

Vim uses the tags feature for "links" in the documentation. So when you jump from one help topic to the next or execute some :help command it looks for tags in the doc/ folders in &runtimepath. If you execute echo globpath(&rtp, 'doc/tags') you should see the names of these help-tags files.

| improve this answer | |

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.