One of the things I love most of textmate is the possibility of many bundles to search for documentation with a simple ^-H, it's fantastic.
Now I'm studying erlang and I didn't find this functionality in the bundle, then I made this
#!/usr/bin/env bash
OFF=$TM_CURRENT_WORD.html echo $TM_CURRENT_WORD | /usr/bin/grep ':' if [[ $? == 0 ]] then MOD=echo $TM_CURRENT_WORD | cut -d ':' -f 1 FUN=echo $TM_CURRENT_WORD | cut -d ':' -f 2 OFF="$MOD.html#$FUN" fi
ADDR="http://www.erlang.org/doc/man/%24OFF" curl $ADDR
Know it's almost working, but if I give something like lists:seq it doesn't go to the seq function, because I should also know the arity of a function, and how to get it??
When I've got something I think it could be useful I can propose in the developer section? Thanks
On 1 Nov 2008, at 14:32, Andrea Crotti wrote:
[...] if I give something like lists:seq it doesn't go to the seq function, because I should also know the arity of a function, and how to get it??
I am not sure what the question is here or whether the problem you need help with is in the shell script or TM functionality. Could you maybe give a step-by-step of what happens / what you’d like to happen?
Well in general I would like to get for every bundle I use a doc string when I type ^-h on a function.
In particular I was trying to do this with erlang, I found that web page who explains every module and I tried to put things together. Now if I select a name of a module it works, but if I select module:function it doesn't, because: 1. the ADDR is just setting as the OFF (just a bash script problem) 2. to reach an anchor on the web page I would also need the cardinality.
So then I'm not an expert of bundles and erlang also, but I'd like to learn and I'm trying to see if I find something useful...
I would just like to have any hint to make this command which may be useful to others also...
Thanks