OK, first of all, thanks so much for the fruits of an idle moment! I use vim all the time now, and this is great.<br><br>Now, a problem and a solution.<br><br>I executed the below cvs statement on the command line<br>But since it includes &quot;-d drupal6&quot;, it doesn&#39;t create a hooks directory, but rather a drupal6 directory.<br>

Error:<br>$ ctags -R -o drupal6.tags hooks<br>ctags: Warning: cannot open source file &quot;hooks&quot; : No such file or directory<br><br>So the following does work:<br><br>$ ctags -R -o drupal6.tags drupal6<br><br>Then, you probably want to include .inc files in the list, yielding:<br>

<br>if has(&quot;autocmd&quot;)<br>  &quot; Drupal *.module and *.install files.<br>  augroup module<br>    autocmd BufRead,BufNewFile *.module set filetype=php<br>    autocmd BufRead,BufNewFile *.install set filetype=php<br>

    autocmd BufRead,BufNewFile *.inc set filetype=php<br>    set tags=.vim/drupal6.tags<br>  augroup END<br>endif<br><br>However, when editing a file, , Ctrl-] gives error:<br><br>E433: No tags file<br>E426: tag not found: drupal_get_form          <br>

<br>Am I missing something?<br><br>Victor Kane<br><a href="http://awebfactory.com.ar">http://awebfactory.com.ar</a><br><br><div class="gmail_quote">On Fri, Jul 31, 2009 at 6:58 PM, Sam Tresler <span dir="ltr">&lt;<a href="mailto:sam@treslerdesigns.com">sam@treslerdesigns.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You know... it said that at the top of the <a href="http://api.drupal.org" target="_blank">api.drupal.org</a> page, but I guess it didn&#39;t occur to me to actually look...   Thanks.<br>


<br>
Works like a charm.  I&#39;d really rather skip the first incarnation I had, and just have the hooks loaded.  I&#39;ll update the vim docs here shortly, but for the record.<br>
<br>
<br>
$ cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib co -r DRUPAL-6--1 -d drupal6 contributions/docs/developer/hooks<br>
$ ctags -R -o drupal6.tags hooks<br>
$ mv drupal.tags ~/.vim<br>
<br>
(make the .vim directory if you need to)<br>
<br>
Then add this to ~/.vimrc<br>
<br>
if has(&quot;autocmd&quot;)<br>
   &quot; Drupal *.module and *.install files.<br>
   augroup module<br>
     autocmd BufRead,BufNewFile *.module set filetype=php<br>
     autocmd BufRead,BufNewFile *.install set filetype=php<br>
     set tags=.vim/drupal6.tags<br>
   augroup END<br>
endif<br>
<br>
And you have code-hinting for drupal core in vim.  Just remember to update it as you change versions. But it sounds like in Drupal 7 this can scrape directly from .api.php files; I haven&#39;t even looked at those yet.<br>


<br>
Now what was I doing before this diversion....<br>
<br>
-S<br>
<br>
<br>
<br>
<br>
Neil Drumm wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
6.x and lower: <a href="http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/hooks/?pathrev=DRUPAL-6--1" target="_blank">http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/hooks/?pathrev=DRUPAL-6--1</a><br>


7.x: *.api.php in module directories.<br>
<br>
-Neil<br>
<br></div><div class="im">
On Fri, Jul 31, 2009 at 2:03 PM, Sam Tresler &lt;<a href="mailto:sam@treslerdesigns.com" target="_blank">sam@treslerdesigns.com</a> &lt;mailto:<a href="mailto:sam@treslerdesigns.com" target="_blank">sam@treslerdesigns.com</a>&gt;&gt; wrote:<br>


<br>
    Thanks Neil,<br>
     Some further digging and I found out that php code completion in<br>
    vim can map to a ctags output file, which is pretty easy to generate.<br>
<br>
    ctags -R -o drupal6.tags --langmap=php:.module *<br>
<br>
    then load it in vim<br>
<br>
    :set tags=drupal6.tags<br>
<br>
    and you have code complete for every function in core.<br>
<br>
    However, this unfortunately doesn&#39;t get code complete on hooks, as<br>
    they aren&#39;t actually named in core, but constructed from<br>
    modulename_function().<br>
<br>
    So, I guess my next question is where are the hook function<br></div>
    definitions from <a href="http://api.drupal.org" target="_blank">api.drupal.org</a> &lt;<a href="http://api.drupal.org" target="_blank">http://api.drupal.org</a>&gt; generated?<div class="im"><br>
<br>
    Thanks in advance.<br>
<br>
    -S<br>
<br>
<br>
<br>
<br>
    Neil Drumm wrote:<br>
<br>
        <a href="http://api.drupal.org/api/function_dump/6" target="_blank">http://api.drupal.org/api/function_dump/6</a> might have worked at<br>
        some point. I honestly haven&#39;t paid any attention to that page,<br>
        which might integrate with IDEs; apparently no one else has either.<br>
<br>
        This list is already available in JSON format in the development<br>
        version of API module. That or another format should be present<br>
        in the future for an api_filter module to provide an input<br>
        format filter without running the api module.<br>
<br>
        -Neil<br>
<br>
        On Fri, Jul 31, 2009 at 12:26 PM, Sam Tresler<br>
        &lt;<a href="mailto:sam@treslerdesigns.com" target="_blank">sam@treslerdesigns.com</a> &lt;mailto:<a href="mailto:sam@treslerdesigns.com" target="_blank">sam@treslerdesigns.com</a>&gt;<br></div>
        &lt;mailto:<a href="mailto:sam@treslerdesigns.com" target="_blank">sam@treslerdesigns.com</a> &lt;mailto:<a href="mailto:sam@treslerdesigns.com" target="_blank">sam@treslerdesigns.com</a>&gt;&gt;&gt;<div class="im">

<br>
        wrote:<br>
<br>
           I am working on a drupalcomplete.vim file and would like to<br>
        generate<br>
           an list of all of Drupal 6 (and eventually 5,7, etc) functions,<br>
           objects, and anything else that might warrant code completion.<br>
<br>
           I believe that <a href="http://api.drupal.org" target="_blank">api.drupal.org</a> &lt;<a href="http://api.drupal.org" target="_blank">http://api.drupal.org</a>&gt;<br>
        &lt;<a href="http://api.drupal.org" target="_blank">http://api.drupal.org</a>&gt; scrapes this<br>
<br>
           automatically from core.  I can manipulate the data to match the<br>
           format I need no problem, but I thought I would ask here before I<br>
           went about finding my own way to scrape the data from a cvs<br>
        checkout.<br>
<br>
           This was broached before here<br>
                  <a href="http://lists.drupal.org/pipermail/development/2009-February/032090.html" target="_blank">http://lists.drupal.org/pipermail/development/2009-February/032090.html</a><br>
           but appears stalled.<br>
<br>
           yes, I have too much time on my hands currently.<br>
<br>
           Cheers. -Sam<br>
<br>
<br>
<br>
<br>
        --         Neil Drumm<br>
        <a href="http://delocalizedham.com" target="_blank">http://delocalizedham.com</a><br>
<br>
<br>
<br>
<br>
-- <br>
Neil Drumm<br>
<a href="http://delocalizedham.com" target="_blank">http://delocalizedham.com</a><br>
</div></blockquote>
</blockquote></div><br>