Reputation: 1
I install the Ctags by package control. And I also use the sublime-erlang. Most of the time it works well. But sometimes I could want to see how it implement in erlang stdlib It's this possible to jump into stdlib? And how?
Upvotes: 0
Views: 2300
Reputation: 2766
Ok, the settings which make it possible are slightly covered on the CTags plugin homepage.
Consider your erlang installation is located at /usr/lib/erlang
as it usually does, then do the following:
Cd into your project or workspace directory, which is better for you.
Feed into the shell:
ctags --languages=erlang --erlang-kinds=-dr -R -f .libtags \
/usr/lib/erlang/lib/kernel-*/src \
/usr/lib/erlang/lib/stdlib-*/src
... and so on for all the otp applications you are interested in.
It is important to specify absolute paths.
Open your project specific settings in the Sublime Text (usually $PROJECT.sublime-project
, if it does not exists, would be better to create one through Project > Save Project As...
).
Append to the settings
section file path to the .libtags
we have created before. On my machine that file most of the time looks like this:
{
"folders":
[
{
"path": "/home/keynslug/workspace/projectname",
"file_exclude_patterns": ["*.beam", "*.app", ".tags*"]
}
],
"settings": {
"ctags_extra_tag_files": [
"/home/keynslug/workspace/.libtags"
]
}
}
Save and rebuild ctags.
Then if everything went well you would be able to dig into library function definitions as usual.
Upvotes: 2