what is the tags file for

what is the tags file for

by Gustav W Delius -
Number of replies: 2
I have always wondered what the purpose is of the file moodle/tags. It is rather large and its contents are cryptic. Can someone enlighten me?
Average of ratings: -
In reply to Gustav W Delius

Re: what is the tags file for

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
If you are using an editor that supports it, such as vim or emacs, then it makes editing life wonderfully easy. approve

For example, when editing a Moodle script in vim, I can put my cursor over a function and hit CTRL-] ... and I'm immediately taken to the function. I often then hit 'y' to yank a copy of the line, then CTRL-T to return to the file I was originally in, then 'p' to paste that line in to that script - this makes it easy to know all the parameter order etc.

It also helps function name completion. I can type part of the function name and then hit TAB to automatically cycle through available completed function names.

To make the tags file be used in vim, just add this to your .vimrc file:

set tags=../../../../../tags,../../../../tags,../../../tags,../../tags,../tags,./tags,tags
In reply to Martin Dougiamas

Re: what is the tags file for

by Gustav W Delius -
That sounds very useful. Thanks. Unfortunately I am not using vim or emacs but perhaps some day I will change to an editor that can use this.