Hi,

A.J.Mechelynck wrote:
> Jürgen Krämer wrote:
> [...]
>> Nice idea (esp. the recursion), but alas it's not that simple, because
>> the pattern only accepts wildcards (not regular expressions) and if it
>> did, the subpatterns would probably not be recognized in the command.
>> But your command gave me an idea -- the following should work
>>
>>   au FileType *.* exe substitute(expand('<amatch>'),
>>                   \              '^\(.*\)\.\(.*\)$',
>>                   \              'doau FileType \1 | doau FileType \2',
>>                   \              '')
>>> ('cindent' is set by the indent/c.vim plugin).
>> Regards,
>> Jürgen
>>
> 
> additional question: does ":doau" work in an autocommand or does it require a 
> "nested" flag somewhere?

>From the example at ":help doautocmd" it seems that an additional
"nested" is not needed. I also tested it by defining the following
autocommand:

  au FileType * echo expand('<amatch>')

The result of executing

  setf c.doxygen

was

  c.doxygen
  c
  doxygen

So I'd say "nested" is not needed.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

Reply via email to