vim-projectionist
vim-projectionist copied to clipboard
Execute command if does not exist
So I am using this plugin for my EmberJS project and I think it would be cool if I do something like Econtroller application and it does not exist, it can run an ember command ember g controller application. This way it would created the controller plus the other things it does like tests. Is this possible?
I'm not opposed to a hook to allow for something like this. But I would think the user experience would be horrendous. Imagine accidentally typing :Econtroller applicatio and having to delete 4 different files scattered throughout the directory tree to undo it. I would think it vastly preferable to provide a :Generate command, like rails.vim does.
I guess the next challenge from there would be, how to tell what the generate command does
I was referring to a command with explicit arguments -- :Generate controller application -- which could then load the generated files into the quickfix list. Automatic arguments sounds really cool. You could probably pluck them out of projectionist#query_raw('type') (or projectionist#query_raw('generator') if you want to be more explicit).