Eno,
Yeah, not sure if you've seen snippets in Textmate but it's similar to
that. For example in a php document, if you type 'for' then hit the tab
key you get the following:
for ( $<{i}>=<{}>; $<{i}> < <{}>; $<{i}>++ )
{
<{}>
}
<{}>
Then each time you press tab the cursor is placed at the next point in
the for statement where you enter your value and so on to the next -- if
that makes sense! :)
http://www.vim.org/scripts/script.php?script_id=1318
At the moment the snippetsEmu plugin has a bundle of PHP snippets but
I'm pretty sure we could add ones for symfony too.
What sort of code fragments do you think would be useful? I was thinking
* model methods
* peer methods
* <?php foreach(...): ?> etc
amongst others.
Cheers,
Tom
P.S. I've actually just come across this, I haven't tried it yet but I'm
going it give it a whirl:
http://www.vim.org/scripts/script.php?script_id=2128
DESCRIPTION
Usefull commands for symfony projects editing
* Switch between template view / module view ( <F8> key )
While editing a module method, press <F8>. It will switch to the
appropriate template view
Press <F8> again to go back to the module method .
It works with Actions and Components :
function executeMyAction() < > myActionSuccess.php
function executeMyComponent() < > _myComponent.php
Eno wrote:
> On May 23, 12:48 pm, Tom Haskins-Vaughan <[EMAIL PROTECTED]>
> wrote:
>
>> I am experimenting with vim at the moment - I really don't want this to
>> be yet another editor war :) - and I was wondering if anyone had come
>> across some symfony snippets for snippetsEmu. Of if anyone was
>> interested in creating some snippets.
>
> Actually would be nice to get symfony code-completion (of core sf
> classes) in vim.
> Are snippets a similar idea?
>
>
> --
>
> >
>
--
Tom Haskins-Vaughan
Temple Street Media: Design and Development for the Web
[EMAIL PROTECTED] | www.templestreetmedia.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---