> Hi fellow VIM users,
>
> Could anybody point me in the right direction for researching / solving
> the following:
>
> I write php using an MVC framework, and I'd love to be able to
> conditionally generate some of my new file content.
>
> The main ones would be
>
> vim app/controllers/projects_controller.php
>
> Should produce:
>
> <?php
> class ProjectsController extends AppController {
>
> }
>
> A further example:
>
> vim app/models/project.php
>
> Should produce:
>
> <?php
> class Project extends AppModel {
>
> }
>
> and so on for several others.
>
> There is a consistency in that the filename without the extension is
> converted from underscored to camelized.
>
http://vim.wikia.com/wiki/Use_eval_to_create_dynamic_templates
Or more generally (with a list of ready-made plugins):
http://vim.wikia.com/wiki/Category:Automated_Text_Insertion
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment