> -----Original Message-----
> From: Peter Hodge [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 12, 2006 11:24 PM
> To: David Fishburn; vim@vim.org
> Subject: Re: VimL and Exuberant tags - Suggestions please
> 
> Hello David,
> 
> Can I suggest support for these commands:
> 
>   :set/setlocal/setglobal
>   :syntax
>   :highlight (and maybe :HiLink because it is so commonly used)
> 
> Some examples:
> 
>   set foldmethod=syntax
>   setlocal formatoptions+=roq
>   setglobal completeopt-=preview


I can see why we might want to track settings, it is often useful to see
where a particular script is changing Vim options.

This can also work for:
        let &foldmethod='syntax'
        let &l:foldmethod='syntax'
        let &g:foldmethod='syntax'


> 
>   syntax keyword phpFunction ...
>   syn match phpIdentifier ...
>   syn region phpRegion ...
>   sy cluster phpClTop ...
>   syntax clear phpMethods
> 
>   highlight String ...
>   hi clear Constant ...
>   hi link Number ...
>   hi! link Number ...
>   hi def link Function ...
>   HiLink Number ...


These ones I am not certain of the value.
If I open a syntax file, there are somethimes hundreds of these lines.  This
would merely identify a syn is there, but there is no real "name" associated
with the item.  So the tag isn't particularily meaningful.


> 
> These are all pretty straightforward to find.
> 
> Also, for dictionary functions would it make sense to mark 
> them twice, since they get a new 'name' if the dictionary is 
> copied to a new variable?  For
> example:
> 
>   let foo = { }
>   function! foo.func1() dict
>   endfunction
>   let bar = foo
> 
> There is now a function called 'bar.func1()', so maybe func1 
> should be tagged
> as:
> 
>   Dictionary Functions
>   foo.bar /^function! foo.bar() dict/
>   .bar  /^function! foo.bar() dict/


I have fixed it to return:
foo.func1 as a function tag.

Let bar = foo, if made outside of a function tags "bar" as a variable.  I
will not attempt to figure out what time of variable it is.  Seem my
previous response to Tony.



> I wouldn't mind if mappings could be tagged as well.

I was thinking on this topic too.

nnoremap <silent> <Leader>yr :YRSearch<CR>
nnoremap <silent> <F11> :YRShow<CR>

>From maps I guess they have a name, in the above case it would be:
        <Leader>yr
        <F11>

So these could be "tagged".
I know I often open my vimrc and try to find these mappings.


> Is there or will there be any way to toggle options for the 
> way ctags scans vim files?


You can override this yourself already using the taglist.vim plugin.
'a', "augroup",  "autocommand groups" 
'f', "function", "function definitions"
'v', "variable", "variable definitions"

The current version of ctags tags the above, you can override this and only
capture functions and variables if you like.

I have added another:
'c', "command",  "user-defined commands"

And will consider adding more (like maps).
These options can be turned on or off by default.  Currently they are all
on.  To override it you provide additional information on the ctags command
line.  To do this via the taglist plugin you can do something like this in
your vimrc:
let g:tlist_vim_settings = 'vim;a:augroup;c:command;f:function;v:variable'


Dave

Reply via email to